1313// / \author Yuto Nishida <yuto.nishida@cern.ch>
1414// / \brief Task for measuring the dependence of the jet shape function rho(r) on the distance r from the jet axis.
1515
16- #include " PWGJE/Core/FastJetUtilities.h"
17- #include " PWGJE/Core/JetDerivedDataUtilities.h"
18- #include " PWGJE/Core/JetUtilities.h"
19- #include " PWGJE/DataModel/Jet.h"
16+ #include < string>
17+ #include < vector>
18+ #include < cmath>
19+
20+ #include " Framework/ASoA.h"
21+ #include " Framework/AnalysisDataModel.h"
22+ #include " Framework/AnalysisTask.h"
23+ #include " Framework/HistogramRegistry.h"
2024
2125#include " Common/Core/RecoDecay.h"
2226#include " Common/Core/TrackSelection.h"
2327#include " Common/Core/TrackSelectionDefaults.h"
2428#include " Common/DataModel/EventSelection.h"
2529#include " Common/DataModel/TrackSelectionTables.h"
2630
27- #include " Framework/ASoA.h"
28- #include " Framework/AnalysisDataModel.h"
29- #include " Framework/AnalysisTask.h"
30- #include " Framework/HistogramRegistry.h"
31- #include " Framework/runDataProcessing.h"
32-
31+ #include " PWGJE/Core/FastJetUtilities.h"
32+ #include " PWGJE/Core/JetUtilities.h"
33+ #include " PWGJE/Core/JetDerivedDataUtilities.h"
34+ #include " PWGJE/DataModel/Jet.h"
3335#include < TPDGCode.h>
3436
35- #include < cmath>
36- #include < string>
37- #include < vector>
37+ #include " Framework/runDataProcessing.h"
3838
3939using namespace o2 ;
4040using namespace o2 ::framework;
@@ -100,13 +100,16 @@ struct JetShapeTask {
100100 {" event/vertexz" , " ;Vtx_{z} (cm);Entries" , {HistType::kTH1F , {{100 , -20 , 20 }}}},
101101 {" eventCounter" , " eventCounter" , {HistType::kTH1F , {{1 , 0 , +1 , " " }}}},
102102 {" ptVsCentrality" , " ptvscentrality" , {HistType::kTH2F , {{100 , 0 , 100 }, {300 , 0 , 300 }}}},
103- {" ptResolution" , " ptResolution" , {HistType::kTH2F , {{50 , 0 , ptMax}, {100 , -1.0 , +1.0 }}}},
104- {" ptHistogramPion" , " ptHistogramPion" , {HistType::kTH1F , {{50 , 0 , ptMax}}}},
105- {" ptHistogramKaon" , " ptHistogramKaon" , {HistType::kTH1F , {{50 , 0 , ptMax}}}},
106- {" ptHistogramProton" , " ptHistogramProton" , {HistType::kTH1F , {{50 , 0 , ptMax}}}},
107- {" ptGeneratedPion" , " ptGeneratedPion" , {HistType::kTH1F , {{50 , 0 , ptMax}}}},
108- {" ptGeneratedKaon" , " ptGeneratedKaon" , {HistType::kTH1F , {{50 , 0 , ptMax}}}},
109- {" ptGeneratedProton" , " ptGeneratedProton" , {HistType::kTH1F , {{50 , 0 , ptMax}}}}}};
103+ {" ptResolution" , " ptResolution" , {HistType::kTH2F , {{nBinsPt, 0 , ptMax}, {100 , -1.0 , +1.0 }}}},
104+ {" ptHistogramPion" , " ptHistogramPion" , {HistType::kTH1F , {{nBinsPt, 0 , ptMax}}}},
105+ {" ptHistogramKaon" , " ptHistogramKaon" , {HistType::kTH1F , {{nBinsPt, 0 , ptMax}}}},
106+ {" ptHistogramProton" , " ptHistogramProton" , {HistType::kTH1F , {{nBinsPt, 0 , ptMax}}}},
107+ {" ptHistogramPionTof" , " ptHistogramPionTof" , {HistType::kTH1F , {{nBinsPt, 0 , ptMax}}}},
108+ {" ptHistogramKaonTof" , " ptHistogramKaonTof" , {HistType::kTH1F , {{nBinsPt, 0 , ptMax}}}},
109+ {" ptHistogramProtonTof" , " ptHistogramProtonTof" , {HistType::kTH1F , {{nBinsPt, 0 , ptMax}}}},
110+ {" ptGeneratedPion" , " ptGeneratedPion" , {HistType::kTH1F , {{nBinsPt, 0 , ptMax}}}},
111+ {" ptGeneratedKaon" , " ptGeneratedKaon" , {HistType::kTH1F , {{nBinsPt, 0 , ptMax}}}},
112+ {" ptGeneratedProton" , " ptGeneratedProton" , {HistType::kTH1F , {{nBinsPt, 0 , ptMax}}}}}};
110113
111114 Configurable<float > vertexZCut{" vertexZCut" , 10 .0f , " Accepted z-vertex range" };
112115
@@ -381,12 +384,13 @@ struct JetShapeTask {
381384 }
382385 PROCESS_SWITCH (JetShapeTask, processProductionRatio, " production ratio" , false );
383386
384- void processReco (soa::Join<aod::Tracks, aod::TracksExtra, aod::TracksDCA, aod::McTrackLabels> const & tracks, aod::McParticles const &)
387+
388+ void processReco (soa::Join<aod::Tracks, aod::TracksExtra, aod::TracksDCA, aod::McTrackLabels>const & tracks, aod::McParticles const &)
385389 {
386390 registry.fill (HIST (" eventCounter" ), 0.5 );
387391
388392 for (const auto & track : tracks) {
389- if (track.has_mcParticle ()) {
393+ if (track.has_mcParticle ()){
390394 auto mcParticle = track.mcParticle ();
391395 registry.fill (HIST (" ptResolution" ), track.pt (), track.pt () - mcParticle.pt ());
392396
@@ -405,33 +409,36 @@ struct JetShapeTask {
405409 if (track.itsNCls () < nclItsMin)
406410 continue ;
407411
408- if (mcParticle.isPhysicalPrimary () && std::fabs (mcParticle.y ()) < mcRapidityMax) { // do this in the context of the track ! (context matters!!!)
409- if (std::abs (mcParticle.pdgCode ()) == PDG_t::kPiPlus )
410- registry.fill (HIST (" ptHistogramPion" ), mcParticle.pt ());
411- if (std::abs (mcParticle.pdgCode ()) == PDG_t::kKPlus )
412- registry.fill (HIST (" ptHistogramKaon" ), mcParticle.pt ());
413- if (std::abs (mcParticle.pdgCode ()) == PDG_t::kProton )
414- registry.fill (HIST (" ptHistogramProton" ), mcParticle.pt ());
412+ if (mcParticle.isPhysicalPrimary () && std::fabs (mcParticle.y ()) < mcRapidityMax){ // do this in the context of the track ! (context matters!!!)
413+ if (std::abs (mcParticle.pdgCode ())==PDG_t::kPiPlus ) registry.fill (HIST (" ptHistogramPion" ), mcParticle.pt ());
414+ if (std::abs (mcParticle.pdgCode ())==PDG_t::kKPlus ) registry.fill (HIST (" ptHistogramKaon" ), mcParticle.pt ());
415+ if (std::abs (mcParticle.pdgCode ())==PDG_t::kProton ) registry.fill (HIST (" ptHistogramProton" ), mcParticle.pt ());
416+ }
417+
418+ if (track.hasTOF ()){
419+ if (mcParticle.isPhysicalPrimary () && std::fabs (mcParticle.y ()) < mcRapidityMax){
420+ if (std::abs (mcParticle.pdgCode ()) == PDG_t::kPiPlus ) registry.fill (HIST (" ptHistogramPionTof" ), mcParticle.pt ());
421+ if (std::abs (mcParticle.pdgCode ()) == PDG_t::kKPlus ) registry.fill (HIST (" ptHistogramKaonTof" ), mcParticle.pt ());
422+ if (std::abs (mcParticle.pdgCode ()) == PDG_t::kProton ) registry.fill (HIST (" ptHistogramProtonTof" ), mcParticle.pt ());
423+ }
415424 }
416425 }
417426 }
418427 }
419428 PROCESS_SWITCH (JetShapeTask, processReco, " process reconstructed information" , true );
420-
421- void processSim (aod::McParticles const & mcParticles)
429+
430+ void processSim (aod::McParticles const & mcParticles)
422431 {
423432 for (const auto & mcParticle : mcParticles) {
424- if (mcParticle.isPhysicalPrimary () && std::fabs (mcParticle.y ()) < mcRapidityMax) {
425- if (std::abs (mcParticle.pdgCode ()) == PDG_t::kPiPlus )
426- registry.fill (HIST (" ptGeneratedPion" ), mcParticle.pt ());
427- if (std::abs (mcParticle.pdgCode ()) == PDG_t::kKPlus )
428- registry.fill (HIST (" ptGeneratedKaon" ), mcParticle.pt ());
429- if (std::abs (mcParticle.pdgCode ()) == PDG_t::kProton )
430- registry.fill (HIST (" ptGeneratedProton" ), mcParticle.pt ());
431- }
433+ if (mcParticle.isPhysicalPrimary () && std::fabs (mcParticle.y ())< mcRapidityMax){
434+ if (std::abs (mcParticle.pdgCode ()) == PDG_t::kPiPlus ) registry.fill (HIST (" ptGeneratedPion" ), mcParticle.pt ());
435+ if (std::abs (mcParticle.pdgCode ()) == PDG_t::kKPlus ) registry.fill (HIST (" ptGeneratedKaon" ), mcParticle.pt ());
436+ if (std::abs (mcParticle.pdgCode ()) == PDG_t::kProton ) registry.fill (HIST (" ptGeneratedProton" ), mcParticle.pt ());
437+ }
432438 }
433439 }
434440 PROCESS_SWITCH (JetShapeTask, processSim, " process pure simulation information" , true );
435441};
436442
437443WorkflowSpec defineDataProcessing (ConfigContext const & cfgc) { return WorkflowSpec{adaptAnalysisTask<JetShapeTask>(cfgc)}; }
444+
0 commit comments