@@ -447,6 +447,7 @@ struct NucleiHistTask {
447447 MC_recon_reg.add (" histTofNsigmaDataAl" , " TOF nSigma (^{4}He)" , HistType::kTH2F , {pAxis, {160 , -20 ., +20 ., " n#sigma_{^{4}He}" }});
448448 MC_recon_reg.add (" histTofNsigmaDataaAl" , " TOF nSigma (^{4}#bar{He})" , HistType::kTH2F , {pAxis, {160 , -20 ., +20 ., " n#sigma_{^{4}He}" }});
449449
450+ MC_DCA.add (" histEta" , " #eta" , HistType::kTH2F , {{204 , -2.01 , 2.01 }, PDGBINNING});
450451 MC_DCA.add (" histDCA_prim" , " DCA xy" , HistType::kTH3F , {ptAxis, {250 , -0.5 , 0.5 , " dca" }, PDGBINNING});
451452 MC_DCA.add (" histDCAz_prim" , " DCA z" , HistType::kTH3F , {ptAxis, {1000 , -2.0 , 2.0 , " dca" }, PDGBINNING});
452453 MC_DCA.add (" histDCA_weak" , " DCA xy" , HistType::kTH3F , {ptAxis, {250 , -0.5 , 0.5 , " dca" }, PDGBINNING});
@@ -1212,147 +1213,87 @@ struct NucleiHistTask {
12121213 const auto particle = track.mcParticle ();
12131214
12141215 int pdgbin = 0 ;
1215- switch (particle.pdgCode ()) {
1216- case +211 :
1217- pdgbin = 0 ;
1218- break ;
1219- case -211 :
1220- pdgbin = 1 ;
1221- break ;
1222- case +321 :
1223- pdgbin = 2 ;
1224- break ;
1225- case -321 :
1226- pdgbin = 3 ;
1227- break ;
1228- case +2212 :
1229- pdgbin = 4 ;
1230- break ;
1231- case -2212 :
1232- pdgbin = 5 ;
1233- break ;
1234- case +1000010020 :
1235- pdgbin = 6 ;
1236- break ;
1237- case -1000010020 :
1238- pdgbin = 7 ;
1239- break ;
1240- case +1000010030 :
1241- pdgbin = 8 ;
1242- break ;
1243- case -1000010030 :
1244- pdgbin = 9 ;
1245- break ;
1246- case +1000020030 :
1247- pdgbin = 10 ;
1248- break ;
1249- case -1000020030 :
1250- pdgbin = 11 ;
1251- break ;
1252- case +1000020040 :
1253- pdgbin = 12 ;
1254- break ;
1255- case -1000020040 :
1256- pdgbin = 13 ;
1257- break ;
1258- default :
1259- pdgbin = -1 ;
1260- break ;
1261- }
1262-
1263- if (particle.isPhysicalPrimary ()) {
1264- if ((particle.pdgCode () == 1000020030 ) || (particle.pdgCode () == -1000020030 ) || (particle.pdgCode () == 1000020040 ) || (particle.pdgCode () == -1000020040 )) {
1265- MC_DCA.fill (HIST (" histDCA_prim" ), track.pt () * 2.0 , track.dcaXY (), pdgbin);
1266- MC_DCA.fill (HIST (" histDCAz_prim" ), track.pt () * 2.0 , track.dcaZ (), pdgbin);
1267- } else {
1268- MC_DCA.fill (HIST (" histDCA_prim" ), track.pt (), track.dcaXY (), pdgbin);
1269- MC_DCA.fill (HIST (" histDCAz_prim" ), track.pt (), track.dcaZ (), pdgbin);
1270- }
1271- } else if (particle.has_mothers ()) {
1272- if ((particle.pdgCode () == 1000020030 ) || (particle.pdgCode () == -1000020030 ) || (particle.pdgCode () == 1000020040 ) || (particle.pdgCode () == -1000020040 )) {
1273- MC_DCA.fill (HIST (" histDCA_weak" ), track.pt () * 2.0 , track.dcaXY (), pdgbin);
1274- MC_DCA.fill (HIST (" histDCAz_weak" ), track.pt () * 2.0 , track.dcaZ (), pdgbin);
1275- } else {
1276- MC_DCA.fill (HIST (" histDCA_weak" ), track.pt (), track.dcaXY (), pdgbin);
1277- MC_DCA.fill (HIST (" histDCAz_weak" ), track.pt (), track.dcaZ (), pdgbin);
1278- }
1279- } else {
1280- if ((particle.pdgCode () == 1000020030 ) || (particle.pdgCode () == -1000020030 ) || (particle.pdgCode () == 1000020040 ) || (particle.pdgCode () == -1000020040 )) {
1281- MC_DCA.fill (HIST (" histDCA_mat" ), track.pt () * 2.0 , track.dcaXY (), pdgbin);
1282- MC_DCA.fill (HIST (" histDCAz_mat" ), track.pt () * 2.0 , track.dcaZ (), pdgbin);
1283- } else {
1284- MC_DCA.fill (HIST (" histDCA_mat" ), track.pt (), track.dcaXY (), pdgbin);
1285- MC_DCA.fill (HIST (" histDCAz_mat" ), track.pt (), track.dcaZ (), pdgbin);
1286- }
1287- }
1288-
1289- if (require_PhysicalPrimary_MC_reco && !particle.isPhysicalPrimary ())
1290- continue ;
1291- histTrackcuts_MC->AddBinContent (2 );
12921216 TLorentzVector lorentzVector_particle_MC{};
1293-
12941217 switch (particle.pdgCode ()) {
12951218 case +211 :
1219+ pdgbin = 0 ;
12961220 histPDG_reco->AddBinContent (1 );
12971221 lorentzVector_particle_MC.SetPtEtaPhiM (track.pt (), track.eta (), track.phi (), constants::physics::MassPiPlus);
12981222 break ;
12991223 case -211 :
1224+ pdgbin = 1 ;
13001225 histPDG_reco->AddBinContent (2 );
13011226 lorentzVector_particle_MC.SetPtEtaPhiM (track.pt (), track.eta (), track.phi (), constants::physics::MassPiPlus);
13021227 break ;
13031228 case +321 :
1229+ pdgbin = 2 ;
13041230 histPDG_reco->AddBinContent (3 );
13051231 lorentzVector_particle_MC.SetPtEtaPhiM (track.pt (), track.eta (), track.phi (), constants::physics::MassKPlus);
13061232 break ;
13071233 case -321 :
1234+ pdgbin = 3 ;
13081235 histPDG_reco->AddBinContent (4 );
13091236 lorentzVector_particle_MC.SetPtEtaPhiM (track.pt (), track.eta (), track.phi (), constants::physics::MassKPlus);
13101237 break ;
13111238 case +2212 :
1239+ pdgbin = 4 ;
13121240 histPDG_reco->AddBinContent (5 );
13131241 lorentzVector_particle_MC.SetPtEtaPhiM (track.pt (), track.eta (), track.phi (), constants::physics::MassProton);
13141242 break ;
13151243 case -2212 :
1244+ pdgbin = 5 ;
13161245 histPDG_reco->AddBinContent (6 );
13171246 lorentzVector_particle_MC.SetPtEtaPhiM (track.pt (), track.eta (), track.phi (), constants::physics::MassProton);
13181247 break ;
13191248 case +1000010020 :
1249+ pdgbin = 6 ;
13201250 histPDG_reco->AddBinContent (7 );
13211251 lorentzVector_particle_MC.SetPtEtaPhiM (track.pt (), track.eta (), track.phi (), constants::physics::MassDeuteron);
13221252 break ;
13231253 case -1000010020 :
1254+ pdgbin = 7 ;
13241255 histPDG_reco->AddBinContent (8 );
13251256 lorentzVector_particle_MC.SetPtEtaPhiM (track.pt (), track.eta (), track.phi (), constants::physics::MassDeuteron);
13261257 break ;
13271258 case +1000010030 :
1259+ pdgbin = 8 ;
13281260 histPDG_reco->AddBinContent (9 );
13291261 lorentzVector_particle_MC.SetPtEtaPhiM (track.pt (), track.eta (), track.phi (), constants::physics::MassTriton);
13301262 break ;
13311263 case -1000010030 :
1264+ pdgbin = 9 ;
13321265 histPDG_reco->AddBinContent (10 );
13331266 lorentzVector_particle_MC.SetPtEtaPhiM (track.pt (), track.eta (), track.phi (), constants::physics::MassTriton);
13341267 break ;
13351268 case +1000020030 :
1269+ pdgbin = 10 ;
13361270 histPDG_reco->AddBinContent (11 );
13371271 lorentzVector_particle_MC.SetPtEtaPhiM (track.pt () * 2.0 , track.eta (), track.phi (), constants::physics::MassHelium3);
13381272 break ;
13391273 case -1000020030 :
1274+ pdgbin = 11 ;
13401275 histPDG_reco->AddBinContent (12 );
13411276 lorentzVector_particle_MC.SetPtEtaPhiM (track.pt () * 2.0 , track.eta (), track.phi (), constants::physics::MassHelium3);
13421277 break ;
13431278 case +1000020040 :
1279+ pdgbin = 12 ;
13441280 histPDG_reco->AddBinContent (13 );
13451281 lorentzVector_particle_MC.SetPtEtaPhiM (track.pt () * 2.0 , track.eta (), track.phi (), constants::physics::MassAlpha);
13461282 break ;
13471283 case -1000020040 :
1284+ pdgbin = 13 ;
13481285 histPDG_reco->AddBinContent (14 );
13491286 lorentzVector_particle_MC.SetPtEtaPhiM (track.pt () * 2.0 , track.eta (), track.phi (), constants::physics::MassAlpha);
13501287 break ;
13511288 default :
1352- continue ;
1289+ pdgbin = - 1 ;
13531290 break ;
13541291 }
13551292
1293+ if (require_PhysicalPrimary_MC_reco && !particle.isPhysicalPrimary ())
1294+ continue ;
1295+ histTrackcuts_MC->AddBinContent (2 );
1296+
13561297 if (lorentzVector_particle_MC.Rapidity () < yMin || lorentzVector_particle_MC.Rapidity () > yMax)
13571298 continue ;
13581299 histTrackcuts_MC->AddBinContent (3 );
@@ -1512,6 +1453,117 @@ struct NucleiHistTask {
15121453 }
15131454 }
15141455 PROCESS_SWITCH (NucleiHistTask, processMCreco, " process reconstructed MC" , false );
1456+
1457+ void processMCdca (soa::Join<aod::Collisions, aod::McCollisionLabels, aod::EvSels, aod::CentFT0Cs>::iterator const & collisions, soa::Filtered<soa::Join<aod::Tracks, aod::TracksExtra, aod::TracksDCA, aod::pidTPCLfFullPi, aod::pidTOFFullPi, aod::pidTPCLfFullKa, aod::pidTOFFullKa, aod::pidTPCLfFullPr, aod::pidTOFFullPr, aod::pidTPCLfFullDe, aod::pidTOFFullDe, aod::pidTPCLfFullTr, aod::pidTOFFullTr, aod::pidTPCLfFullHe, aod::pidTOFFullHe, aod::pidTPCLfFullAl, aod::pidTOFFullAl, aod::McTrackLabels, aod::TrackSelection, aod::TrackSelectionExtension, aod::TOFSignal, aod::pidTOFmass, aod::pidTOFbeta>> const & tracks,
1458+ aod::McParticles& /* mcParticles*/ , aod::McCollisions const & /* mcCollisions*/ )
1459+ {
1460+
1461+ if (event_selection_MC_sel8 && !collisions.sel8 ())
1462+ return ;
1463+ if (!isEventSelected (collisions))
1464+ return ;
1465+
1466+ for (auto & track : tracks) {
1467+ histTrackcuts_MC->AddBinContent (1 );
1468+ const auto particle = track.mcParticle ();
1469+
1470+ int pdgbin = 0 ;
1471+ TLorentzVector lorentzVector_particle_MC{};
1472+ switch (particle.pdgCode ()) {
1473+ case +211 :
1474+ pdgbin = 0 ;
1475+ lorentzVector_particle_MC.SetPtEtaPhiM (track.pt (), track.eta (), track.phi (), constants::physics::MassPiPlus);
1476+ break ;
1477+ case -211 :
1478+ pdgbin = 1 ;
1479+ lorentzVector_particle_MC.SetPtEtaPhiM (track.pt (), track.eta (), track.phi (), constants::physics::MassPiPlus);
1480+ break ;
1481+ case +321 :
1482+ pdgbin = 2 ;
1483+ lorentzVector_particle_MC.SetPtEtaPhiM (track.pt (), track.eta (), track.phi (), constants::physics::MassKPlus);
1484+ break ;
1485+ case -321 :
1486+ pdgbin = 3 ;
1487+ lorentzVector_particle_MC.SetPtEtaPhiM (track.pt (), track.eta (), track.phi (), constants::physics::MassKPlus);
1488+ break ;
1489+ case +2212 :
1490+ pdgbin = 4 ;
1491+ lorentzVector_particle_MC.SetPtEtaPhiM (track.pt (), track.eta (), track.phi (), constants::physics::MassProton);
1492+ break ;
1493+ case -2212 :
1494+ pdgbin = 5 ;
1495+ lorentzVector_particle_MC.SetPtEtaPhiM (track.pt (), track.eta (), track.phi (), constants::physics::MassProton);
1496+ break ;
1497+ case +1000010020 :
1498+ pdgbin = 6 ;
1499+ lorentzVector_particle_MC.SetPtEtaPhiM (track.pt (), track.eta (), track.phi (), constants::physics::MassDeuteron);
1500+ break ;
1501+ case -1000010020 :
1502+ pdgbin = 7 ;
1503+ lorentzVector_particle_MC.SetPtEtaPhiM (track.pt (), track.eta (), track.phi (), constants::physics::MassDeuteron);
1504+ break ;
1505+ case +1000010030 :
1506+ pdgbin = 8 ;
1507+ lorentzVector_particle_MC.SetPtEtaPhiM (track.pt (), track.eta (), track.phi (), constants::physics::MassTriton);
1508+ break ;
1509+ case -1000010030 :
1510+ pdgbin = 9 ;
1511+ lorentzVector_particle_MC.SetPtEtaPhiM (track.pt (), track.eta (), track.phi (), constants::physics::MassTriton);
1512+ break ;
1513+ case +1000020030 :
1514+ pdgbin = 10 ;
1515+ lorentzVector_particle_MC.SetPtEtaPhiM (track.pt () * 2.0 , track.eta (), track.phi (), constants::physics::MassHelium3);
1516+ break ;
1517+ case -1000020030 :
1518+ pdgbin = 11 ;
1519+ lorentzVector_particle_MC.SetPtEtaPhiM (track.pt () * 2.0 , track.eta (), track.phi (), constants::physics::MassHelium3);
1520+ break ;
1521+ case +1000020040 :
1522+ pdgbin = 12 ;
1523+ lorentzVector_particle_MC.SetPtEtaPhiM (track.pt () * 2.0 , track.eta (), track.phi (), constants::physics::MassAlpha);
1524+ break ;
1525+ case -1000020040 :
1526+ pdgbin = 13 ;
1527+ lorentzVector_particle_MC.SetPtEtaPhiM (track.pt () * 2.0 , track.eta (), track.phi (), constants::physics::MassAlpha);
1528+ break ;
1529+ default :
1530+ pdgbin = -1 ;
1531+ break ;
1532+ }
1533+
1534+ if (lorentzVector_particle_MC.Rapidity () < yMin || lorentzVector_particle_MC.Rapidity () > yMax)
1535+ continue ;
1536+
1537+ MC_DCA.fill (HIST (" histEta" ), track.eta (), pdgbin);
1538+
1539+ if (particle.isPhysicalPrimary ()) {
1540+ if ((particle.pdgCode () == 1000020030 ) || (particle.pdgCode () == -1000020030 ) || (particle.pdgCode () == 1000020040 ) || (particle.pdgCode () == -1000020040 )) {
1541+ MC_DCA.fill (HIST (" histDCA_prim" ), track.pt () * 2.0 , track.dcaXY (), pdgbin);
1542+ MC_DCA.fill (HIST (" histDCAz_prim" ), track.pt () * 2.0 , track.dcaZ (), pdgbin);
1543+ } else {
1544+ MC_DCA.fill (HIST (" histDCA_prim" ), track.pt (), track.dcaXY (), pdgbin);
1545+ MC_DCA.fill (HIST (" histDCAz_prim" ), track.pt (), track.dcaZ (), pdgbin);
1546+ }
1547+ } else if (particle.getProcess () == 4 ) {
1548+ if ((particle.pdgCode () == 1000020030 ) || (particle.pdgCode () == -1000020030 ) || (particle.pdgCode () == 1000020040 ) || (particle.pdgCode () == -1000020040 )) {
1549+ MC_DCA.fill (HIST (" histDCA_weak" ), track.pt () * 2.0 , track.dcaXY (), pdgbin);
1550+ MC_DCA.fill (HIST (" histDCAz_weak" ), track.pt () * 2.0 , track.dcaZ (), pdgbin);
1551+ } else {
1552+ MC_DCA.fill (HIST (" histDCA_weak" ), track.pt (), track.dcaXY (), pdgbin);
1553+ MC_DCA.fill (HIST (" histDCAz_weak" ), track.pt (), track.dcaZ (), pdgbin);
1554+ }
1555+ } else if (particle.getProcess () == 23 ) {
1556+ if ((particle.pdgCode () == 1000020030 ) || (particle.pdgCode () == -1000020030 ) || (particle.pdgCode () == 1000020040 ) || (particle.pdgCode () == -1000020040 )) {
1557+ MC_DCA.fill (HIST (" histDCA_mat" ), track.pt () * 2.0 , track.dcaXY (), pdgbin);
1558+ MC_DCA.fill (HIST (" histDCAz_mat" ), track.pt () * 2.0 , track.dcaZ (), pdgbin);
1559+ } else {
1560+ MC_DCA.fill (HIST (" histDCA_mat" ), track.pt (), track.dcaXY (), pdgbin);
1561+ MC_DCA.fill (HIST (" histDCAz_mat" ), track.pt (), track.dcaZ (), pdgbin);
1562+ }
1563+ }
1564+ }
1565+ }
1566+ PROCESS_SWITCH (NucleiHistTask, processMCdca, " process MC DCA" , false );
15151567};
15161568
15171569// ***********************************************************************************
0 commit comments