@@ -178,6 +178,7 @@ struct nucleiInJets {
178178 Configurable<std::string> cfgSkim{" cfgSkim" , " fHighFt0Mult" , " Configurable for skimming" };
179179 Configurable<bool > sel8Coll{" sel8Coll" , true , " sel8Coll for collisions" };
180180 Configurable<bool > selNoSameBunchPileup{" selNoSameBunchPileup" , false , " selNoSameBunchPileup for collisions" };
181+ Configurable<double > cfgMaxZVertex{" cfgMaxZVertex" , 10.0 , " Maximum Z vertex selection in cm" };
181182 Configurable<bool > selIsGoodZvtxFT0vsPV{" selIsGoodZvtxFT0vsPV" , false , " selIsGoodZvtxFT0vsPV for collisions" };
182183
183184 // using EventTable = soa::Join<aod::JetCollisions, aod::EvSels, aod::CentFT0Ms, aod::CentFV0As, aod::CentFT0Cs>;
@@ -537,6 +538,14 @@ struct nucleiInJets {
537538 jetHist.add <TH2>(" tracks/helium/h2TofNsigmaHeliumVsPt" , " h2TofNsigmaHeliumVsPt; TofNsigma; #it{p}_{T}/z (GeV)" , HistType::kTH2F , {{100 , -5 , 5 }, {50 , 0 ., 5 .}});
538539 jetHist.add <TH2>(" tracks/antiHelium/h2TofNsigmaantiHeliumVsPt" , " h2TofNsigmaantiHeliumVsPt; TofNsigma; #it{p}_{T}/z (GeV)" , HistType::kTH2F , {{100 , -5 , 5 }, {50 , 0 ., 5 .}});
539540
541+ // tracksInc/dcaxy/rec histograms for each particle type
542+ std::vector<std::string> particles = {" proton" , " antiProton" , " deuteron" , " antiDeuteron" , " triton" , " antiTriton" , " helium" , " antiHelium" };
543+ for (const auto & particle : particles) {
544+ jetHist.add <TH3>((" tracksInc/dcaxy/rec/" + particle + " /tpcPtVsDcaxy3D" ).c_str (), " pT vs Dcaxy vs Centrality" , HistType::kTH3F , {{100 , 0 .f , 10 .f }, {100 , 0 , 100 }, dcaxyAxis});
545+ jetHist.add <TH3>((" tracksInc/dcaxy/rec/" + particle + " /tpcPtVsDcaxy3DPIDVeto" ).c_str (), " pT vs Dcaxy vs Centrality (PID Veto)" , HistType::kTH3F , {{100 , 0 .f , 10 .f }, {100 , 0 , 100 }, dcaxyAxis});
546+ jetHist.add <TH3>((" tracksInc/dcaxy/rec/" + particle + " /tpcPtVsDcaxy3DPIDTOF" ).c_str (), " pT vs Dcaxy vs Centrality (PID TOF)" , HistType::kTH3F , {{100 , 0 .f , 10 .f }, {100 , 0 , 100 }, dcaxyAxis});
547+ }
548+
540549 if (isMC) {
541550 // inc
542551 jetHist.add <TH1>(" recInc/eventStat" , " Event statistics (inclusive)" , HistType::kTH1F , {{6 , 0 .f , 6 .f }});
@@ -1478,7 +1487,7 @@ struct nucleiInJets {
14781487 }
14791488 jetHist.fill (HIST (" hNEvents" ), 1.5 );
14801489 }
1481- if (std::abs (collision.posZ ()) > 10 )
1490+ if (std::abs (collision.posZ ()) > cfgMaxZVertex )
14821491 return ;
14831492 jetHist.fill (HIST (" hNEvents" ), 2.5 );
14841493 if (!jetderiveddatautilities::selectCollision (collision, jetderiveddatautilities::initialiseEventSelectionBits (" sel8" )))
@@ -1542,7 +1551,7 @@ struct nucleiInJets {
15421551 }
15431552 jetHist.fill (HIST (" hNEvents" ), 1.5 );
15441553 }
1545- if (std::abs (collision.posZ ()) > 10 )
1554+ if (std::abs (collision.posZ ()) > cfgMaxZVertex )
15461555 return ;
15471556 jetHist.fill (HIST (" hNEvents" ), 2.5 );
15481557
@@ -1637,20 +1646,131 @@ struct nucleiInJets {
16371646 jetHist.fill (HIST (" hNEventsIncVsCent" ), coll.posZ (), centrality);
16381647 for (const auto & track : tracks) {
16391648 auto trk = track.track_as <TrackCandidates>();
1640- if (!isTrackSelected (trk)) {
1649+ if (!isTrackSelectedWithoutDcaxy (trk)) {
16411650 continue ;
16421651 }
16431652
16441653 auto rapidityData = [&](float m2z) {
16451654 const float rap = trk.rapidity (m2z);
1646- return rap > std::abs (cfgtrkMaxRap);
1655+ return rap < std::abs (cfgtrkMaxRap);
16471656 };
16481657
16491658 auto prRapidityWithinRange = rapidityData (o2::constants::physics::MassProton);
16501659 auto deRapidityWithinRange = rapidityData (o2::constants::physics::MassDeuteron);
16511660
16521661 if (std::fabs (trk.eta ()) > cfgtrkMaxEta)
16531662 continue ;
1663+
1664+ bool hasTOF = trk.hasTOF ();
1665+
1666+ if (trk.sign () > 0 ) { // particles
1667+
1668+ if (std::abs (trk.tpcNSigmaPr ()) < cfgnTPCPIDPr) {
1669+ jetHist.fill (HIST (" tracksInc/dcaxy/rec/proton/tpcPtVsDcaxy3D" ), trk.pt (), centrality, trk.dcaXY ());
1670+ if (useTOFVeto && hasTOF) {
1671+ if (std::abs (trk.tofNSigmaPr ()) < cfgnTPCPIDPrTOF) {
1672+ jetHist.fill (HIST (" tracksInc/dcaxy/rec/proton/tpcPtVsDcaxy3DPIDVeto" ), trk.pt (), centrality, trk.dcaXY ());
1673+ jetHist.fill (HIST (" tracksInc/dcaxy/rec/proton/tpcPtVsDcaxy3DPIDTOF" ), trk.pt (), centrality, trk.dcaXY ());
1674+ }
1675+ } else {
1676+ jetHist.fill (HIST (" tracksInc/dcaxy/rec/proton/tpcPtVsDcaxy3DPIDVeto" ), trk.pt (), centrality, trk.dcaXY ());
1677+ }
1678+ } // proton
1679+
1680+ if (std::abs (trk.tpcNSigmaDe ()) < cfgnTPCPIDDe) {
1681+ jetHist.fill (HIST (" tracksInc/dcaxy/rec/deuteron/tpcPtVsDcaxy3D" ), trk.pt (), centrality, trk.dcaXY ());
1682+ if (useTOFVeto && hasTOF) {
1683+ if (std::abs (trk.tofNSigmaDe ()) < cfgnTPCPIDDeTOF) {
1684+ jetHist.fill (HIST (" tracksInc/dcaxy/rec/deuteron/tpcPtVsDcaxy3DPIDVeto" ), trk.pt (), centrality, trk.dcaXY ());
1685+ jetHist.fill (HIST (" tracksInc/dcaxy/rec/deuteron/tpcPtVsDcaxy3DPIDTOF" ), trk.pt (), centrality, trk.dcaXY ());
1686+ }
1687+ } else {
1688+ jetHist.fill (HIST (" tracksInc/dcaxy/rec/deuteron/tpcPtVsDcaxy3DPIDVeto" ), trk.pt (), centrality, trk.dcaXY ());
1689+ }
1690+ } // Deuteron
1691+
1692+ if (std::abs (trk.tpcNSigmaTr ()) < cfgnTPCPIDTr) {
1693+ jetHist.fill (HIST (" tracksInc/dcaxy/rec/triton/tpcPtVsDcaxy3D" ), trk.pt (), centrality, trk.dcaXY ());
1694+ if (useTOFVeto && hasTOF) {
1695+ if (std::abs (trk.tofNSigmaTr ()) < cfgnTPCPIDTrTOF) {
1696+ jetHist.fill (HIST (" tracksInc/dcaxy/rec/triton/tpcPtVsDcaxy3DPIDVeto" ), trk.pt (), centrality, trk.dcaXY ());
1697+ jetHist.fill (HIST (" tracksInc/dcaxy/rec/triton/tpcPtVsDcaxy3DPIDTOF" ), trk.pt (), centrality, trk.dcaXY ());
1698+ }
1699+ } else {
1700+ jetHist.fill (HIST (" tracksInc/dcaxy/rec/triton/tpcPtVsDcaxy3DPIDVeto" ), trk.pt (), centrality, trk.dcaXY ());
1701+ }
1702+ } // Triton
1703+
1704+ if (std::abs (trk.tpcNSigmaHe ()) < cfgnTPCPIDHe) {
1705+ jetHist.fill (HIST (" tracksInc/dcaxy/rec/helium/tpcPtVsDcaxy3D" ), trk.pt (), centrality, trk.dcaXY ());
1706+ if (useTOFVeto && hasTOF) {
1707+ if (std::abs (trk.tofNSigmaHe ()) < cfgnTPCPIDHeTOF) {
1708+ jetHist.fill (HIST (" tracksInc/dcaxy/rec/helium/tpcPtVsDcaxy3DPIDVeto" ), trk.pt (), centrality, trk.dcaXY ());
1709+ jetHist.fill (HIST (" tracksInc/dcaxy/rec/helium/tpcPtVsDcaxy3DPIDTOF" ), trk.pt (), centrality, trk.dcaXY ());
1710+ }
1711+ } else {
1712+ jetHist.fill (HIST (" tracksInc/dcaxy/rec/helium/tpcPtVsDcaxy3DPIDVeto" ), trk.pt (), centrality, trk.dcaXY ());
1713+ }
1714+ } // Helium
1715+
1716+ } else { // antiparticles
1717+
1718+ if (std::abs (trk.tpcNSigmaPr ()) < cfgnTPCPIDPr) {
1719+ jetHist.fill (HIST (" tracksInc/dcaxy/rec/antiProton/tpcPtVsDcaxy3D" ), trk.pt (), centrality, trk.dcaXY ());
1720+ if (useTOFVeto && hasTOF) {
1721+ if (std::abs (trk.tofNSigmaPr ()) < cfgnTPCPIDPrTOF) {
1722+ jetHist.fill (HIST (" tracksInc/dcaxy/rec/antiProton/tpcPtVsDcaxy3DPIDVeto" ), trk.pt (), centrality, trk.dcaXY ());
1723+ jetHist.fill (HIST (" tracksInc/dcaxy/rec/antiProton/tpcPtVsDcaxy3DPIDTOF" ), trk.pt (), centrality, trk.dcaXY ());
1724+ }
1725+ } else {
1726+ jetHist.fill (HIST (" tracksInc/dcaxy/rec/antiProton/tpcPtVsDcaxy3DPIDVeto" ), trk.pt (), centrality, trk.dcaXY ());
1727+ }
1728+ } // proton
1729+
1730+ if (std::abs (trk.tpcNSigmaDe ()) < cfgnTPCPIDDe) {
1731+ jetHist.fill (HIST (" tracksInc/dcaxy/rec/antiDeuteron/tpcPtVsDcaxy3D" ), trk.pt (), centrality, trk.dcaXY ());
1732+ if (useTOFVeto && hasTOF) {
1733+ if (std::abs (trk.tofNSigmaDe ()) < cfgnTPCPIDDeTOF) {
1734+ jetHist.fill (HIST (" tracksInc/dcaxy/rec/antiDeuteron/tpcPtVsDcaxy3DPIDVeto" ), trk.pt (), centrality, trk.dcaXY ());
1735+ jetHist.fill (HIST (" tracksInc/dcaxy/rec/antiDeuteron/tpcPtVsDcaxy3DPIDTOF" ), trk.pt (), centrality, trk.dcaXY ());
1736+ }
1737+ } else {
1738+ jetHist.fill (HIST (" tracksInc/dcaxy/rec/antiDeuteron/tpcPtVsDcaxy3DPIDVeto" ), trk.pt (), centrality, trk.dcaXY ());
1739+ }
1740+ } // Deuteron
1741+
1742+ if (std::abs (trk.tpcNSigmaTr ()) < cfgnTPCPIDTr) {
1743+ jetHist.fill (HIST (" tracksInc/dcaxy/rec/antiTriton/tpcPtVsDcaxy3D" ), trk.pt (), centrality, trk.dcaXY ());
1744+ if (useTOFVeto && hasTOF) {
1745+ if (std::abs (trk.tofNSigmaTr ()) < cfgnTPCPIDTrTOF) {
1746+ jetHist.fill (HIST (" tracksInc/dcaxy/rec/antiTriton/tpcPtVsDcaxy3DPIDVeto" ), trk.pt (), centrality, trk.dcaXY ());
1747+ jetHist.fill (HIST (" tracksInc/dcaxy/rec/antiTriton/tpcPtVsDcaxy3DPIDTOF" ), trk.pt (), centrality, trk.dcaXY ());
1748+ }
1749+ } else {
1750+ jetHist.fill (HIST (" tracksInc/dcaxy/rec/antiTriton/tpcPtVsDcaxy3DPIDVeto" ), trk.pt (), centrality, trk.dcaXY ());
1751+ }
1752+ } // Triton
1753+
1754+ if (std::abs (trk.tpcNSigmaHe ()) < cfgnTPCPIDHe) {
1755+ jetHist.fill (HIST (" tracksInc/dcaxy/rec/antiHelium/tpcPtVsDcaxy3D" ), trk.pt (), centrality, trk.dcaXY ());
1756+ if (useTOFVeto && hasTOF) {
1757+ if (std::abs (trk.tofNSigmaHe ()) < cfgnTPCPIDHeTOF) {
1758+ jetHist.fill (HIST (" tracksInc/dcaxy/rec/antiHelium/tpcPtVsDcaxy3DPIDVeto" ), trk.pt (), centrality, trk.dcaXY ());
1759+ jetHist.fill (HIST (" tracksInc/dcaxy/rec/antiHelium/tpcPtVsDcaxy3DPIDTOF" ), trk.pt (), centrality, trk.dcaXY ());
1760+ }
1761+ } else {
1762+ jetHist.fill (HIST (" tracksInc/dcaxy/rec/antiHelium/tpcPtVsDcaxy3DPIDVeto" ), trk.pt (), centrality, trk.dcaXY ());
1763+ }
1764+ } // Helium
1765+
1766+ } // antiparticles
1767+
1768+ // DCAxy selection for rest of the analysis
1769+ if (std::fabs (trk.dcaXY ()) > cfgMaxDCArToPVcut && !useDcaxyPtDepCut)
1770+ continue ;
1771+ if (std::fabs (trk.dcaXY ()) > dcaXYPtDepCut (trk.pt ()) && useDcaxyPtDepCut)
1772+ continue ;
1773+
16541774 if (trk.sign () > 0 ) { // particle info
16551775 if (useTOFNsigmaPreSel && trk.hasTOF ()) {
16561776 if (std::abs (trk.tofNSigmaPr ()) < cfgnTPCPIDPrTOF && (!useRapidityCutForPID || prRapidityWithinRange)) {
@@ -1786,7 +1906,7 @@ struct nucleiInJets {
17861906 jetHist.fill (HIST (" mcpJet/eventStat" ), 0.5 );
17871907 jetHist.fill (HIST (" mcpJet/eventStat" ), 1.5 );
17881908
1789- if (std::abs (collision.posZ ()) > 10 ) // bad vertex
1909+ if (std::abs (collision.posZ ()) > cfgMaxZVertex ) // bad vertex
17901910 return ;
17911911
17921912 jetHist.fill (HIST (" mcpJet/eventStat" ), 2.5 );
@@ -1915,7 +2035,7 @@ struct nucleiInJets {
19152035 soa::Join<aod::JetTracks, aod::JTrackPIs, aod::JMcTrackLbs> const & tracks,
19162036 JetMCPartTable const &, TrackCandidatesMC const &, aod::JetParticles const & particleTracks, aod::JMcCollisions const &)
19172037 {
1918- if (std::abs (collision.posZ ()) > 10 )
2038+ if (std::abs (collision.posZ ()) > cfgMaxZVertex )
19192039 return ;
19202040 if (!jetderiveddatautilities::selectCollision (collision, jetderiveddatautilities::initialiseEventSelectionBits (" sel8" )))
19212041 return ;
@@ -2137,7 +2257,7 @@ struct nucleiInJets {
21372257 if (!jetderiveddatautilities::selectCollision (recocoll, jetderiveddatautilities::initialiseEventSelectionBits (" sel8" )))
21382258 return ;
21392259 }
2140- if (std::abs (collision.posZ ()) > 10 )
2260+ if (std::abs (collision.posZ ()) > cfgMaxZVertex )
21412261 return ;
21422262 jetHist.fill (HIST (" genmatched/vertexZ" ), collision.posZ ());
21432263
@@ -2314,8 +2434,9 @@ struct nucleiInJets {
23142434 if (std::fabs (track.dcaXY ()) > dcaXYPtDepCut (track.pt ()) && useDcaxyPtDepCut)
23152435 continue ;
23162436
2317- auto mass = TDatabasePDG::Instance ()->GetParticle (abs (mcTrack.pdgCode ()))->Mass ();
2318- auto rapidity = RecoDecay::y (std::array{track.px (), track.py (), track.pz ()}, mass);
2437+ // auto mass = TDatabasePDG::Instance()->GetParticle(abs(mcTrack.pdgCode()))->Mass();
2438+ // auto rapidity = RecoDecay::y(std::array{track.px(), track.py(), track.pz()}, mass);
2439+ auto rapidity = mcTrack.y ();
23192440
23202441 if (std::abs (rapidity) > cfgtrkMaxRap)
23212442 continue ;
0 commit comments