diff --git a/DPG/Tasks/AOTEvent/timeDependentQa.cxx b/DPG/Tasks/AOTEvent/timeDependentQa.cxx index 766c6aa5520..61fbb690e6c 100644 --- a/DPG/Tasks/AOTEvent/timeDependentQa.cxx +++ b/DPG/Tasks/AOTEvent/timeDependentQa.cxx @@ -41,7 +41,7 @@ using namespace o2::aod::evsel; using namespace o2::aod::rctsel; using ColEvSels = soa::Join; -using BCsRun3 = soa::Join; +using BCsRun3 = soa::Join; using BarrelTracks = soa::Join; const AxisSpec axisQoverPt{100, -1., 1., "q/p_{T}, 1/GeV"}; @@ -63,11 +63,11 @@ 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", 80, ""}; // 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) enum EvSelBitsToMonitor { enCollisionsAll = 0, @@ -164,6 +164,7 @@ struct TimeDependentQaTask { ColEvSels const& cols, BarrelTracks const& tracks, BCsRun3 const& bcs, + aod::Zdcs const&, aod::FT0s const&) { int runNumber = bcs.iteratorAt(0).runNumber(); @@ -204,6 +205,7 @@ struct TimeDependentQaTask { histos.add("hSecondsCollisionsTVXTFborderCutNoVzCut", "", kTH1D, {axisSeconds}); histos.add("hSecondsCollisions", "", kTH1D, {axisSeconds}); + histos.add("hSecondsCollisionsNoPileup", "", kTH1D, {axisSeconds}); histos.add("hSecondsIR", "", kTH1D, {axisSeconds}); histos.add("hSecondsVz", "", kTH1D, {axisSeconds}); histos.add("hSecondsFT0Camlp", "", kTH1D, {axisSeconds}); @@ -225,13 +227,30 @@ struct TimeDependentQaTask { float maxT0ACamplForTimeDepDistributions = confMaxT0ACamplForTimeDepDistributions; float maxV0AamplForTimeDepDistributions = confMaxV0AamplForTimeDepDistributions; histos.add("multDistributions/hSecondsDistrPVtracks", "", kTH2D, {axisSecondsVeryWideBins, {maxNtracks, -0.5, maxNtracks - 0.5, "n PV tracks"}}); + 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"}}); 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"}}); + histos.add("multDistributions/hSecondsDistrZNAampl", "", kTH2D, {axisSecondsVeryWideBins, {320, 0, maxZNACenergyForTimeDepDistributions, "ZNA ampl"}}); + histos.add("multDistributions/hSecondsDistrZNCampl", "", kTH2D, {axisSecondsVeryWideBins, {320, 0, maxZNACenergyForTimeDepDistributions, "ZNC ampl"}}); + histos.add("multDistributions/hSecondsDistrZNACdiffAmpl", "", kTH2D, {axisSecondsVeryWideBins, {200, -1., 1., "ZN A-C diff"}}); + histos.add("multDistributions/hSecondsDistrZNACdiffNormAmpl", "", kTH2D, {axisSecondsVeryWideBins, {200, -1., 1., "ZN A-C diff"}}); + + histos.add("multDistributionsNoPileup/hSecondsDistrPVtracks", "", kTH2D, {axisSecondsVeryWideBins, {maxNtracks, -0.5, maxNtracks - 0.5, "n PV tracks"}}); + histos.add("multDistributionsNoPileup/hSecondsDistrT0A", "", kTH2D, {axisSecondsVeryWideBins, {250, 0, maxT0ACamplForTimeDepDistributions, "T0A ampl"}}); + histos.add("multDistributionsNoPileup/hSecondsDistrT0C", "", kTH2D, {axisSecondsVeryWideBins, {250, 0, maxT0ACamplForTimeDepDistributions, "T0C ampl"}}); + histos.add("multDistributionsNoPileup/hSecondsDistrV0A", "", kTH2D, {axisSecondsVeryWideBins, {400, 0, maxV0AamplForTimeDepDistributions, "V0A ampl"}}); + histos.add("multDistributionsNoPileup/hSecondsDistrZNA", "", kTH2D, {axisSecondsVeryWideBins, {320, 0, maxZNACenergyForTimeDepDistributions, "ZNA ampl"}}); + histos.add("multDistributionsNoPileup/hSecondsDistrZNC", "", kTH2D, {axisSecondsVeryWideBins, {320, 0, maxZNACenergyForTimeDepDistributions, "ZNC ampl"}}); + histos.add("multDistributionsNoPileup/hSecondsDistrZNACdiff", "", kTH2D, {axisSecondsVeryWideBins, {600, -maxZNACenergyForTimeDepDistributions, maxZNACenergyForTimeDepDistributions, "ZN A-C diff"}}); + histos.add("multDistributionsNoPileup/hSecondsDistrZNACdiffNorm", "", kTH2D, {axisSecondsVeryWideBins, {200, -1., 1., "ZN A-C diff"}}); + histos.add("multDistributionsNoPileup/hSecondsDistrZNAampl", "", kTH2D, {axisSecondsVeryWideBins, {320, 0, maxZNACenergyForTimeDepDistributions, "ZNA ampl"}}); + histos.add("multDistributionsNoPileup/hSecondsDistrZNCampl", "", kTH2D, {axisSecondsVeryWideBins, {320, 0, maxZNACenergyForTimeDepDistributions, "ZNC ampl"}}); + histos.add("multDistributionsNoPileup/hSecondsDistrZNACdiffAmpl", "", kTH2D, {axisSecondsVeryWideBins, {200, -1., 1., "ZN A-C diff"}}); + histos.add("multDistributionsNoPileup/hSecondsDistrZNACdiffNormAmpl", "", kTH2D, {axisSecondsVeryWideBins, {200, -1., 1., "ZN A-C diff"}}); } // ### QA event selection bits @@ -485,6 +504,8 @@ struct TimeDependentQaTask { histos.fill(HIST("hSecondsUPCvertices"), secFromSOR, isVertexUPC ? 1 : 0); histos.fill(HIST("hSecondsCollisions"), secFromSOR); + if (col.selection_bit(kNoSameBunchPileup)) + histos.fill(HIST("hSecondsCollisionsNoPileup"), secFromSOR); histos.fill(HIST("hSecondsVz"), secFromSOR, col.posZ()); histos.fill(HIST("hSecondsFT0Camlp"), secFromSOR, bc.foundFT0().sumAmpC()); histos.fill(HIST("hSecondsFT0CamlpByColMult"), secFromSOR, col.multFT0C()); @@ -761,6 +782,8 @@ struct TimeDependentQaTask { // fill mult distributions vs time if (confIncludeMultDistrVsTimeHistos) { + bool noPileup = col.selection_bit(kNoSameBunchPileup); + histos.fill(HIST("multDistributions/hSecondsDistrPVtracks"), secFromSOR, nPVtracks); // ZNA,C @@ -774,12 +797,43 @@ struct TimeDependentQaTask { if (ZNsum > 0) histos.fill(HIST("multDistributions/hSecondsDistrZNACdiffNorm"), secFromSOR, ZNdiff / ZNsum); + // ZNA,C by amplitudes (suggested by Chiara O.) + float ZNAampl = bc.has_zdc() ? bc.zdc().amplitudeZNA() : 0; + float ZNCampl = bc.has_zdc() ? bc.zdc().amplitudeZNC() : 0; + histos.fill(HIST("multDistributions/hSecondsDistrZNAampl"), secFromSOR, ZNAampl); + histos.fill(HIST("multDistributions/hSecondsDistrZNCampl"), secFromSOR, ZNCampl); + float ZNdiffAmpl = ZNAampl - ZNCampl; + float ZNsumAmpl = ZNAampl + ZNCampl; + histos.fill(HIST("multDistributions/hSecondsDistrZNACdiffAmpl"), secFromSOR, ZNdiffAmpl); + if (ZNsumAmpl > 0) + histos.fill(HIST("multDistributions/hSecondsDistrZNACdiffNormAmpl"), secFromSOR, ZNdiffAmpl / ZNsumAmpl); + // 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()); + + if (noPileup) { + histos.fill(HIST("multDistributionsNoPileup/hSecondsDistrPVtracks"), secFromSOR, nPVtracks); + + histos.fill(HIST("multDistributionsNoPileup/hSecondsDistrZNA"), secFromSOR, col.multZNA()); + histos.fill(HIST("multDistributionsNoPileup/hSecondsDistrZNC"), secFromSOR, col.multZNC()); + histos.fill(HIST("multDistributionsNoPileup/hSecondsDistrZNACdiff"), secFromSOR, ZNdiff); + if (ZNsum > 0) + histos.fill(HIST("multDistributionsNoPileup/hSecondsDistrZNACdiffNorm"), secFromSOR, ZNdiff / ZNsum); + + histos.fill(HIST("multDistributionsNoPileup/hSecondsDistrZNAampl"), secFromSOR, ZNAampl); + histos.fill(HIST("multDistributionsNoPileup/hSecondsDistrZNCampl"), secFromSOR, ZNCampl); + histos.fill(HIST("multDistributionsNoPileup/hSecondsDistrZNACdiffAmpl"), secFromSOR, ZNdiffAmpl); + if (ZNsumAmpl > 0) + histos.fill(HIST("multDistributionsNoPileup/hSecondsDistrZNACdiffNormAmpl"), secFromSOR, ZNdiffAmpl / ZNsumAmpl); + + histos.fill(HIST("multDistributionsNoPileup/hSecondsDistrT0A"), secFromSOR, col.multFT0A()); + histos.fill(HIST("multDistributionsNoPileup/hSecondsDistrT0C"), secFromSOR, col.multFT0C()); + histos.fill(HIST("multDistributionsNoPileup/hSecondsDistrV0A"), secFromSOR, col.multFV0A()); + } } } } // end of collision loop