Skip to content

Commit 87cc8e3

Browse files
authored
[DPG] additional qa histograms (#13708)
1 parent 3c97523 commit 87cc8e3

File tree

2 files changed

+38
-10
lines changed

2 files changed

+38
-10
lines changed

DPG/Tasks/AOTEvent/eventSelectionQa.cxx

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ struct EventSelectionQaTask {
7070
Configurable<int32_t> nGlobalBCs{"nGlobalBCs", 100000, "number of global bcs for detailed monitoring"};
7171
Configurable<bool> isLowFlux{"isLowFlux", 1, "1 - low flux (pp, pPb), 0 - high flux (PbPb)"};
7272
Configurable<bool> fillITSdeadStaveHists{"fillITSdeadStaveHists", 0, "0 - no, 1 - yes"};
73+
Configurable<bool> fillTPCnClsVsOccupancyHists{"fillTPCnClsVsOccupancyHists", 0, "0 - no, 1 - yes"};
7374

7475
Service<o2::ccdb::BasicCCDBManager> ccdb;
7576
HistogramRegistry histos{"Histos", {}, OutputObjHandlingPolicy::AnalysisObject};
@@ -375,18 +376,24 @@ struct EventSelectionQaTask {
375376
histos.add("occupancyQA/hNumTracksITSTPC_vs_V0A_vs_occupancy", "", kTH3F, {axisMultV0AForOccup, axisNtracksPVTPC, axisOccupancyTracks});
376377
histos.add("occupancyQA/hNumTracksPV_vs_V0A_vs_occupancy_NarrowDeltaTimeCut", "", kTH3F, {axisMultV0AForOccup, axisNtracksPV, axisOccupancyTracks});
377378
histos.add("occupancyQA/hNumTracksPVTPC_vs_V0A_vs_occupancy_NarrowDeltaTimeCut", "", kTH3F, {axisMultV0AForOccup, axisNtracksPVTPC, axisOccupancyTracks});
379+
histos.add("occupancyQA/hNumTracksPV_vs_V0A_vs_occupancy_StandardDeltaTimeCut", "", kTH3F, {axisMultV0AForOccup, axisNtracksPV, axisOccupancyTracks});
380+
histos.add("occupancyQA/hNumTracksPVTPC_vs_V0A_vs_occupancy_StandardDeltaTimeCut", "", kTH3F, {axisMultV0AForOccup, axisNtracksPVTPC, axisOccupancyTracks});
381+
histos.add("occupancyQA/hNumTracksPV_vs_V0A_vs_occupancy_GoodITSLayersAllCut", "", kTH3F, {axisMultV0AForOccup, axisNtracksPV, axisOccupancyTracks});
382+
histos.add("occupancyQA/hNumTracksPVTPC_vs_V0A_vs_occupancy_GoodITSLayersAllCut", "", kTH3F, {axisMultV0AForOccup, axisNtracksPVTPC, axisOccupancyTracks});
378383
// requested by TPC experts: nTPConly tracks vs occupancy
379384
histos.add("occupancyQA/hNumTracksTPConly_vs_V0A_vs_occupancy", "", kTH3F, {axisMultV0AForOccup, axisNtracksTPConly, axisOccupancyTracks});
380385
histos.add("occupancyQA/hNumTracksTPConlyNoITS_vs_V0A_vs_occupancy", "", kTH3F, {axisMultV0AForOccup, axisNtracksTPConly, axisOccupancyTracks});
381386
// request from experts to add track properties vs occupancy, to compare data vs MC
382-
const AxisSpec axisOccupancyForTrackQA{60, 0., 15000, "occupancy (n ITS tracks weighted)"};
383-
const AxisSpec axisNTPCcls{150, 0, 150, "n TPC clusters"};
384-
histos.add("occupancyQA/tpcNClsFound_vs_V0A_vs_occupancy", "", kTH3F, {axisMultV0AForOccup, axisNTPCcls, axisOccupancyForTrackQA});
385-
histos.add("occupancyQA/tpcNClsFindable_vs_V0A_vs_occupancy", "", kTH3F, {axisMultV0AForOccup, axisNTPCcls, axisOccupancyForTrackQA});
386-
histos.add("occupancyQA/tpcNClsShared_vs_V0A_vs_occupancy", "", kTH3F, {axisMultV0AForOccup, axisNTPCcls, axisOccupancyForTrackQA});
387-
histos.add("occupancyQA/tpcNCrossedRows_vs_V0A_vs_occupancy", "", kTH3F, {axisMultV0AForOccup, axisNTPCcls, axisOccupancyForTrackQA});
388-
const AxisSpec axisChi2TPC{150, 0, 15, "chi2Ncl TPC"};
389-
histos.add("occupancyQA/tpcChi2_vs_V0A_vs_occupancy", "", kTH3F, {axisMultV0AForOccup, axisChi2TPC, axisOccupancyForTrackQA});
387+
if (fillTPCnClsVsOccupancyHists) {
388+
const AxisSpec axisOccupancyForTrackQA{60, 0., 15000, "occupancy (n ITS tracks weighted)"};
389+
const AxisSpec axisNTPCcls{150, 0, 150, "n TPC clusters"};
390+
histos.add("occupancyQA/tpcNClsFound_vs_V0A_vs_occupancy", "", kTH3F, {axisMultV0AForOccup, axisNTPCcls, axisOccupancyForTrackQA});
391+
histos.add("occupancyQA/tpcNClsFindable_vs_V0A_vs_occupancy", "", kTH3F, {axisMultV0AForOccup, axisNTPCcls, axisOccupancyForTrackQA});
392+
histos.add("occupancyQA/tpcNClsShared_vs_V0A_vs_occupancy", "", kTH3F, {axisMultV0AForOccup, axisNTPCcls, axisOccupancyForTrackQA});
393+
histos.add("occupancyQA/tpcNCrossedRows_vs_V0A_vs_occupancy", "", kTH3F, {axisMultV0AForOccup, axisNTPCcls, axisOccupancyForTrackQA});
394+
const AxisSpec axisChi2TPC{150, 0, 15, "chi2Ncl TPC"};
395+
histos.add("occupancyQA/tpcChi2_vs_V0A_vs_occupancy", "", kTH3F, {axisMultV0AForOccup, axisChi2TPC, axisOccupancyForTrackQA});
396+
}
390397

391398
// ITS in-ROF occupancy
392399
histos.add("occupancyQA/hITSTracks_ev1_vs_ev2_2coll_in_ROF", ";nITStracks event #1;nITStracks event #2", kTH2D, {{200, 0., 6000}, {200, 0., 6000}});
@@ -1198,7 +1205,7 @@ struct EventSelectionQaTask {
11981205
if (track.hasTPC()) {
11991206
nContributorsAfterEtaTPCLooseCuts++;
12001207

1201-
if (!isLowFlux && col.sel8() && col.selection_bit(kNoSameBunchPileup) && fabs(col.posZ()) < 10 && occupancyByTracks >= 0) {
1208+
if (!isLowFlux && fillTPCnClsVsOccupancyHists && col.sel8() && col.selection_bit(kNoSameBunchPileup) && fabs(col.posZ()) < 10 && occupancyByTracks >= 0) {
12021209
histos.fill(HIST("occupancyQA/tpcNClsFound_vs_V0A_vs_occupancy"), multV0A, track.tpcNClsFound(), occupancyByTracks);
12031210
histos.fill(HIST("occupancyQA/tpcNClsFindable_vs_V0A_vs_occupancy"), multV0A, track.tpcNClsFindable(), occupancyByTracks);
12041211
histos.fill(HIST("occupancyQA/tpcNClsShared_vs_V0A_vs_occupancy"), multV0A, track.tpcNClsShared(), occupancyByTracks);
@@ -1248,6 +1255,14 @@ struct EventSelectionQaTask {
12481255
histos.fill(HIST("occupancyQA/hNumTracksPV_vs_V0A_vs_occupancy_NarrowDeltaTimeCut"), multV0A, nPV, occupancyByTracks);
12491256
histos.fill(HIST("occupancyQA/hNumTracksPVTPC_vs_V0A_vs_occupancy_NarrowDeltaTimeCut"), multV0A, nContributorsAfterEtaTPCCuts, occupancyByTracks);
12501257
}
1258+
if (col.selection_bit(kNoCollInTimeRangeStandard)) {
1259+
histos.fill(HIST("occupancyQA/hNumTracksPV_vs_V0A_vs_occupancy_StandardDeltaTimeCut"), multV0A, nPV, occupancyByTracks);
1260+
histos.fill(HIST("occupancyQA/hNumTracksPVTPC_vs_V0A_vs_occupancy_StandardDeltaTimeCut"), multV0A, nContributorsAfterEtaTPCCuts, occupancyByTracks);
1261+
}
1262+
if (col.selection_bit(kIsGoodITSLayersAll)) {
1263+
histos.fill(HIST("occupancyQA/hNumTracksPV_vs_V0A_vs_occupancy_GoodITSLayersAllCut"), multV0A, nPV, occupancyByTracks);
1264+
histos.fill(HIST("occupancyQA/hNumTracksPVTPC_vs_V0A_vs_occupancy_GoodITSLayersAllCut"), multV0A, nContributorsAfterEtaTPCCuts, occupancyByTracks);
1265+
}
12511266
histos.fill(HIST("occupancyQA/hNumTracksTPConly_vs_V0A_vs_occupancy"), multV0A, nTPConly, occupancyByTracks);
12521267
histos.fill(HIST("occupancyQA/hNumTracksTPConlyNoITS_vs_V0A_vs_occupancy"), multV0A, nTPConlyNoITS, occupancyByTracks);
12531268

DPG/Tasks/AOTEvent/timeDependentQa.cxx

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ struct TimeDependentQaTask {
6969
Configurable<float> confTimeBinWidthInSec{"TimeBinWidthInSec", 0.5, "Width of time bins in seconds"}; // o2-linter: disable=name/configurable (temporary fix)
7070
Configurable<float> confTimeWiderBinFactor{"TimeWideBinFactor", 4, "Factor for wider time bins for some 2D histograms"}; // o2-linter: disable=name/configurable (temporary fix)
7171
Configurable<float> confTimeMuchWiderBinFactor{"TimeMuchWiderBinFactor", 20, "Factor for even wider time bins for some 2D histograms"}; // o2-linter: disable=name/configurable (temporary fix)
72+
Configurable<float> confTimeMuchMuchWiderBinFactor{"TimeMuchMuchWiderBinFactor", 120, "Factor for super wide time bins for some 2D histograms"}; // o2-linter: disable=name/configurable (temporary fix)
7273
Configurable<int> confTakeVerticesWithUPCsettings{"ConsiderVerticesWithUPCsettings", 0, "Take vertices: 0 - all , 1 - only without UPC settings, 2 - only with UPC settings"}; // o2-linter: disable=name/configurable (temporary fix)
7374
Configurable<int> confFlagFillPhiVsTimeHist{"FlagFillPhiVsTimeHist", 2, "0 - don't fill , 1 - fill only for global/7cls/TRD/TOF tracks, 2 - fill also layer-by-layer"}; // o2-linter: disable=name/configurable (temporary fix)
7475
Configurable<int> confFlagFillEtaPhiVsTimeHist{"FlagFillEtaPhiVsTimeHist", 0, "0 - don't fill , 1 - fill"}; // o2-linter: disable=name/configurable (temporary fix)
@@ -205,11 +206,14 @@ struct TimeDependentQaTask {
205206
int nTimeBins = static_cast<int>((maxSec - minSec) / confTimeBinWidthInSec);
206207
int nTimeWideBins = static_cast<int>((maxSec - minSec) / confTimeBinWidthInSec / confTimeWiderBinFactor);
207208
int nTimeVeryWideBins = static_cast<int>((maxSec - minSec) / confTimeBinWidthInSec / confTimeMuchWiderBinFactor);
209+
int nTimeSuperWideBins = static_cast<int>((maxSec - minSec) / confTimeBinWidthInSec / confTimeMuchMuchWiderBinFactor);
208210
double timeInterval = nTimeBins * confTimeBinWidthInSec;
209211

210212
const AxisSpec axisSeconds{nTimeBins, 0, timeInterval, "seconds"};
211213
const AxisSpec axisSecondsWideBins{nTimeWideBins, 0, timeInterval, "seconds"};
212214
const AxisSpec axisSecondsVeryWideBins{nTimeVeryWideBins, 0, timeInterval, "seconds"};
215+
const AxisSpec axisSecondsSuperWideBins{nTimeSuperWideBins, 0, timeInterval, "seconds"};
216+
213217
histos.add("hSecondsBCsTVX", "", kTH1D, {axisSeconds});
214218
histos.add("hSecondsBCsTVXandTFborderCuts", "", kTH1D, {axisSeconds});
215219

@@ -234,6 +238,10 @@ struct TimeDependentQaTask {
234238
histos.add("hSecondsUPCverticesBeforeSel8", "", kTH2F, {axisSeconds, {2, -0.5, 1.5, "Is vertex with UPC settings after |vZ|<10 cut"}});
235239
histos.add("hSecondsUPCvertices", "", kTH2F, {axisSeconds, {2, -0.5, 1.5, "Is vertex with UPC settings after |vZ|<10 and sel8 cuts"}});
236240

241+
const int32_t nBCsPerOrbit = o2::constants::lhc::LHCMaxBunches;
242+
const AxisSpec axisBCs{nBCsPerOrbit, 0., static_cast<double>(nBCsPerOrbit), ""};
243+
histos.add("hSecondsBCsMap", "", kTH2F, {axisSecondsSuperWideBins, axisBCs});
244+
237245
// shapes of distributions (added for the O-O run monitoring)
238246
if (confIncludeMultDistrVsTimeHistos) {
239247
int maxNtracks = confMaxNtracksForTimeDepDistributions;
@@ -469,6 +477,11 @@ struct TimeDependentQaTask {
469477
double secFromSOR = ts / 1000. - minSec;
470478
if (bc.selection_bit(kIsTriggerTVX)) {
471479
histos.fill(HIST("hSecondsBCsTVX"), secFromSOR);
480+
481+
uint64_t globalBC = bc.globalBC();
482+
int localBC = globalBC % nBCsPerOrbit;
483+
histos.fill(HIST("hSecondsBCsMap"), secFromSOR, localBC);
484+
472485
if (bc.selection_bit(kNoTimeFrameBorder)) {
473486
histos.fill(HIST("hSecondsBCsTVXandTFborderCuts"), secFromSOR);
474487
}
@@ -568,7 +581,7 @@ struct TimeDependentQaTask {
568581
histos.fill(HIST("hSecondsEventSelBits"), secFromSOR, enIsLowOccupStdAlsoInPrevRofCut2000noDeadStaves, isLowOccupStdAlsoInPrevRofCut2000noDeadStaves);
569582

570583
// check RCT flags
571-
histos.fill(HIST("hSecondsRCTflags"), secFromSOR, 0); // n collisions sel8
584+
histos.fill(HIST("hSecondsRCTflags"), secFromSOR, 0); // n collisions sel8
572585
histos.fill(HIST("hSecondsRCTflags"), secFromSOR, 1, col.rct_bit(kCcdbObjectLoaded)); // CCDB object not loaded
573586
LOGP(debug, "i = 1, bitValue = {}, binLabel={}, binCenter={}", col.rct_bit(kCcdbObjectLoaded), axRctFlags->GetBinLabel(2), axRctFlags->GetBinCenter(2));
574587
for (int iFlag = 0; iFlag < kNRCTSelectionFlags; iFlag++) {

0 commit comments

Comments
 (0)