File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed
Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -1306,11 +1306,35 @@ struct hadronnucleicorrelation {
13061306 if (particle.pdgCode () == pdgProton) {
13071307 if (!particle.has_daughters ()) {
13081308 selectedparticlesMC_p[particle.mcCollisionId ()].push_back (std::make_shared<decltype (particle)>(particle));
1309+ } else {
1310+ bool isp = false ;
1311+
1312+ for (auto & dau : particle.daughters_as <aod::McParticles>()) {
1313+ if (dau.pdgCode () == pdgProton) {
1314+ isp = true ;
1315+ }
1316+ }
1317+
1318+ if (isp) {
1319+ selectedparticlesMC_p[particle.mcCollisionId ()].push_back (std::make_shared<decltype (particle)>(particle));
1320+ }
13091321 }
13101322 }
13111323 if (particle.pdgCode () == -pdgProton) {
13121324 if (!particle.has_daughters ()) {
13131325 selectedparticlesMC_antip[particle.mcCollisionId ()].push_back (std::make_shared<decltype (particle)>(particle));
1326+ } else {
1327+ bool isantip = false ;
1328+
1329+ for (auto & dau : particle.daughters_as <aod::McParticles>()) {
1330+ if (dau.pdgCode () == -pdgProton) {
1331+ isantip = true ;
1332+ }
1333+ }
1334+
1335+ if (isantip) {
1336+ selectedparticlesMC_antip[particle.mcCollisionId ()].push_back (std::make_shared<decltype (particle)>(particle));
1337+ }
13141338 }
13151339 }
13161340 }
You can’t perform that action at this time.
0 commit comments