From 31121d3b81626e875022454d1fe621da81466be0 Mon Sep 17 00:00:00 2001 From: altsybee Date: Wed, 5 Nov 2025 23:42:27 +0100 Subject: [PATCH 1/2] adding bcMap vs time hist --- DPG/Tasks/AOTEvent/timeDependentQa.cxx | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/DPG/Tasks/AOTEvent/timeDependentQa.cxx b/DPG/Tasks/AOTEvent/timeDependentQa.cxx index 37feccdc7ea..6586d08f5ee 100644 --- a/DPG/Tasks/AOTEvent/timeDependentQa.cxx +++ b/DPG/Tasks/AOTEvent/timeDependentQa.cxx @@ -69,6 +69,7 @@ struct TimeDependentQaTask { Configurable confTimeBinWidthInSec{"TimeBinWidthInSec", 0.5, "Width of time bins in seconds"}; // o2-linter: disable=name/configurable (temporary fix) Configurable confTimeWiderBinFactor{"TimeWideBinFactor", 4, "Factor for wider time bins for some 2D histograms"}; // o2-linter: disable=name/configurable (temporary fix) Configurable confTimeMuchWiderBinFactor{"TimeMuchWiderBinFactor", 20, "Factor for even wider time bins for some 2D histograms"}; // o2-linter: disable=name/configurable (temporary fix) + Configurable confTimeMuchMuchWiderBinFactor{"TimeMuchMuchWiderBinFactor", 120, "Factor for super wide time bins for some 2D histograms"}; // o2-linter: disable=name/configurable (temporary fix) Configurable confTakeVerticesWithUPCsettings{"ConsiderVerticesWithUPCsettings", 0, "Take vertices: 0 - all , 1 - only without UPC settings, 2 - only with UPC settings"}; // o2-linter: disable=name/configurable (temporary fix) Configurable 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) Configurable confFlagFillEtaPhiVsTimeHist{"FlagFillEtaPhiVsTimeHist", 0, "0 - don't fill , 1 - fill"}; // o2-linter: disable=name/configurable (temporary fix) @@ -205,11 +206,14 @@ struct TimeDependentQaTask { int nTimeBins = static_cast((maxSec - minSec) / confTimeBinWidthInSec); int nTimeWideBins = static_cast((maxSec - minSec) / confTimeBinWidthInSec / confTimeWiderBinFactor); int nTimeVeryWideBins = static_cast((maxSec - minSec) / confTimeBinWidthInSec / confTimeMuchWiderBinFactor); + int nTimeSuperWideBins = static_cast((maxSec - minSec) / confTimeBinWidthInSec / confTimeMuchMuchWiderBinFactor); double timeInterval = nTimeBins * confTimeBinWidthInSec; const AxisSpec axisSeconds{nTimeBins, 0, timeInterval, "seconds"}; const AxisSpec axisSecondsWideBins{nTimeWideBins, 0, timeInterval, "seconds"}; const AxisSpec axisSecondsVeryWideBins{nTimeVeryWideBins, 0, timeInterval, "seconds"}; + const AxisSpec axisSecondsSuperWideBins{nTimeSuperWideBins, 0, timeInterval, "seconds"}; + histos.add("hSecondsBCsTVX", "", kTH1D, {axisSeconds}); histos.add("hSecondsBCsTVXandTFborderCuts", "", kTH1D, {axisSeconds}); @@ -234,6 +238,10 @@ struct TimeDependentQaTask { histos.add("hSecondsUPCverticesBeforeSel8", "", kTH2F, {axisSeconds, {2, -0.5, 1.5, "Is vertex with UPC settings after |vZ|<10 cut"}}); histos.add("hSecondsUPCvertices", "", kTH2F, {axisSeconds, {2, -0.5, 1.5, "Is vertex with UPC settings after |vZ|<10 and sel8 cuts"}}); + const int32_t nBCsPerOrbit = o2::constants::lhc::LHCMaxBunches; + const AxisSpec axisBCs{nBCsPerOrbit, 0., static_cast(nBCsPerOrbit), ""}; + histos.add("hSecondsBCsMap", "", kTH2F, {axisSecondsSuperWideBins, axisBCs}); + // shapes of distributions (added for the O-O run monitoring) if (confIncludeMultDistrVsTimeHistos) { int maxNtracks = confMaxNtracksForTimeDepDistributions; @@ -469,6 +477,11 @@ struct TimeDependentQaTask { double secFromSOR = ts / 1000. - minSec; if (bc.selection_bit(kIsTriggerTVX)) { histos.fill(HIST("hSecondsBCsTVX"), secFromSOR); + + uint64_t globalBC = bc.globalBC(); + int localBC = globalBC % nBCsPerOrbit; + histos.fill(HIST("hSecondsBCsMap"), secFromSOR, localBC); + if (bc.selection_bit(kNoTimeFrameBorder)) { histos.fill(HIST("hSecondsBCsTVXandTFborderCuts"), secFromSOR); } @@ -568,7 +581,7 @@ struct TimeDependentQaTask { histos.fill(HIST("hSecondsEventSelBits"), secFromSOR, enIsLowOccupStdAlsoInPrevRofCut2000noDeadStaves, isLowOccupStdAlsoInPrevRofCut2000noDeadStaves); // check RCT flags - histos.fill(HIST("hSecondsRCTflags"), secFromSOR, 0); // n collisions sel8 + histos.fill(HIST("hSecondsRCTflags"), secFromSOR, 0); // n collisions sel8 histos.fill(HIST("hSecondsRCTflags"), secFromSOR, 1, col.rct_bit(kCcdbObjectLoaded)); // CCDB object not loaded LOGP(debug, "i = 1, bitValue = {}, binLabel={}, binCenter={}", col.rct_bit(kCcdbObjectLoaded), axRctFlags->GetBinLabel(2), axRctFlags->GetBinCenter(2)); for (int iFlag = 0; iFlag < kNRCTSelectionFlags; iFlag++) { From 0364f3981095afa5482ca7bb55bb929c017deab2 Mon Sep 17 00:00:00 2001 From: altsybee Date: Wed, 5 Nov 2025 23:43:23 +0100 Subject: [PATCH 2/2] adding occupancy monitoring with additional evSel bits applied --- DPG/Tasks/AOTEvent/eventSelectionQa.cxx | 33 ++++++++++++++++++------- 1 file changed, 24 insertions(+), 9 deletions(-) diff --git a/DPG/Tasks/AOTEvent/eventSelectionQa.cxx b/DPG/Tasks/AOTEvent/eventSelectionQa.cxx index f66ca6a0dff..5087a5459ed 100644 --- a/DPG/Tasks/AOTEvent/eventSelectionQa.cxx +++ b/DPG/Tasks/AOTEvent/eventSelectionQa.cxx @@ -70,6 +70,7 @@ struct EventSelectionQaTask { Configurable nGlobalBCs{"nGlobalBCs", 100000, "number of global bcs for detailed monitoring"}; Configurable isLowFlux{"isLowFlux", 1, "1 - low flux (pp, pPb), 0 - high flux (PbPb)"}; Configurable fillITSdeadStaveHists{"fillITSdeadStaveHists", 0, "0 - no, 1 - yes"}; + Configurable fillTPCnClsVsOccupancyHists{"fillTPCnClsVsOccupancyHists", 0, "0 - no, 1 - yes"}; Service ccdb; HistogramRegistry histos{"Histos", {}, OutputObjHandlingPolicy::AnalysisObject}; @@ -375,18 +376,24 @@ struct EventSelectionQaTask { histos.add("occupancyQA/hNumTracksITSTPC_vs_V0A_vs_occupancy", "", kTH3F, {axisMultV0AForOccup, axisNtracksPVTPC, axisOccupancyTracks}); histos.add("occupancyQA/hNumTracksPV_vs_V0A_vs_occupancy_NarrowDeltaTimeCut", "", kTH3F, {axisMultV0AForOccup, axisNtracksPV, axisOccupancyTracks}); histos.add("occupancyQA/hNumTracksPVTPC_vs_V0A_vs_occupancy_NarrowDeltaTimeCut", "", kTH3F, {axisMultV0AForOccup, axisNtracksPVTPC, axisOccupancyTracks}); + histos.add("occupancyQA/hNumTracksPV_vs_V0A_vs_occupancy_StandardDeltaTimeCut", "", kTH3F, {axisMultV0AForOccup, axisNtracksPV, axisOccupancyTracks}); + histos.add("occupancyQA/hNumTracksPVTPC_vs_V0A_vs_occupancy_StandardDeltaTimeCut", "", kTH3F, {axisMultV0AForOccup, axisNtracksPVTPC, axisOccupancyTracks}); + histos.add("occupancyQA/hNumTracksPV_vs_V0A_vs_occupancy_GoodITSLayersAllCut", "", kTH3F, {axisMultV0AForOccup, axisNtracksPV, axisOccupancyTracks}); + histos.add("occupancyQA/hNumTracksPVTPC_vs_V0A_vs_occupancy_GoodITSLayersAllCut", "", kTH3F, {axisMultV0AForOccup, axisNtracksPVTPC, axisOccupancyTracks}); // requested by TPC experts: nTPConly tracks vs occupancy histos.add("occupancyQA/hNumTracksTPConly_vs_V0A_vs_occupancy", "", kTH3F, {axisMultV0AForOccup, axisNtracksTPConly, axisOccupancyTracks}); histos.add("occupancyQA/hNumTracksTPConlyNoITS_vs_V0A_vs_occupancy", "", kTH3F, {axisMultV0AForOccup, axisNtracksTPConly, axisOccupancyTracks}); // request from experts to add track properties vs occupancy, to compare data vs MC - const AxisSpec axisOccupancyForTrackQA{60, 0., 15000, "occupancy (n ITS tracks weighted)"}; - const AxisSpec axisNTPCcls{150, 0, 150, "n TPC clusters"}; - histos.add("occupancyQA/tpcNClsFound_vs_V0A_vs_occupancy", "", kTH3F, {axisMultV0AForOccup, axisNTPCcls, axisOccupancyForTrackQA}); - histos.add("occupancyQA/tpcNClsFindable_vs_V0A_vs_occupancy", "", kTH3F, {axisMultV0AForOccup, axisNTPCcls, axisOccupancyForTrackQA}); - histos.add("occupancyQA/tpcNClsShared_vs_V0A_vs_occupancy", "", kTH3F, {axisMultV0AForOccup, axisNTPCcls, axisOccupancyForTrackQA}); - histos.add("occupancyQA/tpcNCrossedRows_vs_V0A_vs_occupancy", "", kTH3F, {axisMultV0AForOccup, axisNTPCcls, axisOccupancyForTrackQA}); - const AxisSpec axisChi2TPC{150, 0, 15, "chi2Ncl TPC"}; - histos.add("occupancyQA/tpcChi2_vs_V0A_vs_occupancy", "", kTH3F, {axisMultV0AForOccup, axisChi2TPC, axisOccupancyForTrackQA}); + if (fillTPCnClsVsOccupancyHists) { + const AxisSpec axisOccupancyForTrackQA{60, 0., 15000, "occupancy (n ITS tracks weighted)"}; + const AxisSpec axisNTPCcls{150, 0, 150, "n TPC clusters"}; + histos.add("occupancyQA/tpcNClsFound_vs_V0A_vs_occupancy", "", kTH3F, {axisMultV0AForOccup, axisNTPCcls, axisOccupancyForTrackQA}); + histos.add("occupancyQA/tpcNClsFindable_vs_V0A_vs_occupancy", "", kTH3F, {axisMultV0AForOccup, axisNTPCcls, axisOccupancyForTrackQA}); + histos.add("occupancyQA/tpcNClsShared_vs_V0A_vs_occupancy", "", kTH3F, {axisMultV0AForOccup, axisNTPCcls, axisOccupancyForTrackQA}); + histos.add("occupancyQA/tpcNCrossedRows_vs_V0A_vs_occupancy", "", kTH3F, {axisMultV0AForOccup, axisNTPCcls, axisOccupancyForTrackQA}); + const AxisSpec axisChi2TPC{150, 0, 15, "chi2Ncl TPC"}; + histos.add("occupancyQA/tpcChi2_vs_V0A_vs_occupancy", "", kTH3F, {axisMultV0AForOccup, axisChi2TPC, axisOccupancyForTrackQA}); + } // ITS in-ROF occupancy 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 { if (track.hasTPC()) { nContributorsAfterEtaTPCLooseCuts++; - if (!isLowFlux && col.sel8() && col.selection_bit(kNoSameBunchPileup) && fabs(col.posZ()) < 10 && occupancyByTracks >= 0) { + if (!isLowFlux && fillTPCnClsVsOccupancyHists && col.sel8() && col.selection_bit(kNoSameBunchPileup) && fabs(col.posZ()) < 10 && occupancyByTracks >= 0) { histos.fill(HIST("occupancyQA/tpcNClsFound_vs_V0A_vs_occupancy"), multV0A, track.tpcNClsFound(), occupancyByTracks); histos.fill(HIST("occupancyQA/tpcNClsFindable_vs_V0A_vs_occupancy"), multV0A, track.tpcNClsFindable(), occupancyByTracks); histos.fill(HIST("occupancyQA/tpcNClsShared_vs_V0A_vs_occupancy"), multV0A, track.tpcNClsShared(), occupancyByTracks); @@ -1248,6 +1255,14 @@ struct EventSelectionQaTask { histos.fill(HIST("occupancyQA/hNumTracksPV_vs_V0A_vs_occupancy_NarrowDeltaTimeCut"), multV0A, nPV, occupancyByTracks); histos.fill(HIST("occupancyQA/hNumTracksPVTPC_vs_V0A_vs_occupancy_NarrowDeltaTimeCut"), multV0A, nContributorsAfterEtaTPCCuts, occupancyByTracks); } + if (col.selection_bit(kNoCollInTimeRangeStandard)) { + histos.fill(HIST("occupancyQA/hNumTracksPV_vs_V0A_vs_occupancy_StandardDeltaTimeCut"), multV0A, nPV, occupancyByTracks); + histos.fill(HIST("occupancyQA/hNumTracksPVTPC_vs_V0A_vs_occupancy_StandardDeltaTimeCut"), multV0A, nContributorsAfterEtaTPCCuts, occupancyByTracks); + } + if (col.selection_bit(kIsGoodITSLayersAll)) { + histos.fill(HIST("occupancyQA/hNumTracksPV_vs_V0A_vs_occupancy_GoodITSLayersAllCut"), multV0A, nPV, occupancyByTracks); + histos.fill(HIST("occupancyQA/hNumTracksPVTPC_vs_V0A_vs_occupancy_GoodITSLayersAllCut"), multV0A, nContributorsAfterEtaTPCCuts, occupancyByTracks); + } histos.fill(HIST("occupancyQA/hNumTracksTPConly_vs_V0A_vs_occupancy"), multV0A, nTPConly, occupancyByTracks); histos.fill(HIST("occupancyQA/hNumTracksTPConlyNoITS_vs_V0A_vs_occupancy"), multV0A, nTPConlyNoITS, occupancyByTracks);