Skip to content

Commit cb998d2

Browse files
authored
[DPG] Update detectorOccupancyQa.cxx - more dEdx qa plots (#10678)
1 parent cfde3c9 commit cb998d2

File tree

1 file changed

+99
-13
lines changed

1 file changed

+99
-13
lines changed

DPG/Tasks/AOTEvent/detectorOccupancyQa.cxx

Lines changed: 99 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -144,19 +144,52 @@ struct DetectorOccupancyQaTask {
144144

145145
histos.add("hNumUniqueBCInTimeWindow", ";n collisions;n events", kTH1D, {{201, -0.5, 200.5}});
146146

147+
// track QA counters
148+
histos.add("nTrackCounter_after_cuts_QA", "", kTH1D, {{12, -0.5, 11.5, "track QA"}});
149+
TAxis* axTrackCounters = reinterpret_cast<TAxis*>(histos.get<TH1>(HIST("nTrackCounter_after_cuts_QA"))->GetXaxis());
150+
axTrackCounters->SetBinLabel(1, "all");
151+
axTrackCounters->SetBinLabel(2, "PVcontrib");
152+
axTrackCounters->SetBinLabel(3, "ptCut");
153+
axTrackCounters->SetBinLabel(4, "etaCut");
154+
axTrackCounters->SetBinLabel(5, "itsNCls>=5");
155+
axTrackCounters->SetBinLabel(6, "isGlobal,nTPCcls>=70");
156+
axTrackCounters->SetBinLabel(7, "passedTPCRefit");
157+
axTrackCounters->SetBinLabel(8, "occupancy>=0");
158+
axTrackCounters->SetBinLabel(9, "fracton nClsNoPID (0,0.8)");
159+
axTrackCounters->SetBinLabel(10, "pos");
160+
axTrackCounters->SetBinLabel(11, "neg");
161+
147162
// dE/dx
148-
histos.add("dEdx_vs_Momentum", "dE/dx", kTH2F, {{1000, -5.0, 5.0, "#it{p}/Z (GeV/c)"}, {800, 0.0, 800.0, "dE/dx (a. u.)"}});
149-
histos.add("dEdx_vs_Momentum_occupBelow200", "dE/dx", kTH2F, {{1000, -5.0, 5.0, "#it{p}/Z (GeV/c)"}, {800, 0.0, 800.0, "dE/dx (a. u.)"}});
150-
histos.add("dEdx_vs_Momentum_occupBelow200_kNoCollStd", "dE/dx", kTH2F, {{1000, -5.0, 5.0, "#it{p}/Z (GeV/c)"}, {800, 0.0, 800.0, "dE/dx (a. u.)"}});
151-
histos.add("dEdx_vs_Momentum_occupAbove4000", "dE/dx", kTH2F, {{1000, -5.0, 5.0, "#it{p}/Z (GeV/c)"}, {800, 0.0, 800.0, "dE/dx (a. u.)"}});
163+
AxisSpec axisDeDx{800, 0.0, 800.0, "dE/dx (a. u.)"};
164+
histos.add("dEdx_vs_Momentum", "dE/dx", kTH2F, {{1000, -5.0, 5.0, "#it{p}/Z (GeV/c)"}, axisDeDx});
165+
histos.add("dEdx_vs_Momentum_occupBelow200", "dE/dx", kTH2F, {{1000, -5.0, 5.0, "#it{p}/Z (GeV/c)"}, axisDeDx});
166+
histos.add("dEdx_vs_Momentum_occupBelow200_kNoCollStd", "dE/dx", kTH2F, {{1000, -5.0, 5.0, "#it{p}/Z (GeV/c)"}, axisDeDx});
167+
histos.add("dEdx_vs_Momentum_occupAbove4000", "dE/dx", kTH2F, {{1000, -5.0, 5.0, "#it{p}/Z (GeV/c)"}, axisDeDx});
168+
histos.add("dEdx_vs_Momentum_NegativeFractionNclsPID", "dE/dx", kTH2F, {{1000, -5.0, 5.0, "#it{p}/Z (GeV/c)"}, axisDeDx});
169+
histos.add("dEdx_vs_Momentum_HighFractionNclsNonPID", "dE/dx", kTH2F, {{1000, -5.0, 5.0, "#it{p}/Z (GeV/c)"}, axisDeDx});
152170
AxisSpec axisBinsOccupStudydEdx{{0., 500, 1000, 2000, 4000, 6000, 8000, 15000}, "p_{T}"};
153-
histos.add("dEdx_vs_Momentum_vs_occup", "dE/dx", kTH3F, {{1000, -5.0, 5.0, "#it{p}/Z (GeV/c)"}, {800, 0.0, 800.0, "dE/dx (a. u.)"}, axisBinsOccupStudydEdx});
171+
histos.add("dEdx_vs_Momentum_vs_occup", "dE/dx", kTH3F, {{1000, -5.0, 5.0, "#it{p}/Z (GeV/c)"}, axisDeDx, axisBinsOccupStudydEdx});
154172
if (confFlagManyHeavyHistos) {
155-
histos.add("dEdx_vs_Momentum_vs_occup_eta_02_04", "dE/dx", kTH3F, {{1000, -5.0, 5.0, "#it{p}/Z (GeV/c)"}, {800, 0.0, 800.0, "dE/dx (a. u.)"}, axisBinsOccupStudydEdx});
156-
histos.add("dEdx_vs_Momentum_vs_occup_eta_04_02", "dE/dx", kTH3F, {{1000, -5.0, 5.0, "#it{p}/Z (GeV/c)"}, {800, 0.0, 800.0, "dE/dx (a. u.)"}, axisBinsOccupStudydEdx});
173+
histos.add("dEdx_vs_Momentum_vs_occup_eta_02_04", "dE/dx", kTH3F, {{1000, -5.0, 5.0, "#it{p}/Z (GeV/c)"}, axisDeDx, axisBinsOccupStudydEdx});
174+
histos.add("dEdx_vs_Momentum_vs_occup_eta_04_02", "dE/dx", kTH3F, {{1000, -5.0, 5.0, "#it{p}/Z (GeV/c)"}, axisDeDx, axisBinsOccupStudydEdx});
157175
}
158176

159-
histos.add("dEdx_vs_centr_vs_occup_narrow_p_win", "dE/dx", kTH3F, {{20, 0, 4000, "nITStrk cls567"}, {60, 0, 15000, "occupancy"}, {800, 0.0, 800.0, "dE/dx (a. u.)"}});
177+
AxisSpec axisOccupancyForDeDxStudies{60, 0, 15000, "occupancy"};
178+
histos.add("dEdx_vs_centr_vs_occup_narrow_p_win", "dE/dx", kTH3F, {{20, 0, 4000, "nITStrk cls567"}, axisOccupancyForDeDxStudies, axisDeDx});
179+
histos.add("dEdx_vs_centr_vs_occup_narrow_p_win_pos", "dE/dx", kTH3F, {{20, 0, 4000, "nITStrk cls567"}, axisOccupancyForDeDxStudies, axisDeDx});
180+
histos.add("dEdx_vs_centr_vs_occup_narrow_p_win_neg", "dE/dx", kTH3F, {{20, 0, 4000, "nITStrk cls567"}, axisOccupancyForDeDxStudies, axisDeDx});
181+
histos.add("dEdx_vs_centr_vs_occup_narrow_p_win_pos_FractionPIDclsInRange", "dE/dx", kTH3F, {{20, 0, 4000, "nITStrk cls567"}, axisOccupancyForDeDxStudies, axisDeDx});
182+
histos.add("dEdx_vs_centr_vs_occup_narrow_p_win_neg_FractionPIDclsInRange", "dE/dx", kTH3F, {{20, 0, 4000, "nITStrk cls567"}, axisOccupancyForDeDxStudies, axisDeDx});
183+
184+
AxisSpec axisFractionNclsFindableMinusPID{110, -1.1, 1.1, "TPC nClsFindableMinusPID / nClsFindable"};
185+
histos.add("fraction_tpcNClsFindableMinusPID_vs_occup", "", kTH2D, {axisOccupancyForDeDxStudies, axisFractionNclsFindableMinusPID});
186+
histos.add("fraction_tpcNClsFindableMinusPID_vs_occup_peripheralByV0A", "", kTH2D, {axisOccupancyForDeDxStudies, axisFractionNclsFindableMinusPID});
187+
histos.add("fraction_tpcNClsFindableMinusPID_vs_occup_centralByV0A", "", kTH2D, {axisOccupancyForDeDxStudies, axisFractionNclsFindableMinusPID});
188+
histos.add("fraction_tpcNClsFindableMinusPID_vs_occup_eta02", "", kTH2D, {axisOccupancyForDeDxStudies, axisFractionNclsFindableMinusPID});
189+
histos.add("fraction_tpcNClsFindableMinusPID_vs_occup_pos", "", kTH2D, {axisOccupancyForDeDxStudies, axisFractionNclsFindableMinusPID});
190+
histos.add("fraction_tpcNClsFindableMinusPID_vs_occup_neg", "", kTH2D, {axisOccupancyForDeDxStudies, axisFractionNclsFindableMinusPID});
191+
histos.add("fraction_tpcNClsFindableMinusPID_vs_occup_lowPt", "", kTH2D, {axisOccupancyForDeDxStudies, axisFractionNclsFindableMinusPID});
192+
histos.add("fraction_tpcNClsFindableMinusPID_vs_occup_highPt", "", kTH2D, {axisOccupancyForDeDxStudies, axisFractionNclsFindableMinusPID});
160193

161194
// ### kinematic distributions for events with high occupancy at specified dt ranges
162195
histos.add("track_distr_nITStrThisEv_10_200/hEventCount", ";delta-time bin id;n events", kTH1D, {{5, -0.5, 4.5}});
@@ -206,10 +239,10 @@ struct DetectorOccupancyQaTask {
206239

207240
// 3D: pt vs centr vs occup
208241
if (confFlagManyHeavyHistos) {
209-
histos.add("ptGlobal_vs_centr_vs_occup", "", kTH3F, {{20, 0, 4000, "nITStrk cls567"}, {60, 0, 15000, "occupancy"}, axisLogPt});
210-
histos.add("ptPV_vs_centr_vs_occup", "", kTH3F, {{20, 0, 4000, "nITStrk cls567"}, {60, 0, 15000, "occupancy"}, axisLogPt});
211-
histos.add("ptGlobal_vs_centr_vs_occup_NoCollStd", "", kTH3F, {{20, 0, 4000, "nITStrk cls567"}, {60, 0, 15000, "occupancy"}, axisLogPt});
212-
histos.add("ptPV_vs_centr_vs_occup_NoCollStd", "", kTH3F, {{20, 0, 4000, "nITStrk cls567"}, {60, 0, 15000, "occupancy"}, axisLogPt});
242+
histos.add("ptGlobal_vs_centr_vs_occup", "", kTH3F, {{20, 0, 4000, "nITStrk cls567"}, axisOccupancyForDeDxStudies, axisLogPt});
243+
histos.add("ptPV_vs_centr_vs_occup", "", kTH3F, {{20, 0, 4000, "nITStrk cls567"}, axisOccupancyForDeDxStudies, axisLogPt});
244+
histos.add("ptGlobal_vs_centr_vs_occup_NoCollStd", "", kTH3F, {{20, 0, 4000, "nITStrk cls567"}, axisOccupancyForDeDxStudies, axisLogPt});
245+
histos.add("ptPV_vs_centr_vs_occup_NoCollStd", "", kTH3F, {{20, 0, 4000, "nITStrk cls567"}, axisOccupancyForDeDxStudies, axisLogPt});
213246
}
214247
}
215248
// 2D
@@ -819,20 +852,28 @@ struct DetectorOccupancyQaTask {
819852

820853
auto tracksGrouped = tracks.sliceBy(perCollision, col.globalIndex());
821854
for (const auto& track : tracksGrouped) {
855+
histos.fill(HIST("nTrackCounter_after_cuts_QA"), 0);
822856
if (!track.isPVContributor())
823857
continue;
858+
histos.fill(HIST("nTrackCounter_after_cuts_QA"), 1);
824859
if (track.pt() < confCutPtMinThisEvent || track.pt() > confCutPtMaxThisEvent)
825860
continue;
861+
histos.fill(HIST("nTrackCounter_after_cuts_QA"), 2);
826862
if (track.eta() < confCutEtaMinTracksThisEvent || track.eta() > confCutEtaMaxTracksThisEvent)
827863
continue;
864+
histos.fill(HIST("nTrackCounter_after_cuts_QA"), 3);
828865
if (track.itsNCls() < 5)
829866
continue;
867+
histos.fill(HIST("nTrackCounter_after_cuts_QA"), 4);
830868
nPV++;
831869

832870
if (track.isGlobalTrack() && track.tpcNClsFound() >= confCutMinTPCcls) {
833871
nGlobalTracks++;
872+
histos.fill(HIST("nTrackCounter_after_cuts_QA"), 5);
834873

835874
if (track.passedTPCRefit()) {
875+
histos.fill(HIST("nTrackCounter_after_cuts_QA"), 6);
876+
836877
float signedP = track.sign() * track.tpcInnerParam();
837878
histos.fill(HIST("dEdx_vs_Momentum"), signedP, track.tpcSignal());
838879
if (occupancy >= 0 && occupancy < 200) {
@@ -844,6 +885,8 @@ struct DetectorOccupancyQaTask {
844885
histos.fill(HIST("dEdx_vs_Momentum_occupAbove4000"), signedP, track.tpcSignal());
845886

846887
if (occupancy >= 0) {
888+
histos.fill(HIST("nTrackCounter_after_cuts_QA"), 7);
889+
847890
histos.fill(HIST("dEdx_vs_Momentum_vs_occup"), signedP, track.tpcSignal(), occupancy);
848891

849892
if (confFlagManyHeavyHistos) {
@@ -852,9 +895,52 @@ struct DetectorOccupancyQaTask {
852895
if (track.eta() > -0.4 && track.eta() < -0.2)
853896
histos.fill(HIST("dEdx_vs_Momentum_vs_occup_eta_04_02"), signedP, track.tpcSignal(), occupancy);
854897
}
898+
899+
// check ratio tpcNClsFindableMinusPID / tpcNClsFindable (https://github.com/AliceO2Group/AliceO2/blob/dev/Framework/Core/include/Framework/AnalysisDataModel.h#L242)
900+
float fractionTPCcls = (1.0 * track.tpcNClsFindableMinusPID()) / track.tpcNClsFindable();
901+
histos.fill(HIST("fraction_tpcNClsFindableMinusPID_vs_occup"), occupancy, fractionTPCcls);
902+
if (fractionTPCcls >= 0 && fractionTPCcls < 0.8)
903+
histos.fill(HIST("nTrackCounter_after_cuts_QA"), 8);
904+
if (fractionTPCcls < 0)
905+
histos.fill(HIST("dEdx_vs_Momentum_HighFractionNclsNonPID"), signedP, track.tpcSignal());
906+
if (fractionTPCcls > 0.8)
907+
histos.fill(HIST("dEdx_vs_Momentum_NegativeFractionNclsPID"), signedP, track.tpcSignal());
908+
909+
if (multV0A < 6800)
910+
histos.fill(HIST("fraction_tpcNClsFindableMinusPID_vs_occup_peripheralByV0A"), occupancy, fractionTPCcls);
911+
else if (multV0A > 82850)
912+
histos.fill(HIST("fraction_tpcNClsFindableMinusPID_vs_occup_centralByV0A"), occupancy, fractionTPCcls);
913+
914+
if (std::fabs(track.eta()) < 0.2)
915+
histos.fill(HIST("fraction_tpcNClsFindableMinusPID_vs_occup_eta02"), occupancy, fractionTPCcls);
916+
917+
// vs charge
918+
if (signedP > 0) {
919+
histos.fill(HIST("nTrackCounter_after_cuts_QA"), 9);
920+
histos.fill(HIST("fraction_tpcNClsFindableMinusPID_vs_occup_pos"), occupancy, fractionTPCcls);
921+
} else {
922+
histos.fill(HIST("nTrackCounter_after_cuts_QA"), 10);
923+
histos.fill(HIST("fraction_tpcNClsFindableMinusPID_vs_occup_neg"), occupancy, fractionTPCcls);
924+
}
925+
// vs pt
926+
if (track.pt() > 0.2 && track.pt() < 0.8)
927+
histos.fill(HIST("fraction_tpcNClsFindableMinusPID_vs_occup_lowPt"), occupancy, fractionTPCcls);
928+
if (track.pt() > 0.8 && track.pt() < 10)
929+
histos.fill(HIST("fraction_tpcNClsFindableMinusPID_vs_occup_highPt"), occupancy, fractionTPCcls);
930+
855931
// dE/dx in narrow mom bin vs centrality and occupancy
856-
if (signedP > 0.38 && signedP < 0.4)
932+
if (std::fabs(signedP) > 0.38 && std::fabs(signedP) < 0.4)
857933
histos.fill(HIST("dEdx_vs_centr_vs_occup_narrow_p_win"), nPV, occupancy, track.tpcSignal());
934+
// vs charge
935+
if (signedP > 0.38 && signedP < 0.4) {
936+
histos.fill(HIST("dEdx_vs_centr_vs_occup_narrow_p_win_pos"), nPV, occupancy, track.tpcSignal());
937+
if (fractionTPCcls >= 0 && fractionTPCcls < 0.8)
938+
histos.fill(HIST("dEdx_vs_centr_vs_occup_narrow_p_win_pos_FractionPIDclsInRange"), nPV, occupancy, track.tpcSignal());
939+
} else if (signedP > -0.4 && signedP < -0.38) {
940+
histos.fill(HIST("dEdx_vs_centr_vs_occup_narrow_p_win_neg"), nPV, occupancy, track.tpcSignal());
941+
if (fractionTPCcls >= 0 && fractionTPCcls < 0.8)
942+
histos.fill(HIST("dEdx_vs_centr_vs_occup_narrow_p_win_neg_FractionPIDclsInRange"), nPV, occupancy, track.tpcSignal());
943+
}
858944
}
859945
}
860946
}

0 commit comments

Comments
 (0)