Two Kinematic FitHypotheses in one tree

10 views
Skip to first unread message

Kevin Luckas

unread,
Jul 1, 2020, 8:44:49 AM7/1/20
to GlueX Software Help Email List
Dear Experts,

is it possible to perform a kinematic fit on a given tree file, either directly through a secondary hypothesis in the ReacrtionFilter or later on in the DSelector? And if yes, where can i find examples how to do so?

In my current analysis of Kplus Gamma Lambda I’d like to investigate using a “veto” kinematic fit on the hypothesis KPlus Lambda (Pi0->Gamma + Missing Gamma).

Thank you in advance,
Kevin

Justin Stevens

unread,
Jul 1, 2020, 9:13:36 AM7/1/20
to Kevin Luckas, GlueX Software Help Email List
Hi Kevin,

Alex Barnes provided a tutorial for comparing KInFit quantities between two different Analysis TTrees which is described in this presentation https://halldweb.jlab.org/doc-private/DocDB/ShowDocument?docid=3585 and some example code and instructions at https://github.com/JeffersonLab/hd_utilities/tree/master/AnalysisHowTo/ChiSqComparison.  This requires that you have both a TTree from the ReactionFilter for your signal reaction and the reaction you want to veto.

-Justin

Jonathan Zarling

unread,
Jul 1, 2020, 9:23:57 AM7/1/20
to Justin Stevens, Kevin Luckas, GlueX Software Help Email List
Hi Kevin,

To add to the discussion, an on-the-fly kinematic fit for other hypotheses would certainly be convenient, but this has not been implemented to date. There's been discussion about doing so, but until then you have to generate trees for your main channel and the alternate one you want to veto.

Also, I seem to remember that the CL distribution/pulls from gamma p -> pi+ pi- pi0 p, where pi0->gamma (missing gamma) looked suspicious some time ago, I don't think much examination has been given to kinfits with missing particles so far. You might want to check those first before starting to place cuts on chi^2 comparisons. 



Jon


NILANGA INDRAJIE WICKRAMAARACHCHI

unread,
Aug 19, 2020, 2:32:43 PM8/19/20
to gluex-s...@googlegroups.com
Hi experts,
I tried to use the method in https://github.com/JeffersonLab/hd_utilities/tree/master/AnalysisHowTo/ChiSqComparison to two ReactionFilter trees.
When I run it for each single file within a run number (i.e. 030274_000) it works fine. But when I run it for the two merged root files (for example merged root file for 030274 run in each reaction) it crashes. Is the later case not intended to be used to run the script?
Here is the error message I get for the second case.
Thanks.
Nilanga

/w/halld-scifs17exp/halld2/home/nwickjlb/analysis/kinfit_hypo_test/pippimkpkm_DS
newtree_000.root  newtree_001.root  tree_pippimkpkm__B4_M18.root  tree_pippippimpim__B4_M18.root
ifarm1802.jlab.org> root -l -b -q '/work/halld2/home/nwickjlb/private_build_new/halld_recon/src/programs/Utilities/mergeTrees/mergeTrees.C+("tree_pippimkpkm__B4_M18.root","pippimkpkm__B4_M18_Tree","tree_pippippimpim__B4_M18.root","pippippimpim__B4_M18_Tree")'
root [0] 
Processing /work/halld2/home/nwickjlb/private_build_new/halld_recon/src/programs/Utilities/mergeTrees/mergeTrees.C+("tree_pippimkpkm__B4_M18.root","pippimkpkm__B4_M18_Tree","tree_pippippimpim__B4_M18.root","pippippimpim__B4_M18_Tree")...
Primary reaction: pippimkpkm
Secondary reaction: pippippimpim
added primary tree
added secondary tree
Added to maps
1 million events analyzed

 *** Break *** segmentation violation



