@@ -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,22 @@ 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/hSecondsDistrZNACdiff" , " " , kTH2D , {axisSecondsVeryWideBins, {600 , -maxZNACenergyForTimeDepDistributions, maxZNACenergyForTimeDepDistributions, " ZN A-C diff" }});
231+ histos.add (" multDistributions/hSecondsDistrZNACdiffNorm" , " " , kTH2D , {axisSecondsVeryWideBins, {200 , -1 ., 1 ., " ZN A-C diff" }});
232+ histos.add (" multDistributions/hSecondsDistrT0A" , " " , kTH2D , {axisSecondsVeryWideBins, {250 , 0 , maxT0ACamplForTimeDepDistributions, " T0A ampl" }});
233+ histos.add (" multDistributions/hSecondsDistrT0C" , " " , kTH2D , {axisSecondsVeryWideBins, {250 , 0 , maxT0ACamplForTimeDepDistributions, " T0C ampl" }});
234+ histos.add (" multDistributions/hSecondsDistrV0A" , " " , kTH2D , {axisSecondsVeryWideBins, {400 , 0 , maxV0AamplForTimeDepDistributions, " V0A ampl" }});
235+ }
236+
211237 // ### QA event selection bits
212238 int nEvSelBits = enNumEvSelBits;
213239 histos.add (" hSecondsEventSelBits" , " " , kTH2F , {axisSecondsWideBins, {nEvSelBits, -0.5 , nEvSelBits - 0.5 , " Monitoring of event selection bits" }});
@@ -534,6 +560,7 @@ struct TimeDependentQaTask {
534560
535561 // ##### track loop
536562 auto tracksGrouped = tracks.sliceBy (perCollision, col.globalIndex ());
563+ int nPVtracks = 0 ;
537564 for (const auto & track : tracksGrouped) {
538565 // if (!track.hasTPC() || !track.hasITS())
539566 // continue;
@@ -593,6 +620,8 @@ struct TimeDependentQaTask {
593620 histos.fill (HIST (" PVcontrib/hSecondsNumClsIts" ), secFromSOR, track.itsNCls ());
594621 histos.fill (HIST (" PVcontrib/hSeconds2DNumClsIts" ), secFromSOR, track.itsNCls ());
595622 histos.fill (HIST (" PVcontrib/hSecondsChi2NClIts" ), secFromSOR, track.itsChi2NCl ());
623+
624+ nPVtracks++;
596625 }
597626
598627 // ### global tracks
@@ -728,6 +757,29 @@ struct TimeDependentQaTask {
728757 histos.fill (HIST (" hSecondsITSglobalVsEtaPhi" ), secFromSOR, track.eta (), track.phi ());
729758 }
730759 }
760+ } // end of track loop
761+
762+ // fill mult distributions vs time
763+ if (confIncludeMultDistrVsTimeHistos) {
764+ histos.fill (HIST (" multDistributions/hSecondsDistrPVtracks" ), secFromSOR, nPVtracks);
765+
766+ // ZNA,C
767+ // float multZNA = bc.has_zdc() ? bc.zdc().energyCommonZNA() : -999.f;
768+ // float multZNC = bc.has_zdc() ? bc.zdc().energyCommonZNC() : -999.f;
769+ histos.fill (HIST (" multDistributions/hSecondsDistrZNA" ), secFromSOR, col.multZNA ());
770+ histos.fill (HIST (" multDistributions/hSecondsDistrZNC" ), secFromSOR, col.multZNC ());
771+ float ZNdiff = col.multZNA () - col.multZNC ();
772+ float ZNsum = col.multZNA () + col.multZNC ();
773+ histos.fill (HIST (" multDistributions/hSecondsDistrZNACdiff" ), secFromSOR, ZNdiff);
774+ if (ZNsum > 0 )
775+ histos.fill (HIST (" multDistributions/hSecondsDistrZNACdiffNorm" ), secFromSOR, ZNdiff / ZNsum);
776+
777+ // FT0A,C, V0A
778+ // float multT0A = bc.has_ft0() ? bc.ft0().sumAmpA() : -999.f;
779+ // float multT0C = bc.has_ft0() ? fbcundBC.ft0().sumAmpC() : -999.f;
780+ histos.fill (HIST (" multDistributions/hSecondsDistrT0A" ), secFromSOR, col.multFT0A ());
781+ histos.fill (HIST (" multDistributions/hSecondsDistrT0C" ), secFromSOR, col.multFT0C ());
782+ histos.fill (HIST (" multDistributions/hSecondsDistrV0A" ), secFromSOR, col.multFV0A ());
731783 }
732784 }
733785 } // end of collision loop
0 commit comments