Skip to content

Commit 1fe5610

Browse files
authored
[PWGLF] More histograms Nch vs T0M and V0A (Poisson samp) (#12430)
1 parent 87f33ea commit 1fe5610

File tree

1 file changed

+26
-18
lines changed

1 file changed

+26
-18
lines changed

PWGLF/Tasks/GlobalEventProperties/uccZdc.cxx

Lines changed: 26 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,9 @@ using SimTracks = soa::Join<aod::Tracks, aod::TrackSelection, aod::TracksExtra,
6969

7070
static constexpr int kSizeBootStrapEnsemble{8};
7171

72-
std::array<std::shared_ptr<TH1>, kSizeBootStrapEnsemble> hNch{};
7372
std::array<std::shared_ptr<TH1>, kSizeBootStrapEnsemble> hPoisson{};
73+
std::array<std::shared_ptr<TH2>, kSizeBootStrapEnsemble> hNchVsT0M{};
74+
std::array<std::shared_ptr<TH2>, kSizeBootStrapEnsemble> hNchVsV0A{};
7475
std::array<std::shared_ptr<TProfile2D>, kSizeBootStrapEnsemble> pNchVsOneParCorrVsZN{};
7576
std::array<std::shared_ptr<TProfile2D>, kSizeBootStrapEnsemble> pNchVsTwoParCorrVsZN{};
7677
std::array<std::shared_ptr<TProfile2D>, kSizeBootStrapEnsemble> pNchVsThreeParCorrVsZN{};
@@ -89,6 +90,7 @@ std::array<std::shared_ptr<TProfile>, kSizeBootStrapEnsemble> pThreeParCorrVsNch
8990

9091
std::array<std::shared_ptr<TH1>, kSizeBootStrapEnsemble> hPoissonMC{};
9192
std::array<std::shared_ptr<TH1>, kSizeBootStrapEnsemble> hNchGen{};
93+
std::array<std::shared_ptr<TH1>, kSizeBootStrapEnsemble> hNch{};
9294

9395
// std::array<std::shared_ptr<TProfile>, kSizeBootStrapEnsemble> pOneParCorrVsT0MGen{};
9496
// std::array<std::shared_ptr<TProfile>, kSizeBootStrapEnsemble> pTwoParCorrVsT0MGen{};
@@ -293,7 +295,8 @@ struct UccZdc {
293295
registry.add("ThreeParCorrVsV0A", Form(";%s;%s;", tiV0A, tiThreeParCorr), kTProfile, {{nBinsAmpV0A, 0., maxAmpV0A}});
294296

295297
for (int i = 0; i < kSizeBootStrapEnsemble; i++) {
296-
hNch[i] = registry.add<TH1>(Form("Nch_Replica%d", i), Form(";%s;Entries", tiNch), kTH1F, {{nBinsNch, minNch, maxNch}});
298+
hNchVsV0A[i] = registry.add<TH2>(Form("NchVsV0A_Replica%d", i), Form(";%s;%s", tiNch, tiV0A), kTH2F, {{{nBinsNch, minNch, maxNch}, {nBinsAmpV0A, 0., maxAmpV0A}}});
299+
hNchVsT0M[i] = registry.add<TH2>(Form("NchVsT0M_Replica%d", i), Form(";%s;%s", tiNch, tiT0M), kTH2F, {{{nBinsNch, minNch, maxNch}, {nBinsAmpFT0, 0., maxAmpFT0}}});
297300
hPoisson[i] = registry.add<TH1>(Form("Poisson_Replica%d", i), ";#it{k};Entries", kTH1F, {{11, -0.5, 10.5}});
298301
pNchVsOneParCorrVsZN[i] = registry.add<TProfile2D>(Form("NchVsOneParCorrVsZN_Replica%d", i), Form(";%s;%s;%s", tiNch, tiZNs, tiOneParCorr), kTProfile2D, {{{nBinsNch, minNch, maxNch}, {nBinsZN, minZN, maxZN}}});
299302
pNchVsTwoParCorrVsZN[i] = registry.add<TProfile2D>(Form("NchVsTwoParCorrVsZN_Replica%d", i), Form(";%s;%s;%s", tiNch, tiZNs, tiTwoParCorr), kTProfile2D, {{{nBinsNch, minNch, maxNch}, {nBinsZN, minZN, maxZN}}});
@@ -359,7 +362,6 @@ struct UccZdc {
359362

360363
hPoissonMC[i] = registry.add<TH1>(Form("PoissonMC_Replica%d", i), ";#it{k};Entries", kTH1F, {{11, -0.5, 10.5}});
361364
hNchGen[i] = registry.add<TH1>(Form("NchGen_Replica%d", i), Form(";%s;Entries", tiNch), kTH1F, {{nBinsNch, minNch, maxNch}});
362-
363365
pOneParCorrVsNchGen[i] = registry.add<TProfile>(Form("OneParCorrVsNchGen_Replica%d", i), Form(";%s;%s;", tiNch, tiOneParCorr), kTProfile, {{nBinsNch, minNch, maxNch}});
364366
pTwoParCorrVsNchGen[i] = registry.add<TProfile>(Form("TwoParCorrVsNchGen_Replica%d", i), Form(";%s;%s;", tiNch, tiTwoParCorr), kTProfile, {{nBinsNch, minNch, maxNch}});
365367
pThreeParCorrVsNchGen[i] = registry.add<TProfile>(Form("ThreeParCorrVsNchGen_Replica%d", i), Form(";%s;%s;", tiNch, tiThreeParCorr), kTProfile, {{nBinsNch, minNch, maxNch}});
@@ -778,7 +780,7 @@ struct UccZdc {
778780
}
779781

780782
// Nch-based selection
781-
int glbTracks{0};
783+
double glbTracks{0.0};
782784
for (const auto& track : tracks) {
783785
// Track Selection
784786
if (!track.isGlobalTrack()) {
@@ -790,11 +792,7 @@ struct UccZdc {
790792
if ((track.eta() < minEta) || (track.eta() > maxEta)) {
791793
continue;
792794
}
793-
glbTracks++;
794-
}
795-
796-
if (glbTracks < minNchSel) {
797-
return;
795+
glbTracks += 1.0;
798796
}
799797

800798
bool skipEvent{false};
@@ -831,10 +829,15 @@ struct UccZdc {
831829
return;
832830
}
833831

834-
double nchMult{static_cast<double>(glbTracks)};
835-
std::vector<float> pTs;
836-
std::vector<float> vecFD;
837-
std::vector<float> vecEff;
832+
// Reject low-multiplcicity events
833+
if (glbTracks < minNchSel) {
834+
return;
835+
}
836+
837+
double nchMult{glbTracks};
838+
std::vector<double> pTs;
839+
std::vector<double> vecFD;
840+
std::vector<double> vecEff;
838841

839842
// apply corrections
840843
if (applyEff || applyFD) {
@@ -871,8 +874,14 @@ struct UccZdc {
871874
}
872875
}
873876

874-
if (applyEff && !correctNch)
875-
nchMult = static_cast<double>(glbTracks);
877+
if (applyEff && !correctNch) {
878+
nchMult = glbTracks;
879+
}
880+
881+
// Reject low-multiplcicity events
882+
if (nchMult < minNchSel) {
883+
return;
884+
}
876885

877886
// Fill vectors for [pT] measurement
878887
for (const auto& track : tracks) {
@@ -1432,7 +1441,6 @@ struct UccZdc {
14321441
const double threeParCorr{numThreeParCorr / denThreeParCorr};
14331442

14341443
hNchGen[replica]->Fill(nchMult);
1435-
14361444
pOneParCorrVsNchGen[replica]->Fill(nchMult, oneParCorr, w1);
14371445
pTwoParCorrVsNchGen[replica]->Fill(nchMult, twoParCorr, denTwoParCorr);
14381446
pThreeParCorrVsNchGen[replica]->Fill(nchMult, threeParCorr, denThreeParCorr);
@@ -1584,7 +1592,6 @@ struct UccZdc {
15841592
const double threeParCorr{numThreeParCorr / denThreeParCorr};
15851593

15861594
hNch[replica]->Fill(nchMult);
1587-
15881595
pOneParCorrVsNch[replica]->Fill(nchMult, oneParCorr, w1);
15891596
pTwoParCorrVsNch[replica]->Fill(nchMult, twoParCorr, denTwoParCorr);
15901597
pThreeParCorrVsNch[replica]->Fill(nchMult, threeParCorr, denThreeParCorr);
@@ -1740,7 +1747,8 @@ struct UccZdc {
17401747
const double numThreeParCorr{std::pow(p1, 3.) - 3. * p2 * p1 + 2. * p3};
17411748
const double threeParCorr{numThreeParCorr / denThreeParCorr};
17421749

1743-
hNch[replica]->Fill(nchMult);
1750+
hNchVsV0A[replica]->Fill(nchMult, normV0A);
1751+
hNchVsT0M[replica]->Fill(nchMult, normT0M);
17441752
pNchVsOneParCorrVsZN[replica]->Fill(nchMult, sumZNs, oneParCorr, w1);
17451753
pNchVsTwoParCorrVsZN[replica]->Fill(nchMult, sumZNs, twoParCorr, denTwoParCorr);
17461754
pNchVsThreeParCorrVsZN[replica]->Fill(nchMult, sumZNs, threeParCorr, denThreeParCorr);

0 commit comments

Comments
 (0)