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 < 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"
16+ #include " PWGJE/Core/FastJetUtilities.h"
17+ #include " PWGJE/Core/JetDerivedDataUtilities.h"
18+ #include " PWGJE/Core/JetUtilities.h"
19+ #include " PWGJE/DataModel/Jet.h"
2420
2521#include " Common/Core/RecoDecay.h"
2622#include " Common/Core/TrackSelection.h"
2723#include " Common/Core/TrackSelectionDefaults.h"
2824#include " Common/DataModel/EventSelection.h"
2925#include " Common/DataModel/TrackSelectionTables.h"
3026
31- #include " PWGJE/Core/FastJetUtilities.h"
32- #include " PWGJE/Core/JetUtilities.h"
33- #include " PWGJE/Core/JetDerivedDataUtilities.h"
34- #include " PWGJE/DataModel/Jet.h"
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+
3533#include < TPDGCode.h>
3634
37- #include " Framework/runDataProcessing.h"
35+ #include < cmath>
36+ #include < string>
37+ #include < vector>
3838
3939using namespace o2 ;
4040using namespace o2 ::framework;
@@ -101,13 +101,13 @@ struct JetShapeTask {
101101 {" eventCounter" , " eventCounter" , {HistType::kTH1F , {{1 , 0 , +1 , " " }}}},
102102 {" ptVsCentrality" , " ptvscentrality" , {HistType::kTH2F , {{100 , 0 , 100 }, {300 , 0 , 300 }}}},
103103 {" 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}}}},
104+ {" ptHistogramPion" , " ptHistogramPion" , {HistType::kTH1F , {{nBinsPt, 0 , ptMax}}}},
105+ {" ptHistogramKaon" , " ptHistogramKaon" , {HistType::kTH1F , {{nBinsPt, 0 , ptMax}}}},
106106 {" ptHistogramProton" , " ptHistogramProton" , {HistType::kTH1F , {{nBinsPt, 0 , ptMax}}}},
107- {" ptHistogramPionTof" , " ptHistogramPionTof" , {HistType::kTH1F , {{nBinsPt, 0 , ptMax}}}},
108- {" ptHistogramKaonTof" , " ptHistogramKaonTof" , {HistType::kTH1F , {{nBinsPt, 0 , ptMax}}}},
107+ {" ptHistogramPionTof" , " ptHistogramPionTof" , {HistType::kTH1F , {{nBinsPt, 0 , ptMax}}}},
108+ {" ptHistogramKaonTof" , " ptHistogramKaonTof" , {HistType::kTH1F , {{nBinsPt, 0 , ptMax}}}},
109109 {" ptHistogramProtonTof" , " ptHistogramProtonTof" , {HistType::kTH1F , {{nBinsPt, 0 , ptMax}}}},
110- {" ptGeneratedPion" , " ptGeneratedPion" , {HistType::kTH1F , {{nBinsPt, 0 , ptMax}}}},
110+ {" ptGeneratedPion" , " ptGeneratedPion" , {HistType::kTH1F , {{nBinsPt, 0 , ptMax}}}},
111111 {" ptGeneratedKaon" , " ptGeneratedKaon" , {HistType::kTH1F , {{nBinsPt, 0 , ptMax}}}},
112112 {" ptGeneratedProton" , " ptGeneratedProton" , {HistType::kTH1F , {{nBinsPt, 0 , ptMax}}}}}};
113113
@@ -384,13 +384,12 @@ struct JetShapeTask {
384384 }
385385 PROCESS_SWITCH (JetShapeTask, processProductionRatio, " production ratio" , false );
386386
387-
388- void processReco (soa::Join<aod::Tracks, aod::TracksExtra, aod::TracksDCA, aod::McTrackLabels>const & tracks, aod::McParticles const &)
387+ void processReco (soa::Join<aod::Tracks, aod::TracksExtra, aod::TracksDCA, aod::McTrackLabels> const & tracks, aod::McParticles const &)
389388 {
390389 registry.fill (HIST (" eventCounter" ), 0.5 );
391390
392391 for (const auto & track : tracks) {
393- if (track.has_mcParticle ()){
392+ if (track.has_mcParticle ()) {
394393 auto mcParticle = track.mcParticle ();
395394 registry.fill (HIST (" ptResolution" ), track.pt (), track.pt () - mcParticle.pt ());
396395
@@ -409,36 +408,44 @@ struct JetShapeTask {
409408 if (track.itsNCls () < nclItsMin)
410409 continue ;
411410
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 ());
411+ if (mcParticle.isPhysicalPrimary () && std::fabs (mcParticle.y ()) < mcRapidityMax) { // do this in the context of the track ! (context matters!!!)
412+ if (std::abs (mcParticle.pdgCode ()) == PDG_t::kPiPlus )
413+ registry.fill (HIST (" ptHistogramPion" ), mcParticle.pt ());
414+ if (std::abs (mcParticle.pdgCode ()) == PDG_t::kKPlus )
415+ registry.fill (HIST (" ptHistogramKaon" ), mcParticle.pt ());
416+ if (std::abs (mcParticle.pdgCode ()) == PDG_t::kProton )
417+ registry.fill (HIST (" ptHistogramProton" ), mcParticle.pt ());
416418 }
417419
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 ());
420+ if (track.hasTOF ()) {
421+ if (mcParticle.isPhysicalPrimary () && std::fabs (mcParticle.y ()) < mcRapidityMax) {
422+ if (std::abs (mcParticle.pdgCode ()) == PDG_t::kPiPlus )
423+ registry.fill (HIST (" ptHistogramPionTof" ), mcParticle.pt ());
424+ if (std::abs (mcParticle.pdgCode ()) == PDG_t::kKPlus )
425+ registry.fill (HIST (" ptHistogramKaonTof" ), mcParticle.pt ());
426+ if (std::abs (mcParticle.pdgCode ()) == PDG_t::kProton )
427+ registry.fill (HIST (" ptHistogramProtonTof" ), mcParticle.pt ());
423428 }
424429 }
425430 }
426431 }
427432 }
428433 PROCESS_SWITCH (JetShapeTask, processReco, " process reconstructed information" , true );
429-
430- void processSim (aod::McParticles const & mcParticles)
434+
435+ void processSim (aod::McParticles const & mcParticles)
431436 {
432437 for (const auto & mcParticle : mcParticles) {
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- }
438+ if (mcParticle.isPhysicalPrimary () && std::fabs (mcParticle.y ()) < mcRapidityMax) {
439+ if (std::abs (mcParticle.pdgCode ()) == PDG_t::kPiPlus )
440+ registry.fill (HIST (" ptGeneratedPion" ), mcParticle.pt ());
441+ if (std::abs (mcParticle.pdgCode ()) == PDG_t::kKPlus )
442+ registry.fill (HIST (" ptGeneratedKaon" ), mcParticle.pt ());
443+ if (std::abs (mcParticle.pdgCode ()) == PDG_t::kProton )
444+ registry.fill (HIST (" ptGeneratedProton" ), mcParticle.pt ());
445+ }
438446 }
439447 }
440448 PROCESS_SWITCH (JetShapeTask, processSim, " process pure simulation information" , true );
441449};
442450
443451WorkflowSpec defineDataProcessing (ConfigContext const & cfgc) { return WorkflowSpec{adaptAnalysisTask<JetShapeTask>(cfgc)}; }
444-
0 commit comments