File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
offline/packages/decayfinder Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -361,6 +361,9 @@ bool DecayFinder::findDecay(PHCompositeNode* topNode)
361361 exit (1 );
362362 }
363363
364+ // correct mother PID to search for match
365+ const int mother_id_to_match = m_getChargeConjugate ? std::abs (m_mother_ID) : m_mother_ID;
366+
364367 if (m_truthinfo && !m_geneventmap) // This should use the truth info container if we have no HepMC record
365368 {
366369 if (Verbosity () >= VERBOSITY_SOME)
@@ -374,7 +377,7 @@ bool DecayFinder::findDecay(PHCompositeNode* topNode)
374377 {
375378 PHG4Particle* g4particle = iter->second ;
376379 int this_pid = m_getChargeConjugate ? abs (g4particle->get_pid ()) : g4particle->get_pid ();
377- if (this_pid == m_mother_ID )
380+ if (this_pid == mother_id_to_match )
378381 {
379382 if (Verbosity () >= VERBOSITY_MAX)
380383 {
@@ -455,7 +458,7 @@ bool DecayFinder::findDecay(PHCompositeNode* topNode)
455458 for (HepMC::GenEvent::particle_const_iterator p = theEvent->particles_begin (); p != theEvent->particles_end (); ++p)
456459 {
457460 int this_pid = m_getChargeConjugate ? abs ((*p)->pdg_id ()) : (*p)->pdg_id ();
458- if (this_pid == m_mother_ID )
461+ if (this_pid == mother_id_to_match )
459462 {
460463 if (Verbosity () >= VERBOSITY_MAX)
461464 {
You can’t perform that action at this time.
0 commit comments