File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
PWGLF/TableProducer/Nuspex Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -854,8 +854,11 @@ struct EbyeMaker {
854854 continue ;
855855 auto pdgCode = mcPart.pdgCode ();
856856 auto genPt = std::hypot (mcPart.px (), mcPart.py ());
857- if ((std::abs (pdgCode) == PDG_t::kPiPlus || std::abs (pdgCode) == PDG_t::kElectron || std::abs (pdgCode) == PDG_t::kMuonMinus || std::abs (pdgCode) == PDG_t::kKPlus || std::abs (pdgCode) == PDG_t::kProton ) && mcPart.isPhysicalPrimary () && genPt > ptMin[0 ] && genPt < ptMax[0 ])
858- nChPartGen++;
857+ if ((std::abs (pdgCode) == PDG_t::kPiPlus || std::abs (pdgCode) == PDG_t::kElectron || std::abs (pdgCode) == PDG_t::kMuonMinus || std::abs (pdgCode) == PDG_t::kKPlus || std::abs (pdgCode) == PDG_t::kProton ) && mcPart.isPhysicalPrimary () && genPt > ptMin[0 ] && genPt < ptMax[0 ]) {
858+ int ch = (pdgCode == PDG_t::kPiPlus || pdgCode == -PDG_t::kElectron || pdgCode == -PDG_t::kMuonMinus || pdgCode == PDG_t::kKPlus || PDG_t::kProton ) ? 1 : -1 ;
859+ if ((ch < 0 && countOnlyNegTrk) || !countOnlyNegTrk)
860+ nChPartGen++;
861+ }
859862 if (std::abs (pdgCode) == PDG_t::kLambda0 ) {
860863 if (!mcPart.isPhysicalPrimary () && !mcPart.has_mothers ())
861864 continue ;
You can’t perform that action at this time.
0 commit comments