@@ -49,6 +49,8 @@ struct JetShapeTask {
4949 Configurable<int > nBinsTofBeta{" nBinsTofBeta" , 350 , " Number of Beta bins" };
5050 Configurable<float > pMax{" pMax" , 7 .0f , " Max value of p" };
5151 Configurable<float > ptMax{" ptMax" , 5 .0f , " Max value of pT" };
52+ Configurable<int > nBinsP{" nBinsP" , 70 , " Number of p bins" };
53+ Configurable<int > nBinsPt{" nBinsPt" , 50 , " Number of pT bins" };
5254 Configurable<int > nBinsDistance{" nBinsDistance" , 7 , " Number of distance bins" };
5355 Configurable<float > distanceMax{" distanceMax" , 0 .7f , " Max value of distance" };
5456 Configurable<float > nSigmaTofCut{" nSigmaTofCut" , 2 .0f , " Number of sigma cut for TOF PID" };
@@ -62,17 +64,17 @@ struct JetShapeTask {
6264 {" tpcTofPr" , " tpcTofPr" , {HistType::kTHnSparseD , {{35 , 0 , pMax}, {nBinsNSigma, nSigmaMin, nSigmaMax}, {nBinsDistance, 0 , distanceMax}}}},
6365 {" tpcTofPiOutOfJet" , " tpcTofPiOutOfJet" , {HistType::kTH2F , {{35 , 0 , pMax}, {nBinsNSigma, nSigmaMin, nSigmaMax}}}},
6466 {" tpcTofPrOutOfJet" , " tpcTofPrOutOfJet" , {HistType::kTH2F , {{35 , 0 , pMax}, {nBinsNSigma, nSigmaMin, nSigmaMax}}}},
65- {" tpcPi" , " tpcPi" , {HistType::kTH2F , {{70 , 0 , pMax}, {nBinsNSigma, nSigmaMin, nSigmaMax}}}},
66- {" tofPi" , " tofPi" , {HistType::kTH2F , {{50 , 0 , ptMax}, {nBinsNSigma, nSigmaMin, nSigmaMax}}}},
67- {" tpcPr" , " tpcPr" , {HistType::kTH2F , {{70 , 0 , pMax}, {nBinsNSigma, nSigmaMin, nSigmaMax}}}},
68- {" tofPr" , " tofPr" , {HistType::kTH2F , {{50 , 0 , ptMax}, {nBinsNSigma, nSigmaMin, nSigmaMax}}}},
67+ {" tpcPi" , " tpcPi" , {HistType::kTH2F , {{nBinsP , 0 , pMax}, {nBinsNSigma, nSigmaMin, nSigmaMax}}}},
68+ {" tofPi" , " tofPi" , {HistType::kTH2F , {{nBinsPt , 0 , ptMax}, {nBinsNSigma, nSigmaMin, nSigmaMax}}}},
69+ {" tpcPr" , " tpcPr" , {HistType::kTH2F , {{nBinsP , 0 , pMax}, {nBinsNSigma, nSigmaMin, nSigmaMax}}}},
70+ {" tofPr" , " tofPr" , {HistType::kTH2F , {{nBinsPt , 0 , ptMax}, {nBinsNSigma, nSigmaMin, nSigmaMax}}}},
6971 {" tpcDedx" , " tpcDedx" , {HistType::kTHnSparseD , {{nBinsPForDedx, 0 , pMax}, {nBinsTpcDedx, 0 , 1000 }, {nBinsDistance, 0 , distanceMax}}}},
7072 {" tpcDedxOutOfJet" , " tpcDedxOutOfJet" , {HistType::kTH2F , {{nBinsPForDedx, 0 , pMax}, {nBinsTpcDedx, 0 , 1000 }}}},
7173 {" tofBeta" , " tofBeta" , {HistType::kTH2F , {{nBinsPForBeta, 0 , pMax}, {nBinsTofBeta, 0.4 , 1.1 }}}},
72- {" pVsPtForPr" , " pVsPtForPr" , {HistType::kTHnSparseD , {{70 , 0 , pMax}, {50 , 0 , ptMax}, {nBinsDistance, 0 , distanceMax}}}},
73- {" pVsPtForPi" , " pVsPtPi" , {HistType::kTHnSparseD , {{70 , 0 , pMax}, {50 , 0 , ptMax}, {nBinsDistance, 0 , distanceMax}}}},
74- {" pVsPtForPrOutOfJet" , " pVsPtForPrOutOfJet" , {HistType::kTH2F , {{70 , 0 , pMax}, {50 , 0 , ptMax}}}},
75- {" pVsPtForPiOutOfJet" , " pVsPtPionOutOfJet" , {HistType::kTH2F , {{70 , 0 , pMax}, {50 , 0 , ptMax}}}},
74+ {" pVsPtForPr" , " pVsPtForPr" , {HistType::kTHnSparseD , {{nBinsP , 0 , pMax}, {nBinsPt , 0 , ptMax}, {nBinsDistance, 0 , distanceMax}}}},
75+ {" pVsPtForPi" , " pVsPtPi" , {HistType::kTHnSparseD , {{nBinsP , 0 , pMax}, {nBinsPt , 0 , ptMax}, {nBinsDistance, 0 , distanceMax}}}},
76+ {" pVsPtForPrOutOfJet" , " pVsPtForPrOutOfJet" , {HistType::kTH2F , {{nBinsP , 0 , pMax}, {nBinsPt , 0 , ptMax}}}},
77+ {" pVsPtForPiOutOfJet" , " pVsPtPionOutOfJet" , {HistType::kTH2F , {{nBinsP , 0 , pMax}, {nBinsPt , 0 , ptMax}}}},
7678 {" tofMass" , " tofMass" , {HistType::kTH1F , {{300 , 0 , 3 }}}},
7779 {" trackPhi" , " trackPhi" , {HistType::kTH1F , {{80 , -1 , 7 }}}},
7880 {" trackEta" , " trackEta" , {HistType::kTH1F , {{100 , -1 , 1 }}}},
@@ -94,7 +96,15 @@ struct JetShapeTask {
9496 {" ptSumBg1" , " ptSumBg1" , {HistType::kTH2F , {{14 , 0 , 0.7 }, {300 , 0 , 300 }}}},
9597 {" ptSumBg2" , " ptSumBg2" , {HistType::kTH2F , {{14 , 0 , 0.7 }, {300 , 0 , 300 }}}},
9698 {" event/vertexz" , " ;Vtx_{z} (cm);Entries" , {HistType::kTH1F , {{100 , -20 , 20 }}}},
97- {" ptVsCentrality" , " ptvscentrality" , {HistType::kTH2F , {{100 , 0 , 100 }, {300 , 0 , 300 }}}}}};
99+ {" eventCounter" , " eventCounter" , {HistType::kTH1F , {{1 , 0 , +1 , " " }}}},
100+ {" ptVsCentrality" , " ptvscentrality" , {HistType::kTH2F , {{100 , 0 , 100 }, {300 , 0 , 300 }}}},
101+ {" ptResolution" , " ptResolution" , {HistType::kTH2F , {{50 , 0 , ptMax}, {100 , -1.0 , +1.0 }}}},
102+ {" ptHistogramPion" , " ptHistogramPion" , {HistType::kTH1F , {{50 , 0 , ptMax}}}},
103+ {" ptHistogramKaon" , " ptHistogramKaon" , {HistType::kTH1F , {{50 , 0 , ptMax}}}},
104+ {" ptHistogramProton" , " ptHistogramProton" , {HistType::kTH1F , {{50 , 0 , ptMax}}}},
105+ {" ptGeneratedPion" , " ptGeneratedPion" , {HistType::kTH1F , {{50 , 0 , ptMax}}}},
106+ {" ptGeneratedKaon" , " ptGeneratedKaon" , {HistType::kTH1F , {{50 , 0 , ptMax}}}},
107+ {" ptGeneratedProton" , " ptGeneratedProton" , {HistType::kTH1F , {{50 , 0 , ptMax}}}}}};
98108
99109 Configurable<float > vertexZCut{" vertexZCut" , 10 .0f , " Accepted z-vertex range" };
100110
@@ -119,6 +129,7 @@ struct JetShapeTask {
119129 Configurable<float > nclItsMin{" nclItsMin" , 2 .0f , " its # of cluster cut" };
120130 Configurable<float > nclTpcMin{" nclTpcMin" , 100 .0f , " tpc # if cluster cut" };
121131 Configurable<float > nclcrossTpcMin{" nclcrossTpcMin" , 70 .0f , " tpc # of crossedRows cut" };
132+ Configurable<float > mcRapidityMax{" mcRapidityMax" , 0 .5f , " maximum mctrack y" };
122133
123134 Configurable<std::string> triggerMasks{" triggerMasks" , " " , " possible JE Trigger masks: fJetChLowPt,fJetChHighPt,fTrackLowPt,fTrackHighPt,fJetD0ChLowPt,fJetD0ChHighPt,fJetLcChLowPt,fJetLcChHighPt,fEMCALReadout,fJetFullHighPt,fJetFullLowPt,fJetNeutralHighPt,fJetNeutralLowPt,fGammaVeryHighPtEMCAL,fGammaVeryHighPtDCAL,fGammaHighPtEMCAL,fGammaHighPtDCAL,fGammaLowPtEMCAL,fGammaLowPtDCAL,fGammaVeryLowPtEMCAL,fGammaVeryLowPtDCAL" };
124135
@@ -258,7 +269,7 @@ struct JetShapeTask {
258269 }
259270 }
260271 }
261- PROCESS_SWITCH (JetShapeTask, processJetShape, " JetShape" , true );
272+ PROCESS_SWITCH (JetShapeTask, processJetShape, " JetShape" , false );
262273
263274 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)
264275 {
@@ -366,7 +377,59 @@ struct JetShapeTask {
366377 }
367378 }
368379 }
369- PROCESS_SWITCH (JetShapeTask, processProductionRatio, " production ratio" , true );
380+ PROCESS_SWITCH (JetShapeTask, processProductionRatio, " production ratio" , false );
381+
382+ void processReco (soa::Join<aod::Tracks, aod::TracksExtra, aod::TracksDCA, aod::McTrackLabels> const & tracks, aod::McParticles const &)
383+ {
384+ registry.fill (HIST (" eventCounter" ), 0.5 );
385+
386+ for (const auto & track : tracks) {
387+ if (track.has_mcParticle ()) {
388+ auto mcParticle = track.mcParticle ();
389+ registry.fill (HIST (" ptResolution" ), track.pt (), track.pt () - mcParticle.pt ());
390+
391+ if (std::abs (track.eta ()) > etaTrUp)
392+ continue ;
393+ if (track.tpcNClsCrossedRows () < nclcrossTpcMin)
394+ continue ;
395+ if (std::abs (track.dcaXY ()) > dcaxyMax)
396+ continue ;
397+ if (track.itsChi2NCl () > chi2ItsMax)
398+ continue ;
399+ if (track.tpcChi2NCl () > chi2TpcMax)
400+ continue ;
401+ if (track.tpcNClsFound () < nclTpcMin)
402+ continue ;
403+ if (track.itsNCls () < nclItsMin)
404+ continue ;
405+
406+ if (mcParticle.isPhysicalPrimary () && std::fabs (mcParticle.y ()) < mcRapidityMax) { // do this in the context of the track ! (context matters!!!)
407+ if (std::abs (mcParticle.pdgCode ()) == PDG_t::kPiPlus )
408+ registry.fill (HIST (" ptHistogramPion" ), mcParticle.pt ());
409+ if (std::abs (mcParticle.pdgCode ()) == PDG_t::kkPlus)
410+ registry.fill (HIST (" ptHistogramKaon" ), mcParticle.pt ());
411+ if (std::abs (mcParticle.pdgCode ()) == PDG_t::kProton )
412+ registry.fill (HIST (" ptHistogramProton" ), mcParticle.pt ());
413+ }
414+ }
415+ }
416+ }
417+ PROCESS_SWITCH (JetShapeTask, processReco, " process reconstructed information" , true );
418+
419+ void processSim (aod::McParticles const & mcParticles)
420+ {
421+ for (const auto & mcParticle : mcParticles) {
422+ if (mcParticle.isPhysicalPrimary () && std::fabs (mcParticle.y ()) < mcRapidityMax) {
423+ if (std::abs (mcParticle.pdgCode ()) == PDG_t::kPiPlus )
424+ registry.fill (HIST (" ptGeneratedPion" ), mcParticle.pt ());
425+ if (std::abs (mcParticle.pdgCode ()) == PDG_t::kkPlus)
426+ registry.fill (HIST (" ptGeneratedKaon" ), mcParticle.pt ());
427+ if (std::abs (mcParticle.pdgCode ()) == PDG_t::kProton )
428+ registry.fill (HIST (" ptGeneratedProton" ), mcParticle.pt ());
429+ }
430+ }
431+ }
432+ PROCESS_SWITCH (JetShapeTask, processSim, " process pure simulation information" , true );
370433};
371434
372435WorkflowSpec defineDataProcessing (ConfigContext const & cfgc) { return WorkflowSpec{adaptAnalysisTask<JetShapeTask>(cfgc)}; }
0 commit comments