===========================================================
There was a crash.
This is the entire stack trace of all threads:
===========================================================
#0  0x00007f4f14f0b41c in waitpid () from /lib64/libc.so.6
#1  0x00007f4f14e88f12 in do_system () from /lib64/libc.so.6
#2  0x00007f4f15f0eae9 in TUnixSystem::StackTrace (this=0x7b88e0) at /u/group/halld/Software/builds/Linux_CentOS7.7-x86_64-gcc4.8.5/root/root-6.08.06/core/unix/src/TUnixSystem.cxx:2405
#3  0x00007f4f15f113bc in TUnixSystem::DispatchSignals (this=0x7b88e0, sig=kSigSegmentationViolation) at /u/group/halld/Software/builds/Linux_CentOS7.7-x86_64-gcc4.8.5/root/root-6.08.06/core/unix/src/TUnixSystem.cxx:3625
#4  <signal handler called>
#5  0x00007f4f159bd207 in std::_Rb_tree_increment(std::_Rb_tree_node_base*) () from /lib64/libstdc++.so.6
#6  0x00007f4f002f9fa2 in searchMap(std::map<std::string, int, std::less<std::string>, std::allocator<std::pair<std::string const, int> > >, std::string) () from /w/halld-scifs17exp/halld2/home/nwickjlb/private_build_new/halld_recon/src/programs/Utilities/mergeTrees/mergeTrees_C.so
#7  0x00007f4f002fbc13 in mergeTrees(char const*, char const*, char const*, char const*) () from /w/halld-scifs17exp/halld2/home/nwickjlb/private_build_new/halld_recon/src/programs/Utilities/mergeTrees/mergeTrees_C.so
#8  0x00007f4f1665f15f in ?? ()
#9  0x00000001c12af1e0 in ?? ()
#10 0x0000000000870ae0 in ?? ()
#11 0x00007f4f11897210 in ?? () from /u/group/halld/Software/builds/Linux_CentOS7.7-x86_64-gcc4.8.5/root/root-6.08.06/lib/libCling.so
#12 0x00007fffc12af590 in ?? ()
#13 0x00007fffc12af1e0 in ?? ()
#14 0x00007f4f11825ffb in cling::Interpreter::RunFunction(clang::FunctionDecl const*, cling::Value*) () from /u/group/halld/Software/builds/Linux_CentOS7.7-x86_64-gcc4.8.5/root/root-6.08.06/lib/libCling.so
#15 0x00007f4f11827ecd in cling::Interpreter::EvaluateInternal(std::string const&, cling::CompilationOptions, cling::Value*, cling::Transaction**, unsigned long) () from /u/group/halld/Software/builds/Linux_CentOS7.7-x86_64-gcc4.8.5/root/root-6.08.06/lib/libCling.so
#16 0x00007f4f118280cb in cling::Interpreter::process(std::string const&, cling::Value*, cling::Transaction**) () from /u/group/halld/Software/builds/Linux_CentOS7.7-x86_64-gcc4.8.5/root/root-6.08.06/lib/libCling.so
#17 0x00007f4f118bcf93 in cling::MetaProcessor::process(char const*, cling::Interpreter::CompilationResult&, cling::Value*) () from /u/group/halld/Software/builds/Linux_CentOS7.7-x86_64-gcc4.8.5/root/root-6.08.06/lib/libCling.so
#18 0x00007f4f117990d6 in HandleInterpreterException (metaProcessor=<optimized out>, input_line=<optimized out>, compRes=
0x7fffc12af48c: cling::Interpreter::kSuccess, result=result
entry=0x7fffc12af590) at /u/group/halld/Software/builds/Linux_CentOS7.7-x86_64-gcc4.8.5/root/root-6.08.06/core/meta/src/TCling.cxx:1883
#19 0x00007f4f117a856d in TCling::ProcessLine (this=0x818370, line=<optimized out>, error=0x7fffc12b05cc) at /u/group/halld/Software/builds/Linux_CentOS7.7-x86_64-gcc4.8.5/root/root-6.08.06/core/meta/src/TCling.cxx:2006
#20 0x00007f4f1179862b in TCling::ProcessLineSynch (this=0x818370, line=0x10a4610 ".X  /work/halld2/home/nwickjlb/private_build_new/halld_recon/src/programs/Utilities/mergeTrees/mergeTrees.C+(\"tree_pippimkpkm__B4_M18.root\",\"pippimkpkm__B4_M18_Tree\",\"tree_pippippimpim__B4_M18.root\",\""..., error=0x7fffc12b05cc) at /u/group/halld/Software/builds/Linux_CentOS7.7-x86_64-gcc4.8.5/root/root-6.08.06/core/meta/src/TCling.cxx:2886
#21 0x00007f4f15e0d04c in TApplication::ExecuteFile (file=<optimized out>, error=0x7fffc12b05cc, keep=<optimized out>) at /u/group/halld/Software/builds/Linux_CentOS7.7-x86_64-gcc4.8.5/root/root-6.08.06/core/base/src/TApplication.cxx:1141
#22 0x00007f4f15e0c5c2 in TApplication::ProcessLine (this=0x807300, line=<optimized out>, sync=<optimized out>, err=0x7fffc12b05cc) at /u/group/halld/Software/builds/Linux_CentOS7.7-x86_64-gcc4.8.5/root/root-6.08.06/core/base/src/TApplication.cxx:986
#23 0x00007f4f162306b5 in TRint::ProcessLineNr (this=this
entry=0x807300, filestem=filestem
entry=0x7f4f1623ea0f "ROOT_cli_", line=line
entry=0x7fffc12b05d0 ".x /work/halld2/home/nwickjlb/private_build_new/halld_recon/src/programs/Utilities/mergeTrees/mergeTrees.C+(\"tree_pippimkpkm__B4_M18.root\",\"pippimkpkm__B4_M18_Tree\",\"tree_pippippimpim__B4_M18.root\",\"p"..., error=error
entry=0x7fffc12b05cc) at /u/group/halld/Software/builds/Linux_CentOS7.7-x86_64-gcc4.8.5/root/root-6.08.06/core/rint/src/TRint.cxx:764
#24 0x00007f4f16231cc8 in TRint::Run (this=0x807300, retrn=<optimized out>) at /u/group/halld/Software/builds/Linux_CentOS7.7-x86_64-gcc4.8.5/root/root-6.08.06/core/rint/src/TRint.cxx:424
#25 0x0000000000400fec in main (argc=1, argv=0x7fffc12b2758) at /u/group/halld/Software/builds/Linux_CentOS7.7-x86_64-gcc4.8.5/root/root-6.08.06/main/src/rmain.cxx:30
===========================================================


The lines below might hint at the cause of the crash.
You may get help by asking at the ROOT forum http://root.cern.ch/forum.
Only if you are really convinced it is a bug in ROOT then please submit a
report at http://root.cern.ch/bugs. Please post the ENTIRE stack trace
from above as an attachment in addition to anything else
that might help us fixing this issue.
===========================================================
#5  0x00007f4f159bd207 in std::_Rb_tree_increment(std::_Rb_tree_node_base*) () from /lib64/libstdc++.so.6
#6  0x00007f4f002f9fa2 in searchMap(std::map<std::string, int, std::less<std::string>, std::allocator<std::pair<std::string const, int> > >, std::string) () from /w/halld-scifs17exp/halld2/home/nwickjlb/private_build_new/halld_recon/src/programs/Utilities/mergeTrees/mergeTrees_C.so
#7  0x00007f4f002fbc13 in mergeTrees(char const*, char const*, char const*, char const*) () from /w/halld-scifs17exp/halld2/home/nwickjlb/private_build_new/halld_recon/src/programs/Utilities/mergeTrees/mergeTrees_C.so
#8  0x00007f4f1665f15f in ?? ()
#9  0x00000001c12af1e0 in ?? ()
#10 0x0000000000870ae0 in ?? ()
#11 0x00007f4f11897210 in ?? () from /u/group/halld/Software/builds/Linux_CentOS7.7-x86_64-gcc4.8.5/root/root-6.08.06/lib/libCling.so
#12 0x00007fffc12af590 in ?? ()
#13 0x00007fffc12af1e0 in ?? ()
#14 0x00007f4f11825ffb in cling::Interpreter::RunFunction(clang::FunctionDecl const*, cling::Value*) () from /u/group/halld/Software/builds/Linux_CentOS7.7-x86_64-gcc4.8.5/root/root-6.08.06/lib/libCling.so
#15 0x00007f4f11827ecd in cling::Interpreter::EvaluateInternal(std::string const&, cling::CompilationOptions, cling::Value*, cling::Transaction**, unsigned long) () from /u/group/halld/Software/builds/Linux_CentOS7.7-x86_64-gcc4.8.5/root/root-6.08.06/lib/libCling.so
#16 0x00007f4f118280cb in cling::Interpreter::process(std::string const&, cling::Value*, cling::Transaction**) () from /u/group/halld/Software/builds/Linux_CentOS7.7-x86_64-gcc4.8.5/root/root-6.08.06/lib/libCling.so
#17 0x00007f4f118bcf93 in cling::MetaProcessor::process(char const*, cling::Interpreter::CompilationResult&, cling::Value*) () from /u/group/halld/Software/builds/Linux_CentOS7.7-x86_64-gcc4.8.5/root/root-6.08.06/lib/libCling.so
#18 0x00007f4f117990d6 in HandleInterpreterException (metaProcessor=<optimized out>, input_line=<optimized out>, compRes=
0x7fffc12af48c: cling::Interpreter::kSuccess, result=result
entry=0x7fffc12af590) at /u/group/halld/Software/builds/Linux_CentOS7.7-x86_64-gcc4.8.5/root/root-6.08.06/core/meta/src/TCling.cxx:1883
===========================================================


Root > 
 *** Break *** segmentation violation



===========================================================
There was a crash.
This is the entire stack trace of all threads:
===========================================================
#0  0x00007f4f14f0b41c in waitpid () from /lib64/libc.so.6
#1  0x00007f4f14e88f12 in do_system () from /lib64/libc.so.6
#2  0x00007f4f15f0eae9 in TUnixSystem::StackTrace (this=0x7b88e0) at /u/group/halld/Software/builds/Linux_CentOS7.7-x86_64-gcc4.8.5/root/root-6.08.06/core/unix/src/TUnixSystem.cxx:2405
#3  0x00007f4f15f113bc in TUnixSystem::DispatchSignals (this=0x7b88e0, sig=kSigSegmentationViolation) at /u/group/halld/Software/builds/Linux_CentOS7.7-x86_64-gcc4.8.5/root/root-6.08.06/core/unix/src/TUnixSystem.cxx:3625
#4  <signal handler called>
#5  0x00007f4f15d9965a in (anonymous namespace)::R__ListSlowClose (files=0x7bd3a0) at /u/group/halld/Software/builds/Linux_CentOS7.7-x86_64-gcc4.8.5/root/root-6.08.06/core/base/src/TROOT.cxx:1005
#6  0x00007f4f15d9a2fa in TROOT::CloseFiles (this=this
entry=0x7f4f161ec8a0 <ROOT::Internal::GetROOT1()::alloc>) at /u/group/halld/Software/builds/Linux_CentOS7.7-x86_64-gcc4.8.5/root/root-6.08.06/core/base/src/TROOT.cxx:1026
#7  0x00007f4f15d9a7a9 in TROOT::EndOfProcessCleanups (this=0x7f4f161ec8a0 <ROOT::Internal::GetROOT1()::alloc>) at /u/group/halld/Software/builds/Linux_CentOS7.7-x86_64-gcc4.8.5/root/root-6.08.06/core/base/src/TROOT.cxx:1103
#8  0x00007f4f15f0b9e1 in TUnixSystem::Exit (this=<optimized out>, code=129, mode=<optimized out>) at /u/group/halld/Software/builds/Linux_CentOS7.7-x86_64-gcc4.8.5/root/root-6.08.06/core/unix/src/TUnixSystem.cxx:2153
#9  0x00007f4f16231f2a in TRint::Run (this=0x807300, retrn=<optimized out>) at /u/group/halld/Software/builds/Linux_CentOS7.7-x86_64-gcc4.8.5/root/root-6.08.06/core/rint/src/TRint.cxx:445
#10 0x0000000000400fec in main (argc=1, argv=0x7fffc12b2758) at /u/group/halld/Software/builds/Linux_CentOS7.7-x86_64-gcc4.8.5/root/root-6.08.06/main/src/rmain.cxx:30
===========================================================


The lines below might hint at the cause of the crash.
You may get help by asking at the ROOT forum http://root.cern.ch/forum.
Only if you are really convinced it is a bug in ROOT then please submit a
report at http://root.cern.ch/bugs. Please post the ENTIRE stack trace
from above as an attachment in addition to anything else
that might help us fixing this issue.
===========================================================
#5  0x00007f4f15d9965a in (anonymous namespace)::R__ListSlowClose (files=0x7bd3a0) at /u/group/halld/Software/builds/Linux_CentOS7.7-x86_64-gcc4.8.5/root/root-6.08.06/core/base/src/TROOT.cxx:1005
#6  0x00007f4f15d9a2fa in TROOT::CloseFiles (this=this
entry=0x7f4f161ec8a0 <ROOT::Internal::GetROOT1()::alloc>) at /u/group/halld/Software/builds/Linux_CentOS7.7-x86_64-gcc4.8.5/root/root-6.08.06/core/base/src/TROOT.cxx:1026
#7  0x00007f4f15d9a7a9 in TROOT::EndOfProcessCleanups (this=0x7f4f161ec8a0 <ROOT::Internal::GetROOT1()::alloc>) at /u/group/halld/Software/builds/Linux_CentOS7.7-x86_64-gcc4.8.5/root/root-6.08.06/core/base/src/TROOT.cxx:1103
#8  0x00007f4f15f0b9e1 in TUnixSystem::Exit (this=<optimized out>, code=129, mode=<optimized out>) at /u/group/halld/Software/builds/Linux_CentOS7.7-x86_64-gcc4.8.5/root/root-6.08.06/core/unix/src/TUnixSystem.cxx:2153
#9  0x00007f4f16231f2a in TRint::Run (this=0x807300, retrn=<optimized out>) at /u/group/halld/Software/builds/Linux_CentOS7.7-x86_64-gcc4.8.5/root/root-6.08.06/core/rint/src/TRint.cxx:445
#10 0x0000000000400fec in main (argc=1, argv=0x7fffc12b2758) at /u/group/halld/Software/builds/Linux_CentOS7.7-x86_64-gcc4.8.5/root/root-6.08.06/main/src/rmain.cxx:30
===========================================================




Reply all
Reply to author
Forward
0 new messages