@@ -54,13 +54,21 @@ const AxisSpec axisSparseDcaZ{100, -1., 1., "DCA_{z}, cm"};
5454struct TimeDependentQaTask {
5555 Configurable<float > confTimeBinWidthInSec{" TimeBinWidthInSec" , 0.5 , " Width of time bins in seconds" }; // o2-linter: disable=name/configurable (temporary fix)
5656 Configurable<float > confTimeWiderBinFactor{" TimeWideBinFactor" , 4 , " Factor for wider time bins for some 2D histograms" }; // o2-linter: disable=name/configurable (temporary fix)
57+ Configurable<float > confTimeMuchWiderBinFactor{" confTimeMuchWiderBinFactor" , 20 , " Factor for even wider time bins for some 2D histograms" }; // o2-linter: disable=name/configurable (temporary fix)
5758 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)
5859 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)
5960 Configurable<int > confFlagFillEtaPhiVsTimeHist{" FlagFillEtaPhiVsTimeHist" , 0 , " 0 - don't fill , 1 - fill" }; // o2-linter: disable=name/configurable (temporary fix)
6061 Configurable<float > confCutOnNtpcClsForSharedFractAndDeDxCalc{" CutOnNtpcClsForSharedFractAndDeDxCalc" , 70 , " " }; // o2-linter: disable=name/configurable (temporary fix)
6162 Configurable<int > confFlagCheckMshape{" FlagCheckMshape" , 0 , " 0 - don't check , 1 - check" }; // o2-linter: disable=name/configurable (temporary fix)
6263 Configurable<int > confFlagCheckQoverPtHist{" FlagCheckQoverPtHist" , 1 , " 0 - don't check , 1 - check" }; // o2-linter: disable=name/configurable (temporary fix)
6364
65+ // for O-O and Ne-Ne run
66+ Configurable<int > confIncludeMultDistrVsTimeHistos{" confIncludeMultDistrVsTimeHistos" , 0 , " " }; // o2-linter: disable=name/configurable (temporary fix)
67+ Configurable<float > confMaxNtracksForTimeDepDistributions{" confMaxNtracksForTimeDepDistributions" , 800 , " " }; // o2-linter: disable=name/configurable (temporary fix)
68+ Configurable<float > confMaxZNACenergyForTimeDepDistributions{" confMaxZNACenergyForTimeDepDistributions" , 80 , " " }; // o2-linter: disable=name/configurable (temporary fix)
69+ Configurable<float > confMaxT0ACamplForTimeDepDistributions{" confMaxT0ACamplForTimeDepDistributions" , 25000 , " " }; // o2-linter: disable=name/configurable (temporary fix)
70+ Configurable<float > confMaxV0AamplForTimeDepDistributions{" confMaxV0AamplForTimeDepDistributions" , 40000 , " " }; // o2-linter: disable=name/configurable (temporary fix)
71+
6472 enum EvSelBitsToMonitor {
6573 enCollisionsAll = 0 ,
6674 enIsTriggerTVX,
@@ -181,10 +189,12 @@ struct TimeDependentQaTask {
181189 maxSec = ceil (tsEOR / 1000 .);
182190 int nTimeBins = static_cast <int >((maxSec - minSec) / confTimeBinWidthInSec);
183191 int nTimeWideBins = static_cast <int >((maxSec - minSec) / confTimeBinWidthInSec / confTimeWiderBinFactor);
192+ int nTimeVeryWideBins = static_cast <int >((maxSec - minSec) / confTimeBinWidthInSec / confTimeMuchWiderBinFactor);
184193 double timeInterval = nTimeBins * confTimeBinWidthInSec;
185194
186195 const AxisSpec axisSeconds{nTimeBins, 0 , timeInterval, " seconds" };
187196 const AxisSpec axisSecondsWideBins{nTimeWideBins, 0 , timeInterval, " seconds" };
197+ const AxisSpec axisSecondsVeryWideBins{nTimeVeryWideBins, 0 , timeInterval, " seconds" };
188198 histos.add (" hSecondsBCsTVX" , " " , kTH1D , {axisSeconds});
189199 histos.add (" hSecondsBCsTVXandTFborderCuts" , " " , kTH1D , {axisSeconds});
190200
@@ -208,6 +218,20 @@ struct TimeDependentQaTask {
208218 histos.add (" hSecondsUPCverticesBeforeSel8" , " " , kTH2F , {axisSeconds, {2 , -0.5 , 1.5 , " Is vertex with UPC settings after |vZ|<10 cut" }});
209219 histos.add (" hSecondsUPCvertices" , " " , kTH2F , {axisSeconds, {2 , -0.5 , 1.5 , " Is vertex with UPC settings after |vZ|<10 and sel8 cuts" }});
210220
221+ // shapes of distributions (added for the O-O run monitoring)
222+ if (confIncludeMultDistrVsTimeHistos) {
223+ int maxNtracks = confMaxNtracksForTimeDepDistributions;
224+ float maxZNACenergyForTimeDepDistributions = confMaxZNACenergyForTimeDepDistributions;
225+ float maxT0ACamplForTimeDepDistributions = confMaxT0ACamplForTimeDepDistributions;
226+ float maxV0AamplForTimeDepDistributions = confMaxV0AamplForTimeDepDistributions;
227+ histos.add (" multDistributions/hSecondsDistrPVtracks" , " " , kTH2D , {axisSecondsVeryWideBins, {maxNtracks, -0.5 , maxNtracks - 0.5 , " n PV tracks" }});
228+ histos.add (" multDistributions/hSecondsDistrZNA" , " " , kTH2D , {axisSecondsVeryWideBins, {320 , 0 , maxZNACenergyForTimeDepDistributions, " ZNA ampl" }});
229+ histos.add (" multDistributions/hSecondsDistrZNC" , " " , kTH2D , {axisSecondsVeryWideBins, {320 , 0 , maxZNACenergyForTimeDepDistributions, " ZNC ampl" }});
230+ histos.add (" multDistributions/hSecondsDistrT0A" , " " , kTH2D , {axisSecondsVeryWideBins, {250 , 0 , maxT0ACamplForTimeDepDistributions, " T0A ampl" }});
231+ histos.add (" multDistributions/hSecondsDistrT0C" , " " , kTH2D , {axisSecondsVeryWideBins, {250 , 0 , maxT0ACamplForTimeDepDistributions, " T0C ampl" }});
232+ histos.add (" multDistributions/hSecondsDistrV0A" , " " , kTH2D , {axisSecondsVeryWideBins, {400 , 0 , maxV0AamplForTimeDepDistributions, " V0A ampl" }});
233+ }
234+
211235 // ### QA event selection bits
212236 int nEvSelBits = enNumEvSelBits;
213237 histos.add (" hSecondsEventSelBits" , " " , kTH2F , {axisSecondsWideBins, {nEvSelBits, -0.5 , nEvSelBits - 0.5 , " Monitoring of event selection bits" }});
@@ -534,6 +558,7 @@ struct TimeDependentQaTask {
534558
535559 // ##### track loop
536560 auto tracksGrouped = tracks.sliceBy (perCollision, col.globalIndex ());
561+ int nPVtracks = 0 ;
537562 for (const auto & track : tracksGrouped) {
538563 // if (!track.hasTPC() || !track.hasITS())
539564 // continue;
@@ -593,6 +618,8 @@ struct TimeDependentQaTask {
593618 histos.fill (HIST (" PVcontrib/hSecondsNumClsIts" ), secFromSOR, track.itsNCls ());
594619 histos.fill (HIST (" PVcontrib/hSeconds2DNumClsIts" ), secFromSOR, track.itsNCls ());
595620 histos.fill (HIST (" PVcontrib/hSecondsChi2NClIts" ), secFromSOR, track.itsChi2NCl ());
621+
622+ nPVtracks++;
596623 }
597624
598625 // ### global tracks
@@ -728,6 +755,24 @@ struct TimeDependentQaTask {
728755 histos.fill (HIST (" hSecondsITSglobalVsEtaPhi" ), secFromSOR, track.eta (), track.phi ());
729756 }
730757 }
758+ } // end of track loop
759+
760+ // fill mult distributions vs time
761+ if (confIncludeMultDistrVsTimeHistos) {
762+ histos.fill (HIST (" multDistributions/hSecondsDistrPVtracks" ), secFromSOR, nPVtracks);
763+
764+ // ZNA,C
765+ // float multZNA = bc.has_zdc() ? bc.zdc().energyCommonZNA() : -999.f;
766+ // float multZNC = bc.has_zdc() ? bc.zdc().energyCommonZNC() : -999.f;
767+ histos.fill (HIST (" multDistributions/hSecondsDistrZNA" ), secFromSOR, col.multZNA ());
768+ histos.fill (HIST (" multDistributions/hSecondsDistrZNC" ), secFromSOR, col.multZNC ());
769+
770+ // FT0A,C, V0A
771+ // float multT0A = bc.has_ft0() ? bc.ft0().sumAmpA() : -999.f;
772+ // float multT0C = bc.has_ft0() ? fbcundBC.ft0().sumAmpC() : -999.f;
773+ histos.fill (HIST (" multDistributions/hSecondsDistrT0A" ), secFromSOR, col.multFT0A ());
774+ histos.fill (HIST (" multDistributions/hSecondsDistrT0C" ), secFromSOR, col.multFT0C ());
775+ histos.fill (HIST (" multDistributions/hSecondsDistrV0A" ), secFromSOR, col.multFV0A ());
731776 }
732777 }
733778 } // end of collision loop
0 commit comments