1717#include " PWGJE/Core/JetDerivedDataUtilities.h"
1818#include " PWGJE/Core/JetUtilities.h"
1919#include " PWGJE/DataModel/Jet.h"
20+ #include " PWGLF/DataModel/mcCentrality.h"
2021
2122#include " Common/Core/RecoDecay.h"
2223#include " Common/Core/TrackSelection.h"
@@ -53,9 +54,12 @@ struct JetShapeTask {
5354 Configurable<float > ptMax{" ptMax" , 5 .0f , " Max value of pT" };
5455 Configurable<float > jetPtMinForCut{" jetPtMinForCut" , 0 .0f , " Minimum value of jet pT cut" };
5556 Configurable<float > jetPtMaxForCut{" jetPtMaxForCut" , 200 .0f , " Maximum value of the jet pT cut" };
57+ Configurable<float > centralityMinForCut{" centralityMinForCut" , 0 .0f , " Minimum value of ce cut" };
58+ Configurable<float > centralityMaxForCut{" centralityMaxForCut" , 100 .0f , " Maximum value of the jet pT cut" };
5659 Configurable<int > nBinsP{" nBinsP" , 70 , " Number of p bins" };
5760 Configurable<int > nBinsPt{" nBinsPt" , 50 , " Number of pT bins" };
5861 Configurable<int > nBinsJetPt{" nBinsJetPt" , 10 , " Number of jet pT bins" };
62+ Configurable<int > nBinsCentrality{" nBinsCentrality" , 20 , " Number of centrality bins" };
5963 Configurable<int > nBinsDistance{" nBinsDistance" , 7 , " Number of distance bins" };
6064 Configurable<float > distanceMax{" distanceMax" , 0 .7f , " Max value of distance" };
6165 Configurable<float > nSigmaTofCut{" nSigmaTofCut" , 2 .0f , " Number of sigma cut for TOF PID" };
@@ -65,21 +69,21 @@ struct JetShapeTask {
6569 Configurable<float > tpcNSigmaPiMax{" tpcNSigmaPiMax" , 3 .5f , " Max value of tpcNsigmaPion" };
6670
6771 HistogramRegistry registry{" registry" ,
68- {{" tpcTofPi" , " tpcTofPi" , {HistType::kTHnSparseD , {{35 , 0 , pMax}, {nBinsNSigma, nSigmaMin, nSigmaMax}, {nBinsDistance, 0 , distanceMax}, {nBinsJetPt, jetPtMinForCut, jetPtMaxForCut}}}},
69- {" tpcTofPr" , " tpcTofPr" , {HistType::kTHnSparseD , {{35 , 0 , pMax}, {nBinsNSigma, nSigmaMin, nSigmaMax}, {nBinsDistance, 0 , distanceMax}, {nBinsJetPt, jetPtMinForCut, jetPtMaxForCut}}}},
70- {" tpcTofPiOutOfJet" , " tpcTofPiOutOfJet" , {HistType::kTHnSparseD , {{35 , 0 , pMax}, {nBinsNSigma, nSigmaMin, nSigmaMax}, {nBinsJetPt, jetPtMinForCut, jetPtMaxForCut}}}},
71- {" tpcTofPrOutOfJet" , " tpcTofPrOutOfJet" , {HistType::kTHnSparseD , {{35 , 0 , pMax}, {nBinsNSigma, nSigmaMin, nSigmaMax}, {nBinsJetPt, jetPtMinForCut, jetPtMaxForCut}}}},
72+ {{" tpcTofPi" , " tpcTofPi" , {HistType::kTHnSparseD , {{35 , 0 , pMax}, {nBinsNSigma, nSigmaMin, nSigmaMax}, {nBinsDistance, 0 , distanceMax}, {nBinsJetPt, jetPtMinForCut, jetPtMaxForCut}, {nBinsCentrality, centralityMinForCut, centralityMaxForCut} }}},
73+ {" tpcTofPr" , " tpcTofPr" , {HistType::kTHnSparseD , {{35 , 0 , pMax}, {nBinsNSigma, nSigmaMin, nSigmaMax}, {nBinsDistance, 0 , distanceMax}, {nBinsJetPt, jetPtMinForCut, jetPtMaxForCut}, {nBinsCentrality, centralityMinForCut, centralityMaxForCut} }}},
74+ {" tpcTofPiOutOfJet" , " tpcTofPiOutOfJet" , {HistType::kTHnSparseD , {{35 , 0 , pMax}, {nBinsNSigma, nSigmaMin, nSigmaMax}, {nBinsJetPt, jetPtMinForCut, jetPtMaxForCut}, {nBinsCentrality, centralityMinForCut, centralityMaxForCut} }}},
75+ {" tpcTofPrOutOfJet" , " tpcTofPrOutOfJet" , {HistType::kTHnSparseD , {{35 , 0 , pMax}, {nBinsNSigma, nSigmaMin, nSigmaMax}, {nBinsJetPt, jetPtMinForCut, jetPtMaxForCut}, {nBinsCentrality, centralityMinForCut, centralityMaxForCut} }}},
7276 {" tpcPi" , " tpcPi" , {HistType::kTH2F , {{nBinsP, 0 , pMax}, {nBinsNSigma, nSigmaMin, nSigmaMax}}}},
7377 {" tofPi" , " tofPi" , {HistType::kTH2F , {{nBinsPt, 0 , ptMax}, {nBinsNSigma, nSigmaMin, nSigmaMax}}}},
7478 {" tpcPr" , " tpcPr" , {HistType::kTH2F , {{nBinsP, 0 , pMax}, {nBinsNSigma, nSigmaMin, nSigmaMax}}}},
7579 {" tofPr" , " tofPr" , {HistType::kTH2F , {{nBinsPt, 0 , ptMax}, {nBinsNSigma, nSigmaMin, nSigmaMax}}}},
7680 {" tpcDedx" , " tpcDedx" , {HistType::kTHnSparseD , {{nBinsPForDedx, 0 , pMax}, {nBinsTpcDedx, 0 , 1000 }, {nBinsDistance, 0 , distanceMax}}}},
7781 {" tpcDedxOutOfJet" , " tpcDedxOutOfJet" , {HistType::kTH2F , {{nBinsPForDedx, 0 , pMax}, {nBinsTpcDedx, 0 , 1000 }}}},
7882 {" tofBeta" , " tofBeta" , {HistType::kTH2F , {{nBinsPForBeta, 0 , pMax}, {nBinsTofBeta, 0.4 , 1.1 }}}},
79- {" pVsPtForPr" , " pVsPtForPr" , {HistType::kTHnSparseD , {{nBinsP, 0 , pMax}, {nBinsPt, 0 , ptMax}, {nBinsDistance, 0 , distanceMax}, {nBinsJetPt, jetPtMinForCut, jetPtMaxForCut}}}},
80- {" pVsPtForPi" , " pVsPtPi" , {HistType::kTHnSparseD , {{nBinsP, 0 , pMax}, {nBinsPt, 0 , ptMax}, {nBinsDistance, 0 , distanceMax}, {nBinsJetPt, jetPtMinForCut, jetPtMaxForCut}}}},
81- {" pVsPtForPrOutOfJet" , " pVsPtForPrOutOfJet" , {HistType::kTHnSparseD , {{nBinsP, 0 , pMax}, {nBinsPt, 0 , ptMax}, {nBinsJetPt, jetPtMinForCut, jetPtMaxForCut}}}},
82- {" pVsPtForPiOutOfJet" , " pVsPtPionOutOfJet" , {HistType::kTHnSparseD , {{nBinsP, 0 , pMax}, {nBinsPt, 0 , ptMax}, {nBinsJetPt, jetPtMinForCut, jetPtMaxForCut}}}},
83+ {" pVsPtForPr" , " pVsPtForPr" , {HistType::kTHnSparseD , {{nBinsP, 0 , pMax}, {nBinsPt, 0 , ptMax}, {nBinsDistance, 0 , distanceMax}, {nBinsJetPt, jetPtMinForCut, jetPtMaxForCut}, {nBinsCentrality, centralityMinForCut, centralityMaxForCut} }}},
84+ {" pVsPtForPi" , " pVsPtPi" , {HistType::kTHnSparseD , {{nBinsP, 0 , pMax}, {nBinsPt, 0 , ptMax}, {nBinsDistance, 0 , distanceMax}, {nBinsJetPt, jetPtMinForCut, jetPtMaxForCut}, {nBinsCentrality, centralityMinForCut, centralityMaxForCut} }}},
85+ {" pVsPtForPrOutOfJet" , " pVsPtForPrOutOfJet" , {HistType::kTHnSparseD , {{nBinsP, 0 , pMax}, {nBinsPt, 0 , ptMax}, {nBinsJetPt, jetPtMinForCut, jetPtMaxForCut}, {nBinsCentrality, centralityMinForCut, centralityMaxForCut} }}},
86+ {" pVsPtForPiOutOfJet" , " pVsPtPionOutOfJet" , {HistType::kTHnSparseD , {{nBinsP, 0 , pMax}, {nBinsPt, 0 , ptMax}, {nBinsJetPt, jetPtMinForCut, jetPtMaxForCut}, {nBinsCentrality, centralityMinForCut, centralityMaxForCut} }}},
8387 {" tofMass" , " tofMass" , {HistType::kTH1F , {{300 , 0 , 3 }}}},
8488 {" trackPhi" , " trackPhi" , {HistType::kTH1F , {{80 , -1 , 7 }}}},
8589 {" trackEta" , " trackEta" , {HistType::kTH1F , {{100 , -1 , 1 }}}},
@@ -104,6 +108,8 @@ struct JetShapeTask {
104108 {" eventCounter" , " eventCounter" , {HistType::kTH1F , {{1 , 0 , +1 , " " }}}},
105109 {" ptVsCentrality" , " ptvscentrality" , {HistType::kTH2F , {{100 , 0 , 100 }, {300 , 0 , 300 }}}},
106110 {" ptResolution" , " ptResolution" , {HistType::kTH2F , {{nBinsPt, 0 , ptMax}, {100 , -1.0 , +1.0 }}}},
111+ {" mcCentralityReco" , " mcCentralityReco" , {HistType::kTH1F , {{100 , 0 , 100 }}}},
112+ {" mcCentralitySim" , " mcCentralitySim" , {HistType::kTH1F , {{100 , 0 , 100 }}}},
107113 {" ptHistogramPion" , " ptHistogramPion" , {HistType::kTH1F , {{nBinsPt, 0 , ptMax}}}},
108114 {" ptHistogramKaon" , " ptHistogramKaon" , {HistType::kTH1F , {{nBinsPt, 0 , ptMax}}}},
109115 {" ptHistogramProton" , " ptHistogramProton" , {HistType::kTH1F , {{nBinsPt, 0 , ptMax}}}},
@@ -259,9 +265,6 @@ struct JetShapeTask {
259265 }
260266 }
261267
262- registry.fill (HIST (" jetPt" ), jet.pt ());
263- registry.fill (HIST (" jetEta" ), jet.eta ());
264- registry.fill (HIST (" jetPhi" ), jet.phi ());
265268 registry.fill (HIST (" area" ), jet.area ());
266269 registry.fill (HIST (" rho" ), collision.rho ());
267270 registry.fill (HIST (" ptCorr" ), ptCorr);
@@ -292,6 +295,10 @@ struct JetShapeTask {
292295 continue ;
293296 }
294297
298+ registry.fill (HIST (" jetPt" ), jet.pt ());
299+ registry.fill (HIST (" jetEta" ), jet.eta ());
300+ registry.fill (HIST (" jetPhi" ), jet.phi ());
301+
295302 // tracks conditions
296303 for (const auto & track : tracks) {
297304 registry.fill (HIST (" trackTpcNClsCrossedRows" ), track.tpcNClsCrossedRows ());
@@ -352,15 +359,15 @@ struct JetShapeTask {
352359 registry.fill (HIST (" tpcDedxOutOfJet" ), track.p (), track.tpcSignal ());
353360
354361 if (std::abs (track.tofNSigmaPi ()) < nSigmaTofCut) {
355- registry.fill (HIST (" tpcTofPiOutOfJet" ), track.p (), track.tpcNSigmaPi (), jet.pt ());
362+ registry.fill (HIST (" tpcTofPiOutOfJet" ), track.p (), track.tpcNSigmaPi (), jet.pt (), collision. centFT0M () );
356363 if (track.tpcNSigmaPi () > tpcNSigmaPiMin && track.tpcNSigmaPi () < tpcNSigmaPiMax) {
357- registry.fill (HIST (" pVsPtForPiOutOfJet" ), track.p (), track.pt (), jet.pt ());
364+ registry.fill (HIST (" pVsPtForPiOutOfJet" ), track.p (), track.pt (), jet.pt (), collision. centFT0M () );
358365 }
359366 }
360367 if (std::abs (track.tofNSigmaPr ()) < nSigmaTofCut) {
361- registry.fill (HIST (" tpcTofPrOutOfJet" ), track.p (), track.tpcNSigmaPr (), jet.pt ());
368+ registry.fill (HIST (" tpcTofPrOutOfJet" ), track.p (), track.tpcNSigmaPr (), jet.pt (), collision. centFT0M () );
362369 if (track.tpcNSigmaPr () > tpcNSigmaPrMin && track.tpcNSigmaPr () < tpcNSigmaPrMax) {
363- registry.fill (HIST (" pVsPtForPrOutOfJet" ), track.p (), track.pt (), jet.pt ());
370+ registry.fill (HIST (" pVsPtForPrOutOfJet" ), track.p (), track.pt (), jet.pt (), collision. centFT0M () );
364371 }
365372 }
366373 }
@@ -370,16 +377,16 @@ struct JetShapeTask {
370377 registry.fill (HIST (" tofBeta" ), track.p (), track.beta ());
371378
372379 if (std::abs (track.tofNSigmaPr ()) < nSigmaTofCut) {
373- registry.fill (HIST (" tpcTofPr" ), track.p (), track.tpcNSigmaPr (), distance, jet.pt ());
380+ registry.fill (HIST (" tpcTofPr" ), track.p (), track.tpcNSigmaPr (), distance, jet.pt (), collision. centFT0M () );
374381 if (track.tpcNSigmaPr () > tpcNSigmaPrMin && track.tpcNSigmaPr () < tpcNSigmaPrMax) {
375- registry.fill (HIST (" pVsPtForPr" ), track.p (), track.pt (), distance, jet.pt ());
382+ registry.fill (HIST (" pVsPtForPr" ), track.p (), track.pt (), distance, jet.pt (), collision. centFT0M () );
376383 }
377384 }
378385
379386 if (std::abs (track.tofNSigmaPi ()) < nSigmaTofCut) {
380- registry.fill (HIST (" tpcTofPi" ), track.p (), track.tpcNSigmaPi (), distance, jet.pt ());
387+ registry.fill (HIST (" tpcTofPi" ), track.p (), track.tpcNSigmaPi (), distance, jet.pt (), collision. centFT0M () );
381388 if (track.tpcNSigmaPi () > tpcNSigmaPiMin && track.tpcNSigmaPi () < tpcNSigmaPiMax) {
382- registry.fill (HIST (" pVsPtForPi" ), track.p (), track.pt (), distance, jet.pt ());
389+ registry.fill (HIST (" pVsPtForPi" ), track.p (), track.pt (), distance, jet.pt (), collision. centFT0M () );
383390 }
384391 }
385392 }
@@ -411,7 +418,7 @@ struct JetShapeTask {
411418 if (track.itsNCls () < nclItsMin)
412419 continue ;
413420
414- if (mcParticle.isPhysicalPrimary () && std::fabs (mcParticle.y ()) < mcRapidityMax) { // do this in the context of the track ! (context matters!!!)
421+ if (mcParticle.isPhysicalPrimary () && std::fabs (mcParticle.y ()) < mcRapidityMax) {
415422 if (std::abs (mcParticle.pdgCode ()) == PDG_t::kPiPlus )
416423 registry.fill (HIST (" ptHistogramPion" ), mcParticle.pt ());
417424 if (std::abs (mcParticle.pdgCode ()) == PDG_t::kKPlus )
@@ -435,9 +442,13 @@ struct JetShapeTask {
435442 }
436443 PROCESS_SWITCH (JetShapeTask, processReco, " process reconstructed information" , true );
437444
438- void processSim (aod::McParticles const & mcParticles)
445+ void processSim (soa::Join<aod::McCollisions, aod::McCentFT0Ms>::iterator const & mcCollision, aod::McParticles const & mcParticles)
439446 {
447+
448+ registry.fill (HIST (" mcCentralitySim" ), mcCollision.centFT0M ());
449+
440450 for (const auto & mcParticle : mcParticles) {
451+
441452 if (mcParticle.isPhysicalPrimary () && std::fabs (mcParticle.y ()) < mcRapidityMax) {
442453 if (std::abs (mcParticle.pdgCode ()) == PDG_t::kPiPlus )
443454 registry.fill (HIST (" ptGeneratedPion" ), mcParticle.pt ());
0 commit comments