@@ -179,8 +179,8 @@ struct nucleiInJets {
179179 static constexpr int PDGTriton = 1000010030 ;
180180 static constexpr int PDGHelium = 1000020030 ;
181181
182- using EventTable = soa::Join<aod::Collisions , aod::EvSels, aod::CentFT0Ms, aod::CentFV0As, aod::CentFT0Cs>;
183- using EventTableMC = soa::Join<EventTable, aod::McCollisionLabels >;
182+ using EventTable = soa::Join<aod::JetCollisions , aod::EvSels, aod::CentFT0Ms, aod::CentFV0As, aod::CentFT0Cs>;
183+ using EventTableMC = soa::Join<EventTable, aod::JMcCollisionLbs >;
184184 using TrackCandidates = soa::Join<aod::Tracks, aod::TracksExtra, aod::TracksDCA, aod::TrackSelection, aod::pidTPCFullPi, aod::pidTPCFullKa,
185185 aod::pidTPCFullPr, aod::pidTPCFullDe, aod::pidTPCFullHe, aod::pidTPCFullTr, aod::pidTOFFullPi, aod::pidTOFFullKa,
186186 aod::pidTOFFullPr, aod::pidTOFFullDe, aod::pidTOFFullTr, aod::pidTOFFullHe, aod::pidTOFbeta, aod::TOFSignal>;
@@ -192,7 +192,10 @@ struct nucleiInJets {
192192 aod::pidTOFFullKa, aod::pidTOFFullPr, aod::pidTOFFullDe, aod::pidTOFFullTr, aod::pidTOFFullHe,
193193 aod::TOFSignal /* , aod::McTrackLabels*/ >;
194194
195- using TrackCandidatesIncMC = soa::Join<TrackCandidatesMC, aod::McTrackLabels>;
195+ using TrackCandidatesIncMC = soa::Join<aod::JTracks, aod::JTrackPIs, aod::JMcTrackLbs, aod::TracksExtra, aod::TracksDCA, aod::TrackSelection, aod::pidTPCFullPi, aod::pidTPCFullKa,
196+ aod::pidTPCFullPr, aod::pidTPCFullDe, aod::pidTPCFullHe, aod::pidTPCFullTr, aod::pidTOFFullPi,
197+ aod::pidTOFFullKa, aod::pidTOFFullPr, aod::pidTOFFullDe, aod::pidTOFFullTr, aod::pidTOFFullHe,
198+ aod::TOFSignal>;
196199
197200 Filter jetCuts = aod::jet::pt > cfgjetPtMin&& aod::jet::r == nround(cfgjetR.node() * 100 .0f );
198201
@@ -207,7 +210,6 @@ struct nucleiInJets {
207210 OutputObj<ZorroSummary> zorroSummary{" zorroSummary" };
208211 Service<o2::ccdb::BasicCCDBManager> ccdb;
209212 TRandom3 randUniform;
210-
211213 void init (o2::framework::InitContext&)
212214 {
213215
@@ -1341,11 +1343,13 @@ struct nucleiInJets {
13411343 }
13421344 }
13431345
1344- void processDataInc (EventTable::iterator const & coll, TrackCandidates const & tracks)
1346+ void processDataInc (EventTable::iterator const & coll, soa::Join<aod::JetTracks, aod::JTrackPIs> const & tracks, TrackCandidates const & )
13451347 {
13461348 jetHist.fill (HIST (" hNEventsInc" ), 0.5 );
1347- if (!coll.sel8 ())
1349+
1350+ if (!jetderiveddatautilities::selectCollision (coll, jetderiveddatautilities::initialiseEventSelectionBits (" sel8" )))
13481351 return ;
1352+
13491353 jetHist.fill (HIST (" hNEventsInc" ), 1.5 );
13501354 if (std::abs (coll.posZ ()) > 10 ) // bad vertex
13511355 return ;
@@ -1365,7 +1369,8 @@ struct nucleiInJets {
13651369 centrality = -999 ;
13661370 }
13671371
1368- for (const auto & trk : tracks) {
1372+ for (const auto & track : tracks) {
1373+ auto trk = track.track_as <TrackCandidates>();
13691374 if (!isTrackSelected (trk)) {
13701375 continue ;
13711376 }
@@ -1736,8 +1741,8 @@ struct nucleiInJets {
17361741 bool isTpcPassed (true );
17371742 bool isTof (completeTrack.hasTOF ());
17381743 bool isTOFAndTPCPreSel (completeTrack.hasTOF () &&
1739- (completeTrack.tpcNSigmaPr () < cfgnTPCPIDPrTOF || completeTrack.tpcNSigmaDe () < cfgnTPCPIDDeTOF ||
1740- completeTrack.tpcNSigmaHe () < cfgnTPCPIDHeTOF || completeTrack.tpcNSigmaTr () < cfgnTPCPIDTrTOF));
1744+ (std::abs ( completeTrack.tpcNSigmaPr ()) < cfgnTPCPIDPrTOF || std::abs ( completeTrack.tpcNSigmaDe () ) < cfgnTPCPIDDeTOF ||
1745+ std::abs ( completeTrack.tpcNSigmaHe ()) < cfgnTPCPIDHeTOF || std::abs ( completeTrack.tpcNSigmaTr () ) < cfgnTPCPIDTrTOF));
17411746
17421747 bool jetFlag = false ;
17431748 bool jetFlagPerpCone = false ;
@@ -1755,7 +1760,6 @@ struct nucleiInJets {
17551760 if (RPerpCone1 < cfgjetR || RPerpCone2 < cfgjetR)
17561761 jetFlagPerpCone = true ;
17571762 } else {
1758-
17591763 for (std::size_t iDJet = 0 ; iDJet < mcdJetPt.size (); iDJet++) {
17601764 double delPhi = TVector2::Phi_mpi_pi (mcdJetPhi[iDJet] - track.phi ());
17611765 double delEta = mcdJetEta[iDJet] - track.eta ();
@@ -1958,16 +1962,15 @@ struct nucleiInJets {
19581962 } // jet constituents
19591963 } // process
19601964
1961- void processRecInc (EventTableMC::iterator const & coll, TrackCandidatesIncMC const & tracks, aod::McParticles const & mcParticles )
1965+ void processRecInc (EventTableMC::iterator const & coll, TrackCandidatesIncMC const & tracks, aod::JetParticles const & particleTracks, aod::JMcCollisions const & )
19621966 {
1967+
19631968 jetHist.fill (HIST (" recInc/eventStat" ), 0.5 );
1964- if (!coll. sel8 ()) {
1969+ if (!jetderiveddatautilities::selectCollision ( coll, jetderiveddatautilities::initialiseEventSelectionBits ( " sel8 " )))
19651970 return ;
1966- }
19671971 jetHist.fill (HIST (" recInc/eventStat" ), 1.5 );
19681972 if (std::abs (coll.posZ ()) > 10 ) // bad vertex
19691973 return ;
1970-
19711974 jetHist.fill (HIST (" recInc/vertexZ" ), coll.posZ ());
19721975 jetHist.fill (HIST (" recInc/eventStat" ), 2.5 );
19731976
@@ -1994,13 +1997,11 @@ struct nucleiInJets {
19941997 continue ;
19951998 if (std::fabs (track.eta ()) > cfgtrkMaxEta)
19961999 continue ;
1997-
1998- auto mcTrack = track.mcParticle_as <aod::McParticles>();
2000+ auto mcTrack = track.mcParticle_as <o2::aod::JMcParticles>();
19992001 if (!mcTrack.isPhysicalPrimary ())
20002002 continue ;
2001-
20022003 bool isTOFAndTPCPreSel (track.hasTOF () &&
2003- (track.tpcNSigmaPr () < cfgnTPCPIDPrTOF || track.tpcNSigmaDe () < cfgnTPCPIDDeTOF));
2004+ (std::abs ( track.tpcNSigmaPr ()) < cfgnTPCPIDPrTOF || std::abs ( track.tpcNSigmaDe () ) < cfgnTPCPIDDeTOF));
20042005
20052006 if (mapPDGToValue (mcTrack.pdgCode ()) != 0 ) {
20062007 jetHist.fill (HIST (" recInc/pt/PtParticleTypeTPC" ), mcTrack.pt (), mapPDGToValue (mcTrack.pdgCode ()), centrality);
@@ -2015,7 +2016,8 @@ struct nucleiInJets {
20152016 } // track
20162017
20172018 // loop over particles
2018- for (const auto & mcParticle : mcParticles) {
2019+ auto mcParticles_per_coll = particleTracks.sliceBy (perMCCol, coll.mcCollision ().globalIndex ());
2020+ for (const auto & mcParticle : mcParticles_per_coll) {
20192021 if (!mcParticle.isPhysicalPrimary ())
20202022 continue ;
20212023 if (std::fabs (mcParticle.eta ()) > cfgtrkMaxEta)
0 commit comments