From 6184a00b896ff49be1edfbd22a54cca29883834b Mon Sep 17 00:00:00 2001 From: altsybee Date: Mon, 30 Jun 2025 13:10:14 +0200 Subject: [PATCH 1/3] Update timeDependentQa.cxx - add mult distributions vs time (for O-O and Ne-Ne run) --- DPG/Tasks/AOTEvent/timeDependentQa.cxx | 45 ++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/DPG/Tasks/AOTEvent/timeDependentQa.cxx b/DPG/Tasks/AOTEvent/timeDependentQa.cxx index e742ee040fd..9ab83fe9df2 100644 --- a/DPG/Tasks/AOTEvent/timeDependentQa.cxx +++ b/DPG/Tasks/AOTEvent/timeDependentQa.cxx @@ -54,6 +54,7 @@ const AxisSpec axisSparseDcaZ{100, -1., 1., "DCA_{z}, cm"}; 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{"confTimeMuchWiderBinFactor", 20, "Factor for even wider 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) @@ -61,6 +62,13 @@ struct TimeDependentQaTask { Configurable confFlagCheckMshape{"FlagCheckMshape", 0, "0 - don't check , 1 - check"}; // o2-linter: disable=name/configurable (temporary fix) Configurable confFlagCheckQoverPtHist{"FlagCheckQoverPtHist", 1, "0 - don't check , 1 - check"}; // o2-linter: disable=name/configurable (temporary fix) + // for O-O and Ne-Ne run + Configurable confIncludeMultDistrVsTimeHistos{"confIncludeMultDistrVsTimeHistos", 0, ""}; // o2-linter: disable=name/configurable (temporary fix) + Configurable confMaxNtracksForTimeDepDistributions{"confMaxNtracksForTimeDepDistributions", 800, ""}; // o2-linter: disable=name/configurable (temporary fix) + Configurable confMaxZNACenergyForTimeDepDistributions{"confMaxZNACenergyForTimeDepDistributions", 80, ""}; // o2-linter: disable=name/configurable (temporary fix) + Configurable confMaxT0ACamplForTimeDepDistributions{"confMaxT0ACamplForTimeDepDistributions", 25000, ""}; // o2-linter: disable=name/configurable (temporary fix) + Configurable confMaxV0AamplForTimeDepDistributions{"confMaxV0AamplForTimeDepDistributions", 40000, ""}; // o2-linter: disable=name/configurable (temporary fix) + enum EvSelBitsToMonitor { enCollisionsAll = 0, enIsTriggerTVX, @@ -181,10 +189,12 @@ struct TimeDependentQaTask { maxSec = ceil(tsEOR / 1000.); int nTimeBins = static_cast((maxSec - minSec) / confTimeBinWidthInSec); int nTimeWideBins = static_cast((maxSec - minSec) / confTimeBinWidthInSec / confTimeWiderBinFactor); + int nTimeVeryWideBins = static_cast((maxSec - minSec) / confTimeBinWidthInSec / confTimeMuchWiderBinFactor); 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"}; histos.add("hSecondsBCsTVX", "", kTH1D, {axisSeconds}); histos.add("hSecondsBCsTVXandTFborderCuts", "", kTH1D, {axisSeconds}); @@ -208,6 +218,20 @@ 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"}}); + // shapes of distributions (added for the O-O run monitoring) + if (confIncludeMultDistrVsTimeHistos) { + int maxNtracks = confMaxNtracksForTimeDepDistributions; + float maxZNACenergyForTimeDepDistributions = confMaxZNACenergyForTimeDepDistributions; + float maxT0ACamplForTimeDepDistributions = confMaxT0ACamplForTimeDepDistributions; + float maxV0AamplForTimeDepDistributions = confMaxV0AamplForTimeDepDistributions; + histos.add("multDistributions/hSecondsDistrPVtracks", "", kTH2D, {axisSecondsVeryWideBins, {maxNtracks, -0.5, maxNtracks - 0.5, "n PV tracks"}}); + histos.add("multDistributions/hSecondsDistrZNA", "", kTH2D, {axisSecondsVeryWideBins, {320, 0, maxZNACenergyForTimeDepDistributions, "ZNA ampl"}}); + histos.add("multDistributions/hSecondsDistrZNC", "", kTH2D, {axisSecondsVeryWideBins, {320, 0, maxZNACenergyForTimeDepDistributions, "ZNC ampl"}}); + histos.add("multDistributions/hSecondsDistrT0A", "", kTH2D, {axisSecondsVeryWideBins, {250, 0, maxT0ACamplForTimeDepDistributions, "T0A ampl"}}); + histos.add("multDistributions/hSecondsDistrT0C", "", kTH2D, {axisSecondsVeryWideBins, {250, 0, maxT0ACamplForTimeDepDistributions, "T0C ampl"}}); + histos.add("multDistributions/hSecondsDistrV0A", "", kTH2D, {axisSecondsVeryWideBins, {400, 0, maxV0AamplForTimeDepDistributions, "V0A ampl"}}); + } + // ### QA event selection bits int nEvSelBits = enNumEvSelBits; histos.add("hSecondsEventSelBits", "", kTH2F, {axisSecondsWideBins, {nEvSelBits, -0.5, nEvSelBits - 0.5, "Monitoring of event selection bits"}}); @@ -534,6 +558,7 @@ struct TimeDependentQaTask { // ##### track loop auto tracksGrouped = tracks.sliceBy(perCollision, col.globalIndex()); + int nPVtracks = 0; for (const auto& track : tracksGrouped) { // if (!track.hasTPC() || !track.hasITS()) // continue; @@ -593,6 +618,8 @@ struct TimeDependentQaTask { histos.fill(HIST("PVcontrib/hSecondsNumClsIts"), secFromSOR, track.itsNCls()); histos.fill(HIST("PVcontrib/hSeconds2DNumClsIts"), secFromSOR, track.itsNCls()); histos.fill(HIST("PVcontrib/hSecondsChi2NClIts"), secFromSOR, track.itsChi2NCl()); + + nPVtracks++; } // ### global tracks @@ -728,6 +755,24 @@ struct TimeDependentQaTask { histos.fill(HIST("hSecondsITSglobalVsEtaPhi"), secFromSOR, track.eta(), track.phi()); } } + } // end of track loop + + // fill mult distributions vs time + if (confIncludeMultDistrVsTimeHistos) { + histos.fill(HIST("multDistributions/hSecondsDistrPVtracks"), secFromSOR, nPVtracks); + + // ZNA,C + // float multZNA = bc.has_zdc() ? bc.zdc().energyCommonZNA() : -999.f; + // float multZNC = bc.has_zdc() ? bc.zdc().energyCommonZNC() : -999.f; + histos.fill(HIST("multDistributions/hSecondsDistrZNA"), secFromSOR, col.multZNA()); + histos.fill(HIST("multDistributions/hSecondsDistrZNC"), secFromSOR, col.multZNC()); + + // FT0A,C, V0A + // float multT0A = bc.has_ft0() ? bc.ft0().sumAmpA() : -999.f; + // float multT0C = bc.has_ft0() ? fbcundBC.ft0().sumAmpC() : -999.f; + histos.fill(HIST("multDistributions/hSecondsDistrT0A"), secFromSOR, col.multFT0A()); + histos.fill(HIST("multDistributions/hSecondsDistrT0C"), secFromSOR, col.multFT0C()); + histos.fill(HIST("multDistributions/hSecondsDistrV0A"), secFromSOR, col.multFV0A()); } } } // end of collision loop From 254de9b86894fdc6a240e6e91cbbbddeaf59dfd1 Mon Sep 17 00:00:00 2001 From: altsybee Date: Mon, 30 Jun 2025 13:30:52 +0200 Subject: [PATCH 2/3] adding ZN A-C diff vs time --- DPG/Tasks/AOTEvent/timeDependentQa.cxx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/DPG/Tasks/AOTEvent/timeDependentQa.cxx b/DPG/Tasks/AOTEvent/timeDependentQa.cxx index 9ab83fe9df2..24470baa191 100644 --- a/DPG/Tasks/AOTEvent/timeDependentQa.cxx +++ b/DPG/Tasks/AOTEvent/timeDependentQa.cxx @@ -227,6 +227,8 @@ struct TimeDependentQaTask { histos.add("multDistributions/hSecondsDistrPVtracks", "", kTH2D, {axisSecondsVeryWideBins, {maxNtracks, -0.5, maxNtracks - 0.5, "n PV tracks"}}); histos.add("multDistributions/hSecondsDistrZNA", "", kTH2D, {axisSecondsVeryWideBins, {320, 0, maxZNACenergyForTimeDepDistributions, "ZNA ampl"}}); histos.add("multDistributions/hSecondsDistrZNC", "", kTH2D, {axisSecondsVeryWideBins, {320, 0, maxZNACenergyForTimeDepDistributions, "ZNC ampl"}}); + histos.add("multDistributions/hSecondsDistrZNACdiff", "", kTH2D, {axisSecondsVeryWideBins, {600, -maxZNACenergyForTimeDepDistributions, maxZNACenergyForTimeDepDistributions, "ZN A-C diff"}}); + histos.add("multDistributions/hSecondsDistrZNACdiffNorm", "", kTH2D, {axisSecondsVeryWideBins, {200, -1., 1., "ZN A-C diff"}}); histos.add("multDistributions/hSecondsDistrT0A", "", kTH2D, {axisSecondsVeryWideBins, {250, 0, maxT0ACamplForTimeDepDistributions, "T0A ampl"}}); histos.add("multDistributions/hSecondsDistrT0C", "", kTH2D, {axisSecondsVeryWideBins, {250, 0, maxT0ACamplForTimeDepDistributions, "T0C ampl"}}); histos.add("multDistributions/hSecondsDistrV0A", "", kTH2D, {axisSecondsVeryWideBins, {400, 0, maxV0AamplForTimeDepDistributions, "V0A ampl"}}); @@ -766,6 +768,11 @@ struct TimeDependentQaTask { // float multZNC = bc.has_zdc() ? bc.zdc().energyCommonZNC() : -999.f; histos.fill(HIST("multDistributions/hSecondsDistrZNA"), secFromSOR, col.multZNA()); histos.fill(HIST("multDistributions/hSecondsDistrZNC"), secFromSOR, col.multZNC()); + float ZNdiff = col.multZNA() - col.multZNC(); + float ZNsum = col.multZNA() - col.multZNC(); + histos.fill(HIST("multDistributions/hSecondsDistrZNACdiff"), secFromSOR, ZNdiff); + if (ZNsum > 0) + histos.fill(HIST("multDistributions/hSecondsDistrZNACdiffNorm"), secFromSOR, ZNdiff / ZNsum); // FT0A,C, V0A // float multT0A = bc.has_ft0() ? bc.ft0().sumAmpA() : -999.f; From b748c7e0ea4d837d8189fa28a6fe1d6ca544dde4 Mon Sep 17 00:00:00 2001 From: altsybee Date: Mon, 30 Jun 2025 14:01:38 +0200 Subject: [PATCH 3/3] ZN a+c sum fix --- DPG/Tasks/AOTEvent/timeDependentQa.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DPG/Tasks/AOTEvent/timeDependentQa.cxx b/DPG/Tasks/AOTEvent/timeDependentQa.cxx index 24470baa191..41f9748e5f3 100644 --- a/DPG/Tasks/AOTEvent/timeDependentQa.cxx +++ b/DPG/Tasks/AOTEvent/timeDependentQa.cxx @@ -769,7 +769,7 @@ struct TimeDependentQaTask { histos.fill(HIST("multDistributions/hSecondsDistrZNA"), secFromSOR, col.multZNA()); histos.fill(HIST("multDistributions/hSecondsDistrZNC"), secFromSOR, col.multZNC()); float ZNdiff = col.multZNA() - col.multZNC(); - float ZNsum = col.multZNA() - col.multZNC(); + float ZNsum = col.multZNA() + col.multZNC(); histos.fill(HIST("multDistributions/hSecondsDistrZNACdiff"), secFromSOR, ZNdiff); if (ZNsum > 0) histos.fill(HIST("multDistributions/hSecondsDistrZNACdiffNorm"), secFromSOR, ZNdiff / ZNsum);