@@ -30,6 +30,10 @@ using namespace o2;
3030using namespace o2 ::framework;
3131using namespace o2 ::framework::expressions;
3232
33+ AxisSpec PtAxis = {1001 , -0.005 , 10.005 };
34+
35+ using MFTTracksLabeled = soa::Join<o2::aod::MFTTracks, aod::McMFTTrackLabels>;
36+
3337struct PseudorapidityDensityMFT {
3438 Service<TDatabasePDG> pdg;
3539
@@ -41,6 +45,7 @@ struct PseudorapidityDensityMFT {
4145 {" EventsNtrkZvtx" , " ; N_{trk}; Z_{vtx}; events" , {HistType::kTH2F , {{301 , -0.5 , 300.5 }, {201 , -20.1 , 20.1 }}}}, //
4246 {" TracksEtaZvtx" , " ; #eta; Z_{vtx}; tracks" , {HistType::kTH2F , {{18 , -4.6 , -1 .}, {201 , -20.1 , 20.1 }}}}, //
4347 {" TracksPhiEta" , " ; #varphi; #eta; tracks" , {HistType::kTH2F , {{600 , 0 , 2 * M_PI}, {18 , -4.6 , -1 .}}}}, //
48+ {" TracksPtEta" , " ; p_{T} (GeV/c); #eta" , {HistType::kTH2F , {PtAxis, {18 , -4.6 , -1 .}}}}, //
4449 {" EventSelection" , " ;status;events" , {HistType::kTH1F , {{7 , 0.5 , 7.5 }}}} //
4550 } //
4651 };
@@ -63,6 +68,9 @@ struct PseudorapidityDensityMFT {
6368 registry.add ({" TracksEtaZvtxGen" , " ; #eta; Z_{vtx}; tracks" , {HistType::kTH2F , {{18 , -4.6 , -1 .}, {201 , -20.1 , 20.1 }}}});
6469 registry.add ({" TracksEtaZvtxGen_t" , " ; #eta; Z_{vtx}; tracks" , {HistType::kTH2F , {{18 , -4.6 , -1 .}, {201 , -20.1 , 20.1 }}}});
6570 registry.add ({" TracksPhiEtaGen" , " ; #varphi; #eta; tracks" , {HistType::kTH2F , {{600 , 0 , 2 * M_PI}, {18 , -4.6 , -1 .}}}});
71+ registry.add ({" TracksToPartPtEta" , " ; p_{T} (GeV/c); #eta" , {HistType::kTH2F , {PtAxis, {18 , -4.6 , -1 .}}}}); //
72+ registry.add ({" TracksPtEtaGen" , " ; p_{T} (GeV/c); #eta" , {HistType::kTH2F , {PtAxis, {18 , -4.6 , -1 .}}}});
73+ registry.add ({" TracksPtEtaGen_t" , " ; p_{T} (GeV/c); #eta" , {HistType::kTH2F , {PtAxis, {18 , -4.6 , -1 .}}}});
6674 registry.add ({" EventEfficiency" , " ; status; events" , {HistType::kTH1F , {{5 , 0.5 , 5.5 }}}});
6775 registry.add ({" NotFoundEventZvtx" , " ; Z_{vtx}" , {HistType::kTH1F , {{201 , -20.1 , 20.1 }}}});
6876
@@ -121,6 +129,7 @@ struct PseudorapidityDensityMFT {
121129 float phi = track.phi ();
122130 o2::math_utils::bringTo02Pi (phi);
123131 registry.fill (HIST (" TracksPhiEta" ), phi, track.eta ());
132+ registry.fill (HIST (" TracksPtEta" ), track.pt (), track.eta ());
124133 }
125134 } else {
126135 registry.fill (HIST (" EventSelection" ), 4 .);
@@ -165,15 +174,33 @@ struct PseudorapidityDensityMFT {
165174 registry.fill (HIST (" TracksEtaZvtxGen_t" ), particle.eta (), mcCollision.posZ ());
166175 if (atLeastOne) {
167176 registry.fill (HIST (" TracksEtaZvtxGen" ), particle.eta (), mcCollision.posZ ());
177+ registry.fill (HIST (" TracksPtEtaGen" ), particle.pt (), particle.eta ());
168178 }
169179 registry.fill (HIST (" TracksPhiEtaGen" ), particle.phi (), particle.eta ());
180+ registry.fill (HIST (" TracksPtEtaGen_t" ), particle.pt (), particle.eta ());
170181
171182 nCharged++;
172183 }
173184 registry.fill (HIST (" EventsNtrkZvtxGen_t" ), nCharged, mcCollision.posZ ());
174185 }
175186
176187 PROCESS_SWITCH (PseudorapidityDensityMFT, processGen, " Process generator-level info" , false );
188+
189+ void processGenPt (soa::Join<aod::Collisions, aod::EvSels>::iterator const & collision, MFTTracksLabeled const & tracks, aod::McParticles const &)
190+ {
191+ // In the MFT the measurement of pT is not precise, so we access it by using the particle's pT instead
192+ if (!useEvSel || (useEvSel && collision.sel8 ())) {
193+ for (auto & track : tracks) {
194+ if (!track.has_mcParticle ()) {
195+ continue ;
196+ }
197+ auto particle = track.mcParticle ();
198+ registry.fill (HIST (" TracksToPartPtEta" ), particle.pt (), particle.eta ());
199+ }
200+ }
201+ }
202+
203+ PROCESS_SWITCH (PseudorapidityDensityMFT, processGenPt, " Process particle-level info of pt" , false );
177204};
178205
179206WorkflowSpec
0 commit comments