Skip to content

Commit 9b7bfe2

Browse files
authored
[DPG] timeDependent mult distributions with noPileup condition (#11927)
1 parent 994d78d commit 9b7bfe2

File tree

1 file changed

+63
-9
lines changed

1 file changed

+63
-9
lines changed

DPG/Tasks/AOTEvent/timeDependentQa.cxx

Lines changed: 63 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ using namespace o2::aod::evsel;
4141
using namespace o2::aod::rctsel;
4242

4343
using ColEvSels = soa::Join<aod::Collisions, aod::EvSels, aod::Mults>;
44-
using BCsRun3 = soa::Join<aod::BCs, aod::Timestamps, aod::BcSels>;
44+
using BCsRun3 = soa::Join<aod::BCs, aod::Timestamps, aod::BcSels, aod::Run3MatchedToBCSparse>;
4545
using BarrelTracks = soa::Join<aod::Tracks, aod::TracksExtra, aod::TracksDCA, aod::TrackSelection>;
4646

4747
const AxisSpec axisQoverPt{100, -1., 1., "q/p_{T}, 1/GeV"};
@@ -63,11 +63,11 @@ struct TimeDependentQaTask {
6363
Configurable<int> confFlagCheckQoverPtHist{"FlagCheckQoverPtHist", 1, "0 - don't check , 1 - check"}; // o2-linter: disable=name/configurable (temporary fix)
6464

6565
// for O-O and Ne-Ne run
66-
Configurable<int> confIncludeMultDistrVsTimeHistos{"IncludeMultDistrVsTimeHistos", 0, ""}; // o2-linter: disable=name/configurable (temporary fix)
67-
Configurable<float> confMaxNtracksForTimeDepDistributions{"MaxNtracksForTimeDepDistributions", 800, ""}; // o2-linter: disable=name/configurable (temporary fix)
68-
Configurable<float> confMaxZNACenergyForTimeDepDistributions{"MaxZNACenergyForTimeDepDistributions", 80, ""}; // o2-linter: disable=name/configurable (temporary fix)
69-
Configurable<float> confMaxT0ACamplForTimeDepDistributions{"MaxT0ACamplForTimeDepDistributions", 25000, ""}; // o2-linter: disable=name/configurable (temporary fix)
70-
Configurable<float> confMaxV0AamplForTimeDepDistributions{"MaxV0AamplForTimeDepDistributions", 40000, ""}; // o2-linter: disable=name/configurable (temporary fix)
66+
Configurable<int> confIncludeMultDistrVsTimeHistos{"IncludeMultDistrVsTimeHistos", 0, ""}; // o2-linter: disable=name/configurable (temporary fix)
67+
Configurable<float> confMaxNtracksForTimeDepDistributions{"MaxNtracksForTimeDepDistributions", 800, ""}; // o2-linter: disable=name/configurable (temporary fix)
68+
Configurable<float> confMaxZNACenergyForTimeDepDistributions{"MaxZNACenergyForTimeDepDistributions", 4000, ""}; // o2-linter: disable=name/configurable (temporary fix)
69+
Configurable<float> confMaxT0ACamplForTimeDepDistributions{"MaxT0ACamplForTimeDepDistributions", 25000, ""}; // o2-linter: disable=name/configurable (temporary fix)
70+
Configurable<float> confMaxV0AamplForTimeDepDistributions{"MaxV0AamplForTimeDepDistributions", 40000, ""}; // o2-linter: disable=name/configurable (temporary fix)
7171

7272
enum EvSelBitsToMonitor {
7373
enCollisionsAll = 0,
@@ -164,6 +164,7 @@ struct TimeDependentQaTask {
164164
ColEvSels const& cols,
165165
BarrelTracks const& tracks,
166166
BCsRun3 const& bcs,
167+
aod::Zdcs const&,
167168
aod::FT0s const&)
168169
{
169170
int runNumber = bcs.iteratorAt(0).runNumber();
@@ -204,6 +205,7 @@ struct TimeDependentQaTask {
204205
histos.add("hSecondsCollisionsTVXTFborderCutNoVzCut", "", kTH1D, {axisSeconds});
205206

206207
histos.add("hSecondsCollisions", "", kTH1D, {axisSeconds});
208+
histos.add("hSecondsCollisionsNoPileup", "", kTH1D, {axisSeconds});
207209
histos.add("hSecondsIR", "", kTH1D, {axisSeconds});
208210
histos.add("hSecondsVz", "", kTH1D, {axisSeconds});
209211
histos.add("hSecondsFT0Camlp", "", kTH1D, {axisSeconds});
@@ -225,13 +227,30 @@ struct TimeDependentQaTask {
225227
float maxT0ACamplForTimeDepDistributions = confMaxT0ACamplForTimeDepDistributions;
226228
float maxV0AamplForTimeDepDistributions = confMaxV0AamplForTimeDepDistributions;
227229
histos.add("multDistributions/hSecondsDistrPVtracks", "", kTH2D, {axisSecondsVeryWideBins, {maxNtracks, -0.5, maxNtracks - 0.5, "n PV tracks"}});
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"}});
228233
histos.add("multDistributions/hSecondsDistrZNA", "", kTH2D, {axisSecondsVeryWideBins, {320, 0, maxZNACenergyForTimeDepDistributions, "ZNA ampl"}});
229234
histos.add("multDistributions/hSecondsDistrZNC", "", kTH2D, {axisSecondsVeryWideBins, {320, 0, maxZNACenergyForTimeDepDistributions, "ZNC ampl"}});
230235
histos.add("multDistributions/hSecondsDistrZNACdiff", "", kTH2D, {axisSecondsVeryWideBins, {600, -maxZNACenergyForTimeDepDistributions, maxZNACenergyForTimeDepDistributions, "ZN A-C diff"}});
231236
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"}});
237+
histos.add("multDistributions/hSecondsDistrZNAampl", "", kTH2D, {axisSecondsVeryWideBins, {320, 0, maxZNACenergyForTimeDepDistributions, "ZNA ampl"}});
238+
histos.add("multDistributions/hSecondsDistrZNCampl", "", kTH2D, {axisSecondsVeryWideBins, {320, 0, maxZNACenergyForTimeDepDistributions, "ZNC ampl"}});
239+
histos.add("multDistributions/hSecondsDistrZNACdiffAmpl", "", kTH2D, {axisSecondsVeryWideBins, {200, -1., 1., "ZN A-C diff"}});
240+
histos.add("multDistributions/hSecondsDistrZNACdiffNormAmpl", "", kTH2D, {axisSecondsVeryWideBins, {200, -1., 1., "ZN A-C diff"}});
241+
242+
histos.add("multDistributionsNoPileup/hSecondsDistrPVtracks", "", kTH2D, {axisSecondsVeryWideBins, {maxNtracks, -0.5, maxNtracks - 0.5, "n PV tracks"}});
243+
histos.add("multDistributionsNoPileup/hSecondsDistrT0A", "", kTH2D, {axisSecondsVeryWideBins, {250, 0, maxT0ACamplForTimeDepDistributions, "T0A ampl"}});
244+
histos.add("multDistributionsNoPileup/hSecondsDistrT0C", "", kTH2D, {axisSecondsVeryWideBins, {250, 0, maxT0ACamplForTimeDepDistributions, "T0C ampl"}});
245+
histos.add("multDistributionsNoPileup/hSecondsDistrV0A", "", kTH2D, {axisSecondsVeryWideBins, {400, 0, maxV0AamplForTimeDepDistributions, "V0A ampl"}});
246+
histos.add("multDistributionsNoPileup/hSecondsDistrZNA", "", kTH2D, {axisSecondsVeryWideBins, {320, 0, maxZNACenergyForTimeDepDistributions, "ZNA ampl"}});
247+
histos.add("multDistributionsNoPileup/hSecondsDistrZNC", "", kTH2D, {axisSecondsVeryWideBins, {320, 0, maxZNACenergyForTimeDepDistributions, "ZNC ampl"}});
248+
histos.add("multDistributionsNoPileup/hSecondsDistrZNACdiff", "", kTH2D, {axisSecondsVeryWideBins, {600, -maxZNACenergyForTimeDepDistributions, maxZNACenergyForTimeDepDistributions, "ZN A-C diff"}});
249+
histos.add("multDistributionsNoPileup/hSecondsDistrZNACdiffNorm", "", kTH2D, {axisSecondsVeryWideBins, {200, -1., 1., "ZN A-C diff"}});
250+
histos.add("multDistributionsNoPileup/hSecondsDistrZNAampl", "", kTH2D, {axisSecondsVeryWideBins, {320, 0, maxZNACenergyForTimeDepDistributions, "ZNA ampl"}});
251+
histos.add("multDistributionsNoPileup/hSecondsDistrZNCampl", "", kTH2D, {axisSecondsVeryWideBins, {320, 0, maxZNACenergyForTimeDepDistributions, "ZNC ampl"}});
252+
histos.add("multDistributionsNoPileup/hSecondsDistrZNACdiffAmpl", "", kTH2D, {axisSecondsVeryWideBins, {200, -1., 1., "ZN A-C diff"}});
253+
histos.add("multDistributionsNoPileup/hSecondsDistrZNACdiffNormAmpl", "", kTH2D, {axisSecondsVeryWideBins, {200, -1., 1., "ZN A-C diff"}});
235254
}
236255

237256
// ### QA event selection bits
@@ -485,6 +504,8 @@ struct TimeDependentQaTask {
485504

486505
histos.fill(HIST("hSecondsUPCvertices"), secFromSOR, isVertexUPC ? 1 : 0);
487506
histos.fill(HIST("hSecondsCollisions"), secFromSOR);
507+
if (col.selection_bit(kNoSameBunchPileup))
508+
histos.fill(HIST("hSecondsCollisionsNoPileup"), secFromSOR);
488509
histos.fill(HIST("hSecondsVz"), secFromSOR, col.posZ());
489510
histos.fill(HIST("hSecondsFT0Camlp"), secFromSOR, bc.foundFT0().sumAmpC());
490511
histos.fill(HIST("hSecondsFT0CamlpByColMult"), secFromSOR, col.multFT0C());
@@ -761,6 +782,8 @@ struct TimeDependentQaTask {
761782

762783
// fill mult distributions vs time
763784
if (confIncludeMultDistrVsTimeHistos) {
785+
bool noPileup = col.selection_bit(kNoSameBunchPileup);
786+
764787
histos.fill(HIST("multDistributions/hSecondsDistrPVtracks"), secFromSOR, nPVtracks);
765788

766789
// ZNA,C
@@ -774,12 +797,43 @@ struct TimeDependentQaTask {
774797
if (ZNsum > 0)
775798
histos.fill(HIST("multDistributions/hSecondsDistrZNACdiffNorm"), secFromSOR, ZNdiff / ZNsum);
776799

800+
// ZNA,C by amplitudes (suggested by Chiara O.)
801+
float ZNAampl = bc.has_zdc() ? bc.zdc().amplitudeZNA() : 0;
802+
float ZNCampl = bc.has_zdc() ? bc.zdc().amplitudeZNC() : 0;
803+
histos.fill(HIST("multDistributions/hSecondsDistrZNAampl"), secFromSOR, ZNAampl);
804+
histos.fill(HIST("multDistributions/hSecondsDistrZNCampl"), secFromSOR, ZNCampl);
805+
float ZNdiffAmpl = ZNAampl - ZNCampl;
806+
float ZNsumAmpl = ZNAampl + ZNCampl;
807+
histos.fill(HIST("multDistributions/hSecondsDistrZNACdiffAmpl"), secFromSOR, ZNdiffAmpl);
808+
if (ZNsumAmpl > 0)
809+
histos.fill(HIST("multDistributions/hSecondsDistrZNACdiffNormAmpl"), secFromSOR, ZNdiffAmpl / ZNsumAmpl);
810+
777811
// FT0A,C, V0A
778812
// float multT0A = bc.has_ft0() ? bc.ft0().sumAmpA() : -999.f;
779813
// float multT0C = bc.has_ft0() ? fbcundBC.ft0().sumAmpC() : -999.f;
780814
histos.fill(HIST("multDistributions/hSecondsDistrT0A"), secFromSOR, col.multFT0A());
781815
histos.fill(HIST("multDistributions/hSecondsDistrT0C"), secFromSOR, col.multFT0C());
782816
histos.fill(HIST("multDistributions/hSecondsDistrV0A"), secFromSOR, col.multFV0A());
817+
818+
if (noPileup) {
819+
histos.fill(HIST("multDistributionsNoPileup/hSecondsDistrPVtracks"), secFromSOR, nPVtracks);
820+
821+
histos.fill(HIST("multDistributionsNoPileup/hSecondsDistrZNA"), secFromSOR, col.multZNA());
822+
histos.fill(HIST("multDistributionsNoPileup/hSecondsDistrZNC"), secFromSOR, col.multZNC());
823+
histos.fill(HIST("multDistributionsNoPileup/hSecondsDistrZNACdiff"), secFromSOR, ZNdiff);
824+
if (ZNsum > 0)
825+
histos.fill(HIST("multDistributionsNoPileup/hSecondsDistrZNACdiffNorm"), secFromSOR, ZNdiff / ZNsum);
826+
827+
histos.fill(HIST("multDistributionsNoPileup/hSecondsDistrZNAampl"), secFromSOR, ZNAampl);
828+
histos.fill(HIST("multDistributionsNoPileup/hSecondsDistrZNCampl"), secFromSOR, ZNCampl);
829+
histos.fill(HIST("multDistributionsNoPileup/hSecondsDistrZNACdiffAmpl"), secFromSOR, ZNdiffAmpl);
830+
if (ZNsumAmpl > 0)
831+
histos.fill(HIST("multDistributionsNoPileup/hSecondsDistrZNACdiffNormAmpl"), secFromSOR, ZNdiffAmpl / ZNsumAmpl);
832+
833+
histos.fill(HIST("multDistributionsNoPileup/hSecondsDistrT0A"), secFromSOR, col.multFT0A());
834+
histos.fill(HIST("multDistributionsNoPileup/hSecondsDistrT0C"), secFromSOR, col.multFT0C());
835+
histos.fill(HIST("multDistributionsNoPileup/hSecondsDistrV0A"), secFromSOR, col.multFV0A());
836+
}
783837
}
784838
}
785839
} // end of collision loop

0 commit comments

Comments
 (0)