diff --git a/DPG/Tasks/AOTEvent/timeDependentQa.cxx b/DPG/Tasks/AOTEvent/timeDependentQa.cxx index 2f4b3f5608d..03f9850a1b5 100644 --- a/DPG/Tasks/AOTEvent/timeDependentQa.cxx +++ b/DPG/Tasks/AOTEvent/timeDependentQa.cxx @@ -78,11 +78,13 @@ struct TimeDependentQaTask { 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{"IncludeMultDistrVsTimeHistos", 0, ""}; // o2-linter: disable=name/configurable (temporary fix) - Configurable confMaxNtracksForTimeDepDistributions{"MaxNtracksForTimeDepDistributions", 800, ""}; // o2-linter: disable=name/configurable (temporary fix) - Configurable confMaxZNACenergyForTimeDepDistributions{"MaxZNACenergyForTimeDepDistributions", 4000, ""}; // o2-linter: disable=name/configurable (temporary fix) - Configurable confMaxT0ACamplForTimeDepDistributions{"MaxT0ACamplForTimeDepDistributions", 25000, ""}; // o2-linter: disable=name/configurable (temporary fix) - Configurable confMaxV0AamplForTimeDepDistributions{"MaxV0AamplForTimeDepDistributions", 40000, ""}; // o2-linter: disable=name/configurable (temporary fix) + Configurable confIncludeMultDistrVsTimeHistos{"IncludeMultDistrVsTimeHistos", 0, ""}; // o2-linter: disable=name/configurable (temporary fix) + Configurable confMaxNtracksForTimeDepDistributions{"MaxNtracksForTimeDepDistributions", 800, ""}; // o2-linter: disable=name/configurable (temporary fix) + Configurable confMaxZNACenergyForTimeDepDistributions{"MaxZNACenergyForTimeDepDistributions", 4000, ""}; // o2-linter: disable=name/configurable (temporary fix) + Configurable confMaxT0ACamplForTimeDepDistributions{"MaxT0ACamplForTimeDepDistributions", 25000, ""}; // o2-linter: disable=name/configurable (temporary fix) + Configurable confMaxV0AamplForTimeDepDistributions{"MaxV0AamplForTimeDepDistributions", 40000, ""}; // o2-linter: disable=name/configurable (temporary fix) + Configurable confFlagUseGlobalTracksForTimeDepDistributions{"FlagUseGlobalTracksForTimeDepDistributions", 0, "0 - PV contributors , 1 - global tracks"}; // o2-linter: disable=name/configurable (temporary fix) + Configurable confFlagUseGoodZvtxFT0vsPVForTimeDepDistributions{"FlagUseGoodZvtxFT0vsPVForTimeDepDistributions", 0, "0 - no , 1 - yes"}; // o2-linter: disable=name/configurable (temporary fix) enum EvSelBitsToMonitor { enCollisionsAll = 0, @@ -262,8 +264,8 @@ struct TimeDependentQaTask { histos.add("multDistributions/hSecondsDistrZNACdiffNormAmpl", "", kTH2D, {axisSecondsVeryWideBins, {200, -1., 1., "ZN A-C diff"}}); // 2D vs time - histos.add("multDistributions/hSecondsNPVvsZNAampl", "", kTH3F, {axisSecondsSuperWideBins, {200, 0, 600, "n PV tracks"}, {200, 0, maxZNACenergyForTimeDepDistributions, "ZNA ampl"}}); - histos.add("multDistributions/hSecondsNPVvsZNCampl", "", kTH3F, {axisSecondsSuperWideBins, {200, 0, 600, "n PV tracks"}, {200, 0, maxZNACenergyForTimeDepDistributions, "ZNC ampl"}}); + histos.add("multDistributions/hSecondsNPVvsZNAampl", "", kTH3F, {axisSecondsSuperWideBins, {200, 0, 500, "n PV tracks"}, {200, 0, maxZNACenergyForTimeDepDistributions, "ZNA ampl"}}); + histos.add("multDistributions/hSecondsNPVvsZNCampl", "", kTH3F, {axisSecondsSuperWideBins, {200, 0, 500, "n PV tracks"}, {200, 0, maxZNACenergyForTimeDepDistributions, "ZNC ampl"}}); // now histos after kNoSameBunchPileup cut: histos.add("multDistributionsNoPileup/hSecondsDistrPVtracks", "", kTH2D, {axisSecondsVeryWideBins, {maxNtracks, -0.5, maxNtracks - 0.5, "n PV tracks"}}); @@ -280,8 +282,8 @@ struct TimeDependentQaTask { histos.add("multDistributionsNoPileup/hSecondsDistrZNACdiffNormAmpl", "", kTH2D, {axisSecondsVeryWideBins, {200, -1., 1., "ZN A-C diff"}}); // 2D vs time - histos.add("multDistributionsNoPileup/hSecondsNPVvsZNAampl", "", kTH3F, {axisSecondsSuperWideBins, {200, 0, 600, "n PV tracks"}, {200, 0, maxZNACenergyForTimeDepDistributions, "ZNA ampl"}}); - histos.add("multDistributionsNoPileup/hSecondsNPVvsZNCampl", "", kTH3F, {axisSecondsSuperWideBins, {200, 0, 600, "n PV tracks"}, {200, 0, maxZNACenergyForTimeDepDistributions, "ZNC ampl"}}); + histos.add("multDistributionsNoPileup/hSecondsNPVvsZNAampl", "", kTH3F, {axisSecondsSuperWideBins, {200, 0, 500, "n PV tracks"}, {200, 0, maxZNACenergyForTimeDepDistributions, "ZNA ampl"}}); + histos.add("multDistributionsNoPileup/hSecondsNPVvsZNCampl", "", kTH3F, {axisSecondsSuperWideBins, {200, 0, 500, "n PV tracks"}, {200, 0, maxZNACenergyForTimeDepDistributions, "ZNC ampl"}}); } // ### QA event selection bits @@ -621,6 +623,7 @@ struct TimeDependentQaTask { // ##### track loop auto tracksGrouped = tracks.sliceBy(perCollision, col.globalIndex()); int nPVtracks = 0; + int nGlobalTracks = 0; for (const auto& track : tracksGrouped) { // if (!track.hasTPC() || !track.hasITS()) // continue; @@ -686,8 +689,9 @@ struct TimeDependentQaTask { // ### global tracks float dedx = track.tpcSignal(); - if (track.isGlobalTrack()) { // A side - if (track.tgl() > 0.) { + if (track.isGlobalTrack()) { + nGlobalTracks++; + if (track.tgl() > 0.) { // A side histos.fill(HIST("A/global/hDcaRafterCuts"), dcaR); histos.fill(HIST("A/global/hDcaZafterCuts"), dcaZ); @@ -820,10 +824,12 @@ struct TimeDependentQaTask { } // end of track loop // fill mult distributions vs time - if (confIncludeMultDistrVsTimeHistos) { + if (confIncludeMultDistrVsTimeHistos && (!confFlagUseGoodZvtxFT0vsPVForTimeDepDistributions ? true : col.selection_bit(kIsGoodZvtxFT0vsPV))) { bool noPileup = col.selection_bit(kNoSameBunchPileup); - histos.fill(HIST("multDistributions/hSecondsDistrPVtracks"), secFromSOR, nPVtracks); + int nTracksForTimeDep = confFlagUseGlobalTracksForTimeDepDistributions ? nGlobalTracks : nPVtracks; + + histos.fill(HIST("multDistributions/hSecondsDistrPVtracks"), secFromSOR, nTracksForTimeDep); // ZNA,C // float multZNA = bc.has_zdc() ? bc.zdc().energyCommonZNA() : -999.f; @@ -847,8 +853,8 @@ struct TimeDependentQaTask { if (ZNsumAmpl > 0) histos.fill(HIST("multDistributions/hSecondsDistrZNACdiffNormAmpl"), secFromSOR, ZNdiffAmpl / ZNsumAmpl); - histos.fill(HIST("multDistributions/hSecondsNPVvsZNAampl"), secFromSOR, nPVtracks, ZNAampl); - histos.fill(HIST("multDistributions/hSecondsNPVvsZNCampl"), secFromSOR, nPVtracks, ZNCampl); + histos.fill(HIST("multDistributions/hSecondsNPVvsZNAampl"), secFromSOR, nTracksForTimeDep, ZNAampl); + histos.fill(HIST("multDistributions/hSecondsNPVvsZNCampl"), secFromSOR, nTracksForTimeDep, ZNCampl); // FT0A,C, V0A // float multT0A = bc.has_ft0() ? bc.ft0().sumAmpA() : -999.f; @@ -858,7 +864,7 @@ struct TimeDependentQaTask { histos.fill(HIST("multDistributions/hSecondsDistrV0A"), secFromSOR, col.multFV0A()); if (noPileup) { - histos.fill(HIST("multDistributionsNoPileup/hSecondsDistrPVtracks"), secFromSOR, nPVtracks); + histos.fill(HIST("multDistributionsNoPileup/hSecondsDistrPVtracks"), secFromSOR, nTracksForTimeDep); histos.fill(HIST("multDistributionsNoPileup/hSecondsDistrZNA"), secFromSOR, col.multZNA()); histos.fill(HIST("multDistributionsNoPileup/hSecondsDistrZNC"), secFromSOR, col.multZNC()); @@ -872,8 +878,8 @@ struct TimeDependentQaTask { if (ZNsumAmpl > 0) histos.fill(HIST("multDistributionsNoPileup/hSecondsDistrZNACdiffNormAmpl"), secFromSOR, ZNdiffAmpl / ZNsumAmpl); - histos.fill(HIST("multDistributionsNoPileup/hSecondsNPVvsZNAampl"), secFromSOR, nPVtracks, ZNAampl); - histos.fill(HIST("multDistributionsNoPileup/hSecondsNPVvsZNCampl"), secFromSOR, nPVtracks, ZNCampl); + histos.fill(HIST("multDistributionsNoPileup/hSecondsNPVvsZNAampl"), secFromSOR, nTracksForTimeDep, ZNAampl); + histos.fill(HIST("multDistributionsNoPileup/hSecondsNPVvsZNCampl"), secFromSOR, nTracksForTimeDep, ZNCampl); // histos.fill(HIST("multDistributionsNoPileup/hSecondsDistrT0A"), secFromSOR, col.multFT0A());