@@ -110,15 +110,15 @@ struct JetShapeTask {
110110 {" ptResolution" , " ptResolution" , {HistType::kTH2F , {{nBinsPt, 0 , ptMax}, {100 , -1.0 , +1.0 }}}},
111111 {" mcCentralityReco" , " mcCentralityReco" , {HistType::kTH1F , {{100 , 0 , 100 }}}},
112112 {" mcCentralitySim" , " mcCentralitySim" , {HistType::kTH1F , {{100 , 0 , 100 }}}},
113- {" ptHistogramPion" , " ptHistogramPion" , {HistType::kTH1F , {{nBinsPt, 0 , ptMax}}}},
114- {" ptHistogramKaon" , " ptHistogramKaon" , {HistType::kTH1F , {{nBinsPt, 0 , ptMax}}}},
115- {" ptHistogramProton" , " ptHistogramProton" , {HistType::kTH1F , {{nBinsPt, 0 , ptMax}}}},
116- {" ptHistogramPionTof" , " ptHistogramPionTof" , {HistType::kTH1F , {{nBinsPt, 0 , ptMax}}}},
117- {" ptHistogramKaonTof" , " ptHistogramKaonTof" , {HistType::kTH1F , {{nBinsPt, 0 , ptMax}}}},
118- {" ptHistogramProtonTof" , " ptHistogramProtonTof" , {HistType::kTH1F , {{nBinsPt, 0 , ptMax}}}},
119- {" ptGeneratedPion" , " ptGeneratedPion" , {HistType::kTH1F , {{nBinsPt, 0 , ptMax}}}},
120- {" ptGeneratedKaon" , " ptGeneratedKaon" , {HistType::kTH1F , {{nBinsPt, 0 , ptMax}}}},
121- {" ptGeneratedProton" , " ptGeneratedProton" , {HistType::kTH1F , {{nBinsPt, 0 , ptMax}}}}}};
113+ {" ptHistogramPion" , " ptHistogramPion" , {HistType::kTHnSparseD , {{nBinsPt, 0 , ptMax}, {nBinsJetPt, jetPtMinForCut, jetPtMaxForCut}, {nBinsCentrality, centralityMinForCut, centralityMaxForCut }}}},
114+ {" ptHistogramKaon" , " ptHistogramKaon" , {HistType::kTHnSparseD , {{nBinsPt, 0 , ptMax}, {nBinsJetPt, jetPtMinForCut, jetPtMaxForCut}, {nBinsCentrality, centralityMinForCut, centralityMaxForCut }}}},
115+ {" ptHistogramProton" , " ptHistogramProton" , {HistType::kTHnSparseD , {{nBinsPt, 0 , ptMax}, {nBinsJetPt, jetPtMinForCut, jetPtMaxForCut}, {nBinsCentrality, centralityMinForCut, centralityMaxForCut }}}},
116+ {" ptHistogramPionTof" , " ptHistogramPionTof" , {HistType::kTHnSparseD , {{nBinsPt, 0 , ptMax}, {nBinsJetPt, jetPtMinForCut, jetPtMaxForCut}, {nBinsCentrality, centralityMinForCut, centralityMaxForCut }}}},
117+ {" ptHistogramKaonTof" , " ptHistogramKaonTof" , {HistType::kTHnSparseD , {{nBinsPt, 0 , ptMax}, {nBinsJetPt, jetPtMinForCut, jetPtMaxForCut}, {nBinsCentrality, centralityMinForCut, centralityMaxForCut }}}},
118+ {" ptHistogramProtonTof" , " ptHistogramProtonTof" , {HistType::kTHnSparseD , {{nBinsPt, 0 , ptMax}, {nBinsJetPt, jetPtMinForCut, jetPtMaxForCut}, {nBinsCentrality, centralityMinForCut, centralityMaxForCut }}}},
119+ {" ptGeneratedPion" , " ptGeneratedPion" , {HistType::kTHnSparseD , {{nBinsPt, 0 , ptMax}, {nBinsJetPt, jetPtMinForCut, jetPtMaxForCut}, {nBinsCentrality, centralityMinForCut, centralityMaxForCut }}}},
120+ {" ptGeneratedKaon" , " ptGeneratedKaon" , {HistType::kTHnSparseD , {{nBinsPt, 0 , ptMax}, {nBinsJetPt, jetPtMinForCut, jetPtMaxForCut}, {nBinsCentrality, centralityMinForCut, centralityMaxForCut }}}},
121+ {" ptGeneratedProton" , " ptGeneratedProton" , {HistType::kTHnSparseD , {{nBinsPt, 0 , ptMax}, {nBinsJetPt, jetPtMinForCut, jetPtMaxForCut}, {nBinsCentrality, centralityMinForCut, centralityMaxForCut }}}}}};
122122
123123 Configurable<float > vertexZCut{" vertexZCut" , 10 .0f , " Accepted z-vertex range" };
124124
@@ -204,6 +204,7 @@ struct JetShapeTask {
204204 Filter mcCollisionFilter = nabs(aod::jmccollision::posZ) < vertexZCut;
205205
206206 Preslice<soa::Filtered<aod::ChargedMCParticleLevelJets>> perMcCollisionJets = aod::jet::mcCollisionId;
207+ Preslice<aod::McParticles> perMcCollision = aod::mcparticle::mcCollisionId;
207208
208209 void processJetShape (soa::Filtered<soa::Join<aod::JetCollisions, aod::BkgChargedRhos>>::iterator const & collision, aod::JetTracks const & tracks, soa::Join<aod::ChargedJets, aod::ChargedJetConstituents> const & jets)
209210 {
@@ -282,7 +283,7 @@ struct JetShapeTask {
282283 }
283284 PROCESS_SWITCH (JetShapeTask, processJetShape, " JetShape" , false );
284285
285- void processProductionRatio (soa::Filtered<aod::JetCollisions>::iterator const & collision, soa::Join<aod::JetTracks, aod::pidTPCFullPi, aod::pidTOFFullPi, aod::pidTPCFullPr, aod::pidTOFFullPr, aod::TracksExtra, aod::TracksDCA, aod::pidTOFbeta, aod::pidTOFmass> const & tracks, soa::Join<aod::ChargedJets, aod::ChargedJetConstituents> const & jets)
286+ void processProductionRatio (soa::Filtered<soa::Join< aod::JetCollisions, aod::BkgChargedRhos> >::iterator const & collision, soa::Join<aod::JetTracks, aod::pidTPCFullPi, aod::pidTOFFullPi, aod::pidTPCFullPr, aod::pidTOFFullPr, aod::TracksExtra, aod::TracksDCA, aod::pidTOFbeta, aod::pidTOFmass> const & tracks, soa::Join<aod::ChargedJets, aod::ChargedJetConstituents> const & jets)
286287 {
287288 if (!jetderiveddatautilities::selectCollision (collision, eventSelectionBits)) {
288289 return ;
@@ -295,9 +296,8 @@ struct JetShapeTask {
295296 continue ;
296297 }
297298
298- registry.fill (HIST (" jetPt" ), jet.pt ());
299- registry.fill (HIST (" jetEta" ), jet.eta ());
300- registry.fill (HIST (" jetPhi" ), jet.phi ());
299+ // Get underlying event subtracted jet.pt() as ptCorr
300+ float ptCorr = jet.pt () - collision.rho () * jet.area ();
301301
302302 // tracks conditions
303303 for (const auto & track : tracks) {
@@ -325,6 +325,13 @@ struct JetShapeTask {
325325 if (track.itsNCls () < nclItsMin)
326326 continue ;
327327
328+ registry.fill (HIST (" jetPt" ), jet.pt ());
329+ registry.fill (HIST (" ptCorr" ), ptCorr);
330+ registry.fill (HIST (" area" ), jet.area ());
331+ registry.fill (HIST (" rho" ), collision.rho ());
332+ registry.fill (HIST (" jetEta" ), jet.eta ());
333+ registry.fill (HIST (" jetPhi" ), jet.phi ());
334+
328335 // PID check
329336 registry.fill (HIST (" tofMass" ), track.mass ());
330337 registry.fill (HIST (" tpcPi" ), track.p (), track.tpcNSigmaPi ());
@@ -359,15 +366,15 @@ struct JetShapeTask {
359366 registry.fill (HIST (" tpcDedxOutOfJet" ), track.p (), track.tpcSignal ());
360367
361368 if (std::abs (track.tofNSigmaPi ()) < nSigmaTofCut) {
362- registry.fill (HIST (" tpcTofPiOutOfJet" ), track.p (), track.tpcNSigmaPi (), jet. pt () , collision.centFT0M ());
369+ registry.fill (HIST (" tpcTofPiOutOfJet" ), track.p (), track.tpcNSigmaPi (), ptCorr , collision.centFT0M ());
363370 if (track.tpcNSigmaPi () > tpcNSigmaPiMin && track.tpcNSigmaPi () < tpcNSigmaPiMax) {
364- registry.fill (HIST (" pVsPtForPiOutOfJet" ), track.p (), track.pt (), jet. pt () , collision.centFT0M ());
371+ registry.fill (HIST (" pVsPtForPiOutOfJet" ), track.p (), track.pt (), ptCorr , collision.centFT0M ());
365372 }
366373 }
367374 if (std::abs (track.tofNSigmaPr ()) < nSigmaTofCut) {
368- registry.fill (HIST (" tpcTofPrOutOfJet" ), track.p (), track.tpcNSigmaPr (), jet. pt () , collision.centFT0M ());
375+ registry.fill (HIST (" tpcTofPrOutOfJet" ), track.p (), track.tpcNSigmaPr (), ptCorr , collision.centFT0M ());
369376 if (track.tpcNSigmaPr () > tpcNSigmaPrMin && track.tpcNSigmaPr () < tpcNSigmaPrMax) {
370- registry.fill (HIST (" pVsPtForPrOutOfJet" ), track.p (), track.pt (), jet. pt () , collision.centFT0M ());
377+ registry.fill (HIST (" pVsPtForPrOutOfJet" ), track.p (), track.pt (), ptCorr , collision.centFT0M ());
371378 }
372379 }
373380 }
@@ -377,85 +384,99 @@ struct JetShapeTask {
377384 registry.fill (HIST (" tofBeta" ), track.p (), track.beta ());
378385
379386 if (std::abs (track.tofNSigmaPr ()) < nSigmaTofCut) {
380- registry.fill (HIST (" tpcTofPr" ), track.p (), track.tpcNSigmaPr (), distance, jet. pt () , collision.centFT0M ());
387+ registry.fill (HIST (" tpcTofPr" ), track.p (), track.tpcNSigmaPr (), distance, ptCorr , collision.centFT0M ());
381388 if (track.tpcNSigmaPr () > tpcNSigmaPrMin && track.tpcNSigmaPr () < tpcNSigmaPrMax) {
382- registry.fill (HIST (" pVsPtForPr" ), track.p (), track.pt (), distance, jet. pt () , collision.centFT0M ());
389+ registry.fill (HIST (" pVsPtForPr" ), track.p (), track.pt (), distance, ptCorr , collision.centFT0M ());
383390 }
384391 }
385392
386393 if (std::abs (track.tofNSigmaPi ()) < nSigmaTofCut) {
387- registry.fill (HIST (" tpcTofPi" ), track.p (), track.tpcNSigmaPi (), distance, jet. pt () , collision.centFT0M ());
394+ registry.fill (HIST (" tpcTofPi" ), track.p (), track.tpcNSigmaPi (), distance, ptCorr , collision.centFT0M ());
388395 if (track.tpcNSigmaPi () > tpcNSigmaPiMin && track.tpcNSigmaPi () < tpcNSigmaPiMax) {
389- registry.fill (HIST (" pVsPtForPi" ), track.p (), track.pt (), distance, jet. pt () , collision.centFT0M ());
396+ registry.fill (HIST (" pVsPtForPi" ), track.p (), track.pt (), distance, ptCorr , collision.centFT0M ());
390397 }
391398 }
392399 }
393400 }
394401 }
395402 PROCESS_SWITCH (JetShapeTask, processProductionRatio, " production ratio" , false );
396403
397- void processReco (soa::Join<aod::Tracks, aod::TracksExtra, aod::TracksDCA, aod::McTrackLabels> const & tracks, aod::McParticles const &)
404+ void processReco (soa::Filtered<soa:: Join<aod::JetCollisionsMCD, aod::BkgChargedRhos>>::iterator const & collision, soa::Join<aod::McCollisions, aod::McCentFT0Ms> const & mcCollision, soa::Join<aod:: Tracks, aod::TracksExtra, aod::TracksDCA, aod::McTrackLabels> const & tracks, soa::Filtered< aod::ChargedMCDetectorLevelJets> const & mcdjets, aod:: McParticles const & mcParticles )
398405 {
399406 registry.fill (HIST (" eventCounter" ), 0.5 );
407+ float centrality = collision.centFT0M ();
400408
401- for (const auto & track : tracks) {
402- if (track.has_mcParticle ()) {
403- auto mcParticle = track.mcParticle ();
404- registry.fill (HIST (" ptResolution" ), track.pt (), track.pt () - mcParticle.pt ());
409+ for (const auto & mcdjet : mcdjets) {
405410
406- if (std::abs (track.eta ()) > etaTrUp)
407- continue ;
408- if (track.tpcNClsCrossedRows () < nclcrossTpcMin)
409- continue ;
410- if (std::abs (track.dcaXY ()) > dcaxyMax)
411- continue ;
412- if (track.itsChi2NCl () > chi2ItsMax)
413- continue ;
414- if (track.tpcChi2NCl () > chi2TpcMax)
415- continue ;
416- if (track.tpcNClsFound () < nclTpcMin)
417- continue ;
418- if (track.itsNCls () < nclItsMin)
419- continue ;
411+ // Get underlying event subtracted jet.pt() as ptCorr
412+ float mcdPtCorr = mcdjet.pt () - collision.rho () * mcdjet.area ();
420413
421- if (mcParticle.isPhysicalPrimary () && std::fabs (mcParticle.y ()) < mcRapidityMax) {
422- if (std::abs (mcParticle.pdgCode ()) == PDG_t::kPiPlus )
423- registry.fill (HIST (" ptHistogramPion" ), mcParticle.pt ());
424- if (std::abs (mcParticle.pdgCode ()) == PDG_t::kKPlus )
425- registry.fill (HIST (" ptHistogramKaon" ), mcParticle.pt ());
426- if (std::abs (mcParticle.pdgCode ()) == PDG_t::kProton )
427- registry.fill (HIST (" ptHistogramProton" ), mcParticle.pt ());
428- }
414+ for (const auto & track : tracks) {
415+ if (track.has_mcParticle ()) {
416+ auto mcParticle = track.mcParticle ();
417+ registry.fill (HIST (" ptResolution" ), track.pt (), track.pt () - mcParticle.pt ());
418+
419+ if (std::abs (track.eta ()) > etaTrUp)
420+ continue ;
421+ if (track.tpcNClsCrossedRows () < nclcrossTpcMin)
422+ continue ;
423+ if (std::abs (track.dcaXY ()) > dcaxyMax)
424+ continue ;
425+ if (track.itsChi2NCl () > chi2ItsMax)
426+ continue ;
427+ if (track.tpcChi2NCl () > chi2TpcMax)
428+ continue ;
429+ if (track.tpcNClsFound () < nclTpcMin)
430+ continue ;
431+ if (track.itsNCls () < nclItsMin)
432+ continue ;
429433
430- if (track.hasTOF ()) {
431434 if (mcParticle.isPhysicalPrimary () && std::fabs (mcParticle.y ()) < mcRapidityMax) {
432435 if (std::abs (mcParticle.pdgCode ()) == PDG_t::kPiPlus )
433- registry.fill (HIST (" ptHistogramPionTof " ), mcParticle.pt ());
436+ registry.fill (HIST (" ptHistogramPion " ), mcParticle.pt (), mcdPtCorr, centrality );
434437 if (std::abs (mcParticle.pdgCode ()) == PDG_t::kKPlus )
435- registry.fill (HIST (" ptHistogramKaonTof " ), mcParticle.pt ());
438+ registry.fill (HIST (" ptHistogramKaon " ), mcParticle.pt (), mcdPtCorr, centrality );
436439 if (std::abs (mcParticle.pdgCode ()) == PDG_t::kProton )
437- registry.fill (HIST (" ptHistogramProtonTof" ), mcParticle.pt ());
440+ registry.fill (HIST (" ptHistogramProton" ), mcParticle.pt (), mcdPtCorr, centrality);
441+ }
442+
443+ if (track.hasTOF ()) {
444+ if (mcParticle.isPhysicalPrimary () && std::fabs (mcParticle.y ()) < mcRapidityMax) {
445+ if (std::abs (mcParticle.pdgCode ()) == PDG_t::kPiPlus )
446+ registry.fill (HIST (" ptHistogramPionTof" ), mcParticle.pt (), mcdPtCorr, centrality);
447+ if (std::abs (mcParticle.pdgCode ()) == PDG_t::kKPlus )
448+ registry.fill (HIST (" ptHistogramKaonTof" ), mcParticle.pt (), mcdPtCorr, centrality);
449+ if (std::abs (mcParticle.pdgCode ()) == PDG_t::kProton )
450+ registry.fill (HIST (" ptHistogramProtonTof" ), mcParticle.pt (), mcdPtCorr, centrality);
451+ }
438452 }
439453 }
440454 }
441455 }
442456 }
443457 PROCESS_SWITCH (JetShapeTask, processReco, " process reconstructed information" , true );
444458
445- void processSim (soa::Join<aod::McCollisions, aod::McCentFT0Ms>::iterator const & mcCollision, aod::McParticles const & mcParticles)
459+ void processSim (soa::Join<aod::McCollisions, aod::McCentFT0Ms>::iterator const & mcCollision, soa::Filtered<aod::ChargedMCParticleLevelJets> const & mcpjets, aod::McParticles const & mcParticles)
446460 {
461+ auto mcId = mcCollision.globalIndex ();
462+ float centrality = mcCollision.centFT0M ();
463+ registry.fill (HIST (" mcCentralitySim" ), centrality);
447464
448- registry.fill (HIST (" mcCentralitySim" ), mcCollision.centFT0M ());
465+ auto mcpjetsPerCollision = mcpjets.sliceBy (perMcCollisionJets, mcId);
466+ auto mcParticlesPerCollision = mcParticles.sliceBy (perMcCollision, mcId);
449467
450- for (const auto & mcParticle : mcParticles ) {
468+ for (const auto & mcpjet : mcpjetsPerCollision ) {
451469
452- if (mcParticle.isPhysicalPrimary () && std::fabs (mcParticle.y ()) < mcRapidityMax) {
453- if (std::abs (mcParticle.pdgCode ()) == PDG_t::kPiPlus )
454- registry.fill (HIST (" ptGeneratedPion" ), mcParticle.pt ());
455- if (std::abs (mcParticle.pdgCode ()) == PDG_t::kKPlus )
456- registry.fill (HIST (" ptGeneratedKaon" ), mcParticle.pt ());
457- if (std::abs (mcParticle.pdgCode ()) == PDG_t::kProton )
458- registry.fill (HIST (" ptGeneratedProton" ), mcParticle.pt ());
470+ for (const auto & mcParticle : mcParticlesPerCollision) {
471+
472+ if (mcParticle.isPhysicalPrimary () && std::fabs (mcParticle.y ()) < mcRapidityMax) {
473+ if (std::abs (mcParticle.pdgCode ()) == PDG_t::kPiPlus )
474+ registry.fill (HIST (" ptGeneratedPion" ), mcParticle.pt (), mcpjet.pt (), centrality);
475+ if (std::abs (mcParticle.pdgCode ()) == PDG_t::kKPlus )
476+ registry.fill (HIST (" ptGeneratedKaon" ), mcParticle.pt (), mcpjet.pt (), centrality);
477+ if (std::abs (mcParticle.pdgCode ()) == PDG_t::kProton )
478+ registry.fill (HIST (" ptGeneratedProton" ), mcParticle.pt (), mcpjet.pt (), centrality);
479+ }
459480 }
460481 }
461482 }
0 commit comments