Skip to content

Commit b193d93

Browse files
arossi81Andrea Rossialibuild
authored
Adding some histos for pt,eta,phi mapping for definition of Std cuts. (AliceO2Group#832)
* Adding some histos for pt,eta,phi mapping for definition of Std cuts. * Please consider the following formatting changes Co-authored-by: Andrea Rossi <[email protected]> Co-authored-by: ALICE Action Bot <[email protected]>
1 parent 5f3eaca commit b193d93

File tree

1 file changed

+83
-0
lines changed

1 file changed

+83
-0
lines changed

DPG/Tasks/qaEventTrackLite.cxx

+83
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,15 @@ struct qaEventTrackLite {
6666
Configurable<float> chi2TofMin{"chi2TofMin", -1001.f, "Max TOF chi2"};
6767
Configurable<float> lengthMin{"lengthMin", -1001.f, "Min length"};
6868

69+
// Selection 1
70+
// ITS selections
71+
Configurable<float> chi2ItsMaxSel1{"chi2ItsMaxSel1", 1000.f, "Max ITS chi2 Sel1"};
72+
// TPC selections
73+
Configurable<int> nClusterTpcMinSel1{"nClusterTpcMinSel1", -1001, "Minimum number of TPC clusters Sel1"};
74+
Configurable<int> nCrossedRowsTpcMinSel1{"nCrossedRowsTpcMinSel1", -1001, "Minimum number of TPC crossed rows Sel1"};
75+
Configurable<float> nCrossedRowsTpcOverFindableClustersTpcMinSel1{"nCrossedRowsTpcOverFindableClustersTpcMinSel1", -1, "Minimum ratio between TPC crossed rows and findable clusters Sel1"};
76+
Configurable<float> chi2TpcMaxSel1{"chi2TpcMaxSel1", 1000.f, "Max TPC chi2 Sel1"};
77+
6978
void init(InitContext const&)
7079
{
7180
const AxisSpec axisPt{binsPt, "#it{p}_{T} [GeV/c]"};
@@ -110,13 +119,23 @@ struct qaEventTrackLite {
110119
// kinematics
111120
histos.add("Tracks/relativeResoPt", "relative #it{p}_{T} resolution;#sigma(#it{p}_{T})/#it{p}_{T};#it{p}_{T};", kTH2D, {{axisPt, {500, 0., 1, "#sigma{#it{p}}/#it{p}_{T}"}}});
112121
histos.add("Tracks/relativeResoPtMean", "mean relative #it{p}_{T} resolution;#LT(#it{p}_{T})/#it{p}_{T}#GT;#it{p}_{T};", kTProfile, {axisPt});
122+
// track cuts map
123+
histos.add("TrackCuts/selPtEtaPhiNoSel", "pt eta phi map no el; pt,eta,phi", kTH3D, {axisPt, {50, -1.2, 1.2, "#eta"}, {30, 0., 2 * M_PI, "#varphi"}});
124+
histos.add("TrackCuts/selPtEtaPhiSel1", "pt eta phi map sel 1; pt,eta,phi", kTH3D, {axisPt, {50, -1.2, 1.2, "#eta"}, {30, 0., 2 * M_PI, "#varphi"}});
125+
histos.add("TrackCuts/selPtEtaPhiSel2", "pt eta phi map sel 2; pt,eta,phi", kTH3D, {axisPt, {50, -1.2, 1.2, "#eta"}, {30, 0., 2 * M_PI, "#varphi"}});
126+
histos.add("TrackCuts/selPtEtaPhiSel3", "pt eta phi map sel 3; pt,eta,phi", kTH3D, {axisPt, {50, -1.2, 1.2, "#eta"}, {30, 0., 2 * M_PI, "#varphi"}});
113127

114128
// MC histograms
115129
if (doprocessMCLite) {
116130
histos.add("Particles/PDGs", "Particle PDGs;PDG Code", kTH1D, {{100, 0.f, 100.f}});
117131
histos.add("Particles/Kine/pt", "Particle #it{p}_{T}", kTH1D, {axisPt});
118132
histos.add("Particles/Kine/eta", "Particle #eta", kTH1D, {axisEta});
119133
histos.add("Particles/Kine/phi", "Particle #phi", kTH1D, {axisPhi});
134+
histos.add("Particle/selPtEtaPhiMCGenPrimary", "pt eta phi map MC gen Primary; pt,eta,phi", kTH3D, {axisPt, {50, -1.2, 1.2, "#eta"}, {30, 0., 2 * M_PI, "#varphi"}});
135+
histos.add("Particle/selPtEtaPhiMCRecoNoSelPrimary", "pt eta phi map MC gen Primary; pt,eta,phi", kTH3D, {axisPt, {50, -1.2, 1.2, "#eta"}, {30, 0., 2 * M_PI, "#varphi"}});
136+
histos.add("Particle/selPtEtaPhiMCRecoSel1Primary", "pt eta phi map MC gen Primary; pt,eta,phi", kTH3D, {axisPt, {50, -1.2, 1.2, "#eta"}, {30, 0., 2 * M_PI, "#varphi"}});
137+
histos.add("Particle/selPtEtaPhiMCRecoSel2Primary", "pt eta phi map MC gen Primary; pt,eta,phi", kTH3D, {axisPt, {50, -1.2, 1.2, "#eta"}, {30, 0., 2 * M_PI, "#varphi"}});
138+
histos.add("Particle/selPtEtaPhiMCRecoSel3Primary", "pt eta phi map MC gen Primary; pt,eta,phi", kTH3D, {axisPt, {50, -1.2, 1.2, "#eta"}, {30, 0., 2 * M_PI, "#varphi"}});
120139
}
121140
}
122141

@@ -145,6 +164,11 @@ struct qaEventTrackLite {
145164
void processDataLite(o2::soa::Filtered<aod::DPGTracks> const& tracks, aod::DPGCollisions const&)
146165
{
147166
for (const auto& track : tracks) {
167+
// temporary additional selections
168+
if (!applyTrackSelectionsNotFiltered(track))
169+
continue;
170+
Bool_t sel1 = applyTrackSelectionsNotFilteredSel1(track);
171+
148172
histos.fill(HIST("Tracks/VertexPositionZ"), track.dpgCollision().posZ());
149173
histos.fill(HIST("Tracks/Kine/pt"), track.pt());
150174
histos.fill(HIST("Tracks/Kine/eta"), track.eta());
@@ -180,6 +204,13 @@ struct qaEventTrackLite {
180204
}
181205
histos.fill(HIST("Tracks/relativeResoPt"), track.pt(), track.ptReso());
182206
histos.fill(HIST("Tracks/relativeResoPtMean"), track.pt(), track.ptReso());
207+
208+
histos.fill(HIST("TrackCuts/selPtEtaPhiNoSel"), track.pt(), track.eta(), track.phi());
209+
if (sel1) {
210+
histos.fill(HIST("TrackCuts/selPtEtaPhiSel1"), track.pt(), track.eta(), track.phi());
211+
}
212+
histos.fill(HIST("TrackCuts/selPtEtaPhiSel2"), track.pt(), track.eta(), track.phi());
213+
histos.fill(HIST("TrackCuts/selPtEtaPhiSel3"), track.pt(), track.eta(), track.phi());
183214
}
184215
}
185216
PROCESS_SWITCH(qaEventTrackLite, processDataLite, "process data lite", true);
@@ -188,8 +219,22 @@ struct qaEventTrackLite {
188219
void processMCLite(o2::soa::Filtered<soa::Join<aod::DPGTracks, aod::DPGRecoParticles>> const& tracks, aod::DPGCollisions const&, aod::DPGNonRecoParticles const& particles)
189220
{
190221
for (const auto& track : tracks) {
222+
223+
// temporary additional selections
224+
if (!applyTrackSelectionsNotFiltered(track))
225+
continue;
226+
Bool_t sel1 = applyTrackSelectionsNotFilteredSel1(track);
227+
191228
if (track.productionMode() == 0) {
192229
histos.get<TH1>(HIST("Particles/PDGs"))->Fill(Form("%i", track.pdgCode()), 1);
230+
histos.fill(HIST("Particle/selPtEtaPhiMCRecoNoSelPrimary"), track.ptMC(), track.eta(), track.phi());
231+
232+
if (sel1) {
233+
histos.fill(HIST("Particle/selPtEtaPhiMCRecoSel1Primary"), track.ptMC(), track.eta(), track.phi());
234+
}
235+
236+
histos.fill(HIST("Particle/selPtEtaPhiMCRecoSel2Primary"), track.ptMC(), track.eta(), track.phi());
237+
histos.fill(HIST("Particle/selPtEtaPhiMCRecoSel3Primary"), track.ptMC(), track.eta(), track.phi());
193238
}
194239

195240
histos.fill(HIST("Particles/Kine/pt"), track.ptMC());
@@ -226,15 +271,53 @@ struct qaEventTrackLite {
226271
if (track.hasTOF()) {
227272
histos.fill(HIST("Tracks/matchedDet"), 4);
228273
}
274+
histos.fill(HIST("TrackCuts/selPtEtaPhiNoSel"), track.ptMC(), track.eta(), track.phi());
275+
if (sel1) {
276+
histos.fill(HIST("TrackCuts/selPtEtaPhiSel1"), track.ptMC(), track.eta(), track.phi());
277+
}
278+
histos.fill(HIST("TrackCuts/selPtEtaPhiSel2"), track.ptMC(), track.eta(), track.phi());
279+
histos.fill(HIST("TrackCuts/selPtEtaPhiSel3"), track.ptMC(), track.eta(), track.phi());
229280
}
230281

231282
for (const auto& particle : particles) {
232283
histos.fill(HIST("Particles/Kine/pt"), particle.ptMC());
233284
histos.fill(HIST("Particles/Kine/eta"), particle.etaMC());
234285
histos.fill(HIST("Particles/Kine/phi"), particle.phiMC());
286+
287+
if (particle.productionMode() == 0)
288+
histos.fill(HIST("Particle/selPtEtaPhiMCGenPrimary"), particle.ptMC(), particle.etaMC(), particle.phiMC());
235289
}
236290
}
237291
PROCESS_SWITCH(qaEventTrackLite, processMCLite, "process MC lite", false);
292+
293+
template <typename T>
294+
bool applyTrackSelectionsNotFiltered(const T& track)
295+
{
296+
if (track.tpcNClsFound() < nClusterTpcMin)
297+
return false;
298+
if (track.tpcNClsCrossedRows() < nCrossedRowsTpcMin)
299+
return false;
300+
if (track.tpcCrossedRowsOverFindableCls() < nCrossedRowsTpcOverFindableClustersTpcMin)
301+
return false;
302+
return true;
303+
}
304+
305+
template <typename T>
306+
bool applyTrackSelectionsNotFilteredSel1(const T& track)
307+
{
308+
if (track.tpcNClsFound() < nClusterTpcMinSel1)
309+
return false;
310+
if (track.tpcNClsCrossedRows() < nCrossedRowsTpcMinSel1)
311+
return false;
312+
if (track.tpcCrossedRowsOverFindableCls() < nCrossedRowsTpcOverFindableClustersTpcMinSel1)
313+
return false;
314+
if (track.itsChi2NCl() > chi2ItsMaxSel1)
315+
return false;
316+
if (track.tpcChi2NCl() > chi2TpcMaxSel1)
317+
return false;
318+
319+
return true;
320+
}
238321
};
239322

240323
WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)

0 commit comments

Comments
 (0)