@@ -2236,9 +2236,12 @@ struct StrangenessInJets {
22362236 if (!collision.selection_bit (o2::aod::evsel::kIsGoodZvtxFT0vsPV ))
22372237 continue ;
22382238
2239+ const auto & v0sPerColl = fullV0s.sliceBy (perCollisionV0, collision.globalIndex ());
2240+ const auto & tracksPerColl = mcTracks.sliceBy (perCollisionTrk, collision.globalIndex ());
2241+
22392242 // Loop over reconstructed tracks
22402243 int id (-1 );
2241- for (auto const & track : perCollisionTrk ) {
2244+ for (auto const & track : tracksPerColl ) {
22422245 id++;
22432246
22442247 // Ensure tracks have corresponding MC particles
@@ -2268,7 +2271,7 @@ struct StrangenessInJets {
22682271 for (const auto & jet : jets) {
22692272
22702273 // Jet must be fully contained in the acceptance
2271- if ((std::fabs (jet.eta ()) + rJet) > (maxEta - deltaEtaEdge))
2274+ if ((std::fabs (jet.eta ()) + rJet) > (etaMax - deltaEtaEdge))
22722275 continue ;
22732276
22742277 // Jet pt must be larger than threshold
@@ -2288,7 +2291,7 @@ struct StrangenessInJets {
22882291 // Loop over jet constituents
22892292 for (const auto & particle : jetConstituents) {
22902293
2291- auto const & track = perCollisionTrk .iteratorAt (particle.user_index ());
2294+ auto const & track = mcTracks .iteratorAt (particle.user_index ());
22922295 const auto mcparticle = track.mcParticle ();
22932296 if (std::abs (mcparticle.pdgCode ()) != PDG_t::kPiPlus )
22942297 continue ;
@@ -2308,8 +2311,8 @@ struct StrangenessInJets {
23082311 if (static_cast <int >(pions.size ()) < minimumSize)
23092312 continue ;
23102313
2311- for (int i=0 ; i < pions.size () ; i++) {
2312- for (int j=i+1 ; j < pions.size () ; j++) {
2314+ for (int i=0 ; i < static_cast < int >( pions.size () ) ; i++) {
2315+ for (int j=i+1 ; j < static_cast < int >( pions.size () ) ; j++) {
23132316
23142317 if (pions[i].idParent != pions[j].idParent )
23152318 continue ;
@@ -2345,7 +2348,7 @@ struct StrangenessInJets {
23452348
23462349 TVector3 v0dir (v0.px (), v0.py (), v0.pz ());
23472350 float deltaEtaJet = v0dir.Eta () - selectedJet[i].Eta ();
2348- float deltaPhiJet = getDeltaPhi (v0dir.Phi (), selectedJet[i].Phi ());
2351+ float deltaPhiJet = ParticlePositionWithRespectToJet:: getDeltaPhi (v0dir.Phi (), selectedJet[i].Phi ());
23492352 float deltaRjet = std::sqrt (deltaEtaJet * deltaEtaJet + deltaPhiJet * deltaPhiJet);
23502353
23512354 if (deltaRjet < rJet && passedK0ShortSelection (v0, pos, neg))
0 commit comments