@@ -78,11 +78,13 @@ struct TimeDependentQaTask {
7878 Configurable<int > confFlagCheckQoverPtHist{" FlagCheckQoverPtHist" , 1 , " 0 - don't check , 1 - check" }; // o2-linter: disable=name/configurable (temporary fix)
7979
8080 // for O-O and Ne-Ne run
81- Configurable<int > confIncludeMultDistrVsTimeHistos{" IncludeMultDistrVsTimeHistos" , 0 , " " }; // o2-linter: disable=name/configurable (temporary fix)
82- Configurable<float > confMaxNtracksForTimeDepDistributions{" MaxNtracksForTimeDepDistributions" , 800 , " " }; // o2-linter: disable=name/configurable (temporary fix)
83- Configurable<float > confMaxZNACenergyForTimeDepDistributions{" MaxZNACenergyForTimeDepDistributions" , 4000 , " " }; // o2-linter: disable=name/configurable (temporary fix)
84- Configurable<float > confMaxT0ACamplForTimeDepDistributions{" MaxT0ACamplForTimeDepDistributions" , 25000 , " " }; // o2-linter: disable=name/configurable (temporary fix)
85- Configurable<float > confMaxV0AamplForTimeDepDistributions{" MaxV0AamplForTimeDepDistributions" , 40000 , " " }; // o2-linter: disable=name/configurable (temporary fix)
81+ Configurable<int > confIncludeMultDistrVsTimeHistos{" IncludeMultDistrVsTimeHistos" , 0 , " " }; // o2-linter: disable=name/configurable (temporary fix)
82+ Configurable<float > confMaxNtracksForTimeDepDistributions{" MaxNtracksForTimeDepDistributions" , 800 , " " }; // o2-linter: disable=name/configurable (temporary fix)
83+ Configurable<float > confMaxZNACenergyForTimeDepDistributions{" MaxZNACenergyForTimeDepDistributions" , 4000 , " " }; // o2-linter: disable=name/configurable (temporary fix)
84+ Configurable<float > confMaxT0ACamplForTimeDepDistributions{" MaxT0ACamplForTimeDepDistributions" , 25000 , " " }; // o2-linter: disable=name/configurable (temporary fix)
85+ Configurable<float > confMaxV0AamplForTimeDepDistributions{" MaxV0AamplForTimeDepDistributions" , 40000 , " " }; // o2-linter: disable=name/configurable (temporary fix)
86+ Configurable<int > confFlagUseGlobalTracksForTimeDepDistributions{" FlagUseGlobalTracksForTimeDepDistributions" , 0 , " 0 - PV contributors , 1 - global tracks" }; // o2-linter: disable=name/configurable (temporary fix)
87+ Configurable<int > confFlagUseGoodZvtxFT0vsPVForTimeDepDistributions{" FlagUseGoodZvtxFT0vsPVForTimeDepDistributions" , 0 , " 0 - no , 1 - yes" }; // o2-linter: disable=name/configurable (temporary fix)
8688
8789 enum EvSelBitsToMonitor {
8890 enCollisionsAll = 0 ,
@@ -262,8 +264,8 @@ struct TimeDependentQaTask {
262264 histos.add (" multDistributions/hSecondsDistrZNACdiffNormAmpl" , " " , kTH2D , {axisSecondsVeryWideBins, {200 , -1 ., 1 ., " ZN A-C diff" }});
263265
264266 // 2D vs time
265- histos.add (" multDistributions/hSecondsNPVvsZNAampl" , " " , kTH3F , {axisSecondsSuperWideBins, {200 , 0 , 600 , " n PV tracks" }, {200 , 0 , maxZNACenergyForTimeDepDistributions, " ZNA ampl" }});
266- histos.add (" multDistributions/hSecondsNPVvsZNCampl" , " " , kTH3F , {axisSecondsSuperWideBins, {200 , 0 , 600 , " n PV tracks" }, {200 , 0 , maxZNACenergyForTimeDepDistributions, " ZNC ampl" }});
267+ histos.add (" multDistributions/hSecondsNPVvsZNAampl" , " " , kTH3F , {axisSecondsSuperWideBins, {200 , 0 , 500 , " n PV tracks" }, {200 , 0 , maxZNACenergyForTimeDepDistributions, " ZNA ampl" }});
268+ histos.add (" multDistributions/hSecondsNPVvsZNCampl" , " " , kTH3F , {axisSecondsSuperWideBins, {200 , 0 , 500 , " n PV tracks" }, {200 , 0 , maxZNACenergyForTimeDepDistributions, " ZNC ampl" }});
267269
268270 // now histos after kNoSameBunchPileup cut:
269271 histos.add (" multDistributionsNoPileup/hSecondsDistrPVtracks" , " " , kTH2D , {axisSecondsVeryWideBins, {maxNtracks, -0.5 , maxNtracks - 0.5 , " n PV tracks" }});
@@ -280,8 +282,8 @@ struct TimeDependentQaTask {
280282 histos.add (" multDistributionsNoPileup/hSecondsDistrZNACdiffNormAmpl" , " " , kTH2D , {axisSecondsVeryWideBins, {200 , -1 ., 1 ., " ZN A-C diff" }});
281283
282284 // 2D vs time
283- histos.add (" multDistributionsNoPileup/hSecondsNPVvsZNAampl" , " " , kTH3F , {axisSecondsSuperWideBins, {200 , 0 , 600 , " n PV tracks" }, {200 , 0 , maxZNACenergyForTimeDepDistributions, " ZNA ampl" }});
284- histos.add (" multDistributionsNoPileup/hSecondsNPVvsZNCampl" , " " , kTH3F , {axisSecondsSuperWideBins, {200 , 0 , 600 , " n PV tracks" }, {200 , 0 , maxZNACenergyForTimeDepDistributions, " ZNC ampl" }});
285+ histos.add (" multDistributionsNoPileup/hSecondsNPVvsZNAampl" , " " , kTH3F , {axisSecondsSuperWideBins, {200 , 0 , 500 , " n PV tracks" }, {200 , 0 , maxZNACenergyForTimeDepDistributions, " ZNA ampl" }});
286+ histos.add (" multDistributionsNoPileup/hSecondsNPVvsZNCampl" , " " , kTH3F , {axisSecondsSuperWideBins, {200 , 0 , 500 , " n PV tracks" }, {200 , 0 , maxZNACenergyForTimeDepDistributions, " ZNC ampl" }});
285287 }
286288
287289 // ### QA event selection bits
@@ -621,6 +623,7 @@ struct TimeDependentQaTask {
621623 // ##### track loop
622624 auto tracksGrouped = tracks.sliceBy (perCollision, col.globalIndex ());
623625 int nPVtracks = 0 ;
626+ int nGlobalTracks = 0 ;
624627 for (const auto & track : tracksGrouped) {
625628 // if (!track.hasTPC() || !track.hasITS())
626629 // continue;
@@ -686,8 +689,9 @@ struct TimeDependentQaTask {
686689
687690 // ### global tracks
688691 float dedx = track.tpcSignal ();
689- if (track.isGlobalTrack ()) { // A side
690- if (track.tgl () > 0 .) {
692+ if (track.isGlobalTrack ()) {
693+ nGlobalTracks++;
694+ if (track.tgl () > 0 .) { // A side
691695 histos.fill (HIST (" A/global/hDcaRafterCuts" ), dcaR);
692696 histos.fill (HIST (" A/global/hDcaZafterCuts" ), dcaZ);
693697
@@ -820,10 +824,12 @@ struct TimeDependentQaTask {
820824 } // end of track loop
821825
822826 // fill mult distributions vs time
823- if (confIncludeMultDistrVsTimeHistos) {
827+ if (confIncludeMultDistrVsTimeHistos && (!confFlagUseGoodZvtxFT0vsPVForTimeDepDistributions ? true : col. selection_bit ( kIsGoodZvtxFT0vsPV )) ) {
824828 bool noPileup = col.selection_bit (kNoSameBunchPileup );
825829
826- histos.fill (HIST (" multDistributions/hSecondsDistrPVtracks" ), secFromSOR, nPVtracks);
830+ int nTracksForTimeDep = confFlagUseGlobalTracksForTimeDepDistributions ? nGlobalTracks : nPVtracks;
831+
832+ histos.fill (HIST (" multDistributions/hSecondsDistrPVtracks" ), secFromSOR, nTracksForTimeDep);
827833
828834 // ZNA,C
829835 // float multZNA = bc.has_zdc() ? bc.zdc().energyCommonZNA() : -999.f;
@@ -847,8 +853,8 @@ struct TimeDependentQaTask {
847853 if (ZNsumAmpl > 0 )
848854 histos.fill (HIST (" multDistributions/hSecondsDistrZNACdiffNormAmpl" ), secFromSOR, ZNdiffAmpl / ZNsumAmpl);
849855
850- histos.fill (HIST (" multDistributions/hSecondsNPVvsZNAampl" ), secFromSOR, nPVtracks , ZNAampl);
851- histos.fill (HIST (" multDistributions/hSecondsNPVvsZNCampl" ), secFromSOR, nPVtracks , ZNCampl);
856+ histos.fill (HIST (" multDistributions/hSecondsNPVvsZNAampl" ), secFromSOR, nTracksForTimeDep , ZNAampl);
857+ histos.fill (HIST (" multDistributions/hSecondsNPVvsZNCampl" ), secFromSOR, nTracksForTimeDep , ZNCampl);
852858
853859 // FT0A,C, V0A
854860 // float multT0A = bc.has_ft0() ? bc.ft0().sumAmpA() : -999.f;
@@ -858,7 +864,7 @@ struct TimeDependentQaTask {
858864 histos.fill (HIST (" multDistributions/hSecondsDistrV0A" ), secFromSOR, col.multFV0A ());
859865
860866 if (noPileup) {
861- histos.fill (HIST (" multDistributionsNoPileup/hSecondsDistrPVtracks" ), secFromSOR, nPVtracks );
867+ histos.fill (HIST (" multDistributionsNoPileup/hSecondsDistrPVtracks" ), secFromSOR, nTracksForTimeDep );
862868
863869 histos.fill (HIST (" multDistributionsNoPileup/hSecondsDistrZNA" ), secFromSOR, col.multZNA ());
864870 histos.fill (HIST (" multDistributionsNoPileup/hSecondsDistrZNC" ), secFromSOR, col.multZNC ());
@@ -872,8 +878,8 @@ struct TimeDependentQaTask {
872878 if (ZNsumAmpl > 0 )
873879 histos.fill (HIST (" multDistributionsNoPileup/hSecondsDistrZNACdiffNormAmpl" ), secFromSOR, ZNdiffAmpl / ZNsumAmpl);
874880
875- histos.fill (HIST (" multDistributionsNoPileup/hSecondsNPVvsZNAampl" ), secFromSOR, nPVtracks , ZNAampl);
876- histos.fill (HIST (" multDistributionsNoPileup/hSecondsNPVvsZNCampl" ), secFromSOR, nPVtracks , ZNCampl);
881+ histos.fill (HIST (" multDistributionsNoPileup/hSecondsNPVvsZNAampl" ), secFromSOR, nTracksForTimeDep , ZNAampl);
882+ histos.fill (HIST (" multDistributionsNoPileup/hSecondsNPVvsZNCampl" ), secFromSOR, nTracksForTimeDep , ZNCampl);
877883
878884 //
879885 histos.fill (HIST (" multDistributionsNoPileup/hSecondsDistrT0A" ), secFromSOR, col.multFT0A ());
0 commit comments