looks for particles with constrained masses or the Proton and gets their P4 from the locDirectP4 array, but how does it handle other charged particles that come from the primary vertex, like a pi+ or pi-? I tried this with the final state proton pi0 pi+ pi+ pi- pi- and the output tree contained only the proton and pi0.
Instead of checking for the Proton specifically, should this be checking if "Decaying" is in the particle name and if not getting the P4 from locDirectP4 with something like
Line 565 of the modified file https://github.com/JeffersonLab/gluex_root_analysis/blob/dd11da433fa1620493ef053fc6a71335c0d9ef8b/programs/tree_to_amptools/tree_to_amptools.cc#L565
looks for particles with constrained masses or the Proton and gets their P4 from the
locDirectP4
array, but how does it handle other charged particles that come from the primary vertex, like a pi+ or pi-? I tried this with the final state proton pi0 pi+ pi+ pi- pi- and the output tree contained only the proton and pi0.Instead of checking for the Proton specifically, should this be checking if "Decaying" is in the particle name and if not getting the P4 from
locDirectP4
with something likeif(locListIndex >= 0 && (((string)locNameObject->GetName()).find("Decaying") == string::npos || locKinFitMassConstrained[(string)locNameObject->GetName()])
For the 5 pion final state above, this seems to work but I haven't checked others.
_Originally posted by @jrstevenjlab in https://github.com/JeffersonLab/gluex_root_analysis/issues/136#issuecomment-733145868_