Skip to content

Commit 1705da5

Browse files
committed
Removed weights when filling pt moments
1 parent 83c7188 commit 1705da5

File tree

1 file changed

+55
-62
lines changed

1 file changed

+55
-62
lines changed

PWGLF/Tasks/GlobalEventProperties/uccZdc.cxx

Lines changed: 55 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,8 @@ struct UccZdc {
254254
registry.add("ExcludedEvtVsNPV", Form(";%s;Entries;", tiNPV), kTH1F, {{nBinsITSTrack, 0, maxITSTrack}});
255255
registry.add("Nch", Form(";%s;Entries;", tiNch), kTH1F, {{nBinsNch, minNch, maxNch}});
256256
registry.add("NchVsOneParCorr", Form(";%s;%s;", tiNch, tiOneParCorr), kTProfile, {{nBinsNch, minNch, maxNch}});
257+
registry.add("NchVsTwoParCorr", Form(";%s;#LT[#it{p}_{T}^{(2)}]#GT;", tiNch), kTProfile, {{nBinsNch, minNch, maxNch}});
258+
registry.add("NchVsThreeParCorr", Form(";%s;#LT[#it{p}_{T}^{(3)}]#GT;", tiNch), kTProfile, {{nBinsNch, minNch, maxNch}});
257259

258260
auto hstat = registry.get<TH1>(HIST("hEventCounter"));
259261
auto* x = hstat->GetXaxis();
@@ -645,7 +647,7 @@ struct UccZdc {
645647
return;
646648
}
647649

648-
double meanpt{0.};
650+
double sumpt{0.};
649651
for (const auto& track : tracks) {
650652
// Track Selection
651653
if (!track.isGlobalTrack()) {
@@ -662,7 +664,7 @@ struct UccZdc {
662664
registry.fill(HIST("EtaVsPhi"), track.eta(), track.phi());
663665
registry.fill(HIST("sigma1Pt"), track.pt(), track.sigma1Pt());
664666
registry.fill(HIST("dcaXYvspT"), track.dcaXY(), track.pt());
665-
meanpt += track.pt();
667+
sumpt += track.pt();
666668
}
667669

668670
registry.fill(HIST("zPos"), collision.posZ());
@@ -693,7 +695,7 @@ struct UccZdc {
693695
registry.fill(HIST("ZNVsNch"), glbTracks, sumZNs);
694696
registry.fill(HIST("ZNDifVsNch"), glbTracks, znA - znC);
695697
if (glbTracks >= minNchSel)
696-
registry.fill(HIST("NchVsOneParCorr"), glbTracks, meanpt / glbTracks);
698+
registry.fill(HIST("NchVsOneParCorr"), glbTracks, sumpt / glbTracks);
697699
}
698700
PROCESS_SWITCH(UccZdc, processQA, "Process QA", true);
699701
void processZdcCollAss(o2::aod::ColEvSels::iterator const& collision, o2::aod::BCsRun3 const& /*bcs*/, aod::Zdcs const& /*zdcs*/, aod::FV0As const& /*fv0as*/, aod::FT0s const& /*ft0s*/, TheFilteredTracks const& tracks)
@@ -944,45 +946,41 @@ struct UccZdc {
944946
getPTpowers(pTs, vecEff, vecFD, p1, w1, p2, w2, p3, w3, p4, w4);
945947

946948
// EbE one-particle pT correlation
947-
double oneParCorr{p1 / w1};
949+
const double oneParCorr{p1 / w1};
948950

949951
// EbE two-particle pT correlation
950-
double denTwoParCorr{std::pow(w1, 2.) - w2};
951-
double numTwoParCorr{std::pow(p1, 2.) - p2};
952-
double twoParCorr{numTwoParCorr / denTwoParCorr};
952+
const double denTwoParCorr{std::pow(w1, 2.) - w2};
953+
const double numTwoParCorr{std::pow(p1, 2.) - p2};
954+
const double twoParCorr{numTwoParCorr / denTwoParCorr};
953955

954956
// EbE three-particle pT correlation
955-
double denThreeParCorr{std::pow(w1, 3.) - 3. * w2 * w1 + 2. * w3};
956-
double numThreeParCorr{std::pow(p1, 3.) - 3. * p2 * p1 + 2. * p3};
957-
double threeParCorr{numThreeParCorr / denThreeParCorr};
958-
959-
// EbE four-particle pT correlation
960-
// double denFourParCorr{std::pow(w1, 4.) - 6. * w2 * std::pow(w1, 2.) + 3. * std::pow(w2, 2.) + 8 * w3 * w1 - 6. * w4};
961-
// double numFourParCorr{std::pow(p1, 4.) - 6. * p2 * std::pow(p1, 2.) + 3. * std::pow(p2, 2.) + 8 * p3 * p1 - 6. * p4};
962-
// double fourParCorr{numFourParCorr / denFourParCorr};
957+
const double denThreeParCorr{std::pow(w1, 3.) - (3. * w2 * w1) + (2. * w3)};
958+
const double numThreeParCorr{std::pow(p1, 3.) - (3. * p2 * p1) + (2. * p3)};
959+
const double threeParCorr{numThreeParCorr / denThreeParCorr};
963960

964961
// One-dimensional distributions
965962
registry.fill(HIST("Nch"), nchMult);
966963
registry.fill(HIST("NchUncorrected"), glbTracks);
967-
968964
registry.fill(HIST("NchVsV0A"), nchMult, normV0A);
969965
registry.fill(HIST("NchVsT0M"), nchMult, normT0M);
970966
registry.fill(HIST("NchVsZN"), nchMult, sumZNs);
971967
registry.fill(HIST("NchVsZP"), nchMult, sumZPs);
972968

973-
registry.fill(HIST("NchVsOneParCorr"), nchMult, oneParCorr, w1);
969+
registry.fill(HIST("NchVsOneParCorr"), nchMult, oneParCorr);
970+
registry.fill(HIST("NchVsTwoParCorr"), nchMult, twoParCorr);
971+
registry.fill(HIST("NchVsThreeParCorr"), nchMult, threeParCorr);
974972

975-
registry.fill(HIST("NchVsOneParCorrVsZN"), nchMult, sumZNs, oneParCorr, w1);
976-
registry.fill(HIST("NchVsTwoParCorrVsZN"), nchMult, sumZNs, twoParCorr, denTwoParCorr);
977-
registry.fill(HIST("NchVsThreeParCorrVsZN"), nchMult, sumZNs, threeParCorr, denThreeParCorr);
973+
registry.fill(HIST("NchVsOneParCorrVsZN"), nchMult, sumZNs, oneParCorr);
974+
registry.fill(HIST("NchVsTwoParCorrVsZN"), nchMult, sumZNs, twoParCorr);
975+
registry.fill(HIST("NchVsThreeParCorrVsZN"), nchMult, sumZNs, threeParCorr);
978976

979-
registry.fill(HIST("NchVsOneParCorrVsT0M"), nchMult, normT0M, oneParCorr, w1);
980-
registry.fill(HIST("NchVsTwoParCorrVsT0M"), nchMult, normT0M, twoParCorr, denTwoParCorr);
981-
registry.fill(HIST("NchVsThreeParCorrVsT0M"), nchMult, normT0M, threeParCorr, denThreeParCorr);
977+
registry.fill(HIST("NchVsOneParCorrVsT0M"), nchMult, normT0M, oneParCorr);
978+
registry.fill(HIST("NchVsTwoParCorrVsT0M"), nchMult, normT0M, twoParCorr);
979+
registry.fill(HIST("NchVsThreeParCorrVsT0M"), nchMult, normT0M, threeParCorr);
982980

983-
registry.fill(HIST("NchVsOneParCorrVsV0A"), nchMult, normV0A, oneParCorr, w1);
984-
registry.fill(HIST("NchVsTwoParCorrVsV0A"), nchMult, normV0A, twoParCorr, denTwoParCorr);
985-
registry.fill(HIST("NchVsThreeParCorrVsV0A"), nchMult, normV0A, threeParCorr, denThreeParCorr);
981+
registry.fill(HIST("NchVsOneParCorrVsV0A"), nchMult, normV0A, oneParCorr);
982+
registry.fill(HIST("NchVsTwoParCorrVsV0A"), nchMult, normV0A, twoParCorr);
983+
registry.fill(HIST("NchVsThreeParCorrVsV0A"), nchMult, normV0A, threeParCorr);
986984

987985
const uint64_t timeStamp{foundBC.timestamp()};
988986
eventSampling(tracks, normV0A, normT0M, sumZNs, timeStamp);
@@ -1146,20 +1144,18 @@ struct UccZdc {
11461144

11471145
const double denTwoParCorr{std::pow(w1, 2.) - w2};
11481146
const double numTwoParCorr{std::pow(p1, 2.) - p2};
1149-
const double denThreeParCorr{std::pow(w1, 3.) - 3. * w2 * w1 + 2. * w3};
1150-
const double numThreeParCorr{std::pow(p1, 3.) - 3. * p2 * p1 + 2. * p3};
1151-
// const double denFourParCorr{std::pow(w1, 4.) - 6. * w2 * std::pow(w1, 2.) + 3. * std::pow(w2, 2.) + 8 * w3 * w1 - 6. * w4};
1152-
// const double numFourParCorr{std::pow(p1, 4.) - 6. * p2 * std::pow(p1, 2.) + 3. * std::pow(p2, 2.) + 8 * p3 * p1 - 6. * p4};
1147+
const double denThreeParCorr{std::pow(w1, 3.) - (3. * w2 * w1) + (2. * w3)};
1148+
const double numThreeParCorr{std::pow(p1, 3.) - (3. * p2 * p1) + (2. * p3)};
11531149

11541150
const double oneParCorr{p1 / w1};
11551151
const double twoParCorr{numTwoParCorr / denTwoParCorr};
11561152
const double threeParCorr{numThreeParCorr / denThreeParCorr};
11571153

11581154
registry.fill(HIST("Nch"), nchMult);
11591155
registry.fill(HIST("NchUncorrected"), nchRaw);
1160-
registry.fill(HIST("NchVsOneParCorr"), nchMult, oneParCorr, w1);
1161-
registry.fill(HIST("NchVsTwoParCorr"), nchMult, twoParCorr, denTwoParCorr);
1162-
registry.fill(HIST("NchVsThreeParCorr"), nchMult, threeParCorr, denThreeParCorr);
1156+
registry.fill(HIST("NchVsOneParCorr"), nchMult, oneParCorr);
1157+
registry.fill(HIST("NchVsTwoParCorr"), nchMult, twoParCorr);
1158+
registry.fill(HIST("NchVsThreeParCorr"), nchMult, threeParCorr);
11631159

11641160
//--------------------------- Generated MC ---------------------------
11651161
std::vector<float> pTsMC;
@@ -1211,20 +1207,17 @@ struct UccZdc {
12111207

12121208
const double denTwoParCorrMC{std::pow(w1MC, 2.) - w2MC};
12131209
const double numTwoParCorrMC{std::pow(p1MC, 2.) - p2MC};
1214-
const double denThreeParCorrMC{std::pow(w1MC, 3.) - 3. * w2MC * w1MC + 2. * w3MC};
1215-
const double numThreeParCorrMC{std::pow(p1MC, 3.) - 3. * p2MC * p1MC + 2. * p3MC};
1216-
// const double denFourParCorrMC{std::pow(w1MC, 4.) - 6. * w2MC * std::pow(w1MC, 2.) + 3. * std::pow(w2MC, 2.) + 8 * w3MC * w1MC - 6. * w4MC};
1217-
// const double numFourParCorrMC{std::pow(p1MC, 4.) - 6. * p2MC * std::pow(p1MC, 2.) + 3. * std::pow(p2MC, 2.) + 8 * p3MC * p1MC - 6. * p4MC};
1210+
const double denThreeParCorrMC{std::pow(w1MC, 3.) - (3. * w2MC * w1MC) + (2. * w3MC)};
1211+
const double numThreeParCorrMC{std::pow(p1MC, 3.) - (3. * p2MC * p1MC) + (2. * p3MC)};
12181212

12191213
const double oneParCorrMC{p1MC / w1MC};
12201214
const double twoParCorrMC{numTwoParCorrMC / denTwoParCorrMC};
12211215
const double threeParCorrMC{numThreeParCorrMC / denThreeParCorrMC};
1222-
// const double fourParCorrMC{numFourParCorrMC / denFourParCorrMC};
12231216

12241217
registry.fill(HIST("NchGen"), nchMC);
1225-
registry.fill(HIST("NchvsOneParCorrGen"), nchMC, oneParCorrMC, w1MC);
1226-
registry.fill(HIST("NchvsTwoParCorrGen"), nchMC, twoParCorrMC, denTwoParCorrMC);
1227-
registry.fill(HIST("NchvsThreeParCorrGen"), nchMC, threeParCorrMC, denThreeParCorrMC);
1218+
registry.fill(HIST("NchvsOneParCorrGen"), nchMC, oneParCorrMC);
1219+
registry.fill(HIST("NchvsTwoParCorrGen"), nchMC, twoParCorrMC);
1220+
registry.fill(HIST("NchvsThreeParCorrGen"), nchMC, threeParCorrMC);
12281221

12291222
//------------------ Poisson sampling
12301223
eventSamplingMC(mcParticles, timeStamp);
@@ -1441,14 +1434,14 @@ struct UccZdc {
14411434
const double twoParCorr{numTwoParCorr / denTwoParCorr};
14421435

14431436
// EbE three-particle pT correlation
1444-
const double denThreeParCorr{std::pow(w1, 3.) - 3. * w2 * w1 + 2. * w3};
1445-
const double numThreeParCorr{std::pow(p1, 3.) - 3. * p2 * p1 + 2. * p3};
1437+
const double denThreeParCorr{std::pow(w1, 3.) - (3. * w2 * w1) + (2. * w3)};
1438+
const double numThreeParCorr{std::pow(p1, 3.) - (3. * p2 * p1) + (2. * p3)};
14461439
const double threeParCorr{numThreeParCorr / denThreeParCorr};
14471440

14481441
hNchGen[replica]->Fill(nchMult);
1449-
pOneParCorrVsNchGen[replica]->Fill(nchMult, oneParCorr, w1);
1450-
pTwoParCorrVsNchGen[replica]->Fill(nchMult, twoParCorr, denTwoParCorr);
1451-
pThreeParCorrVsNchGen[replica]->Fill(nchMult, threeParCorr, denThreeParCorr);
1442+
pOneParCorrVsNchGen[replica]->Fill(nchMult, oneParCorr);
1443+
pTwoParCorrVsNchGen[replica]->Fill(nchMult, twoParCorr);
1444+
pThreeParCorrVsNchGen[replica]->Fill(nchMult, threeParCorr);
14521445
} // event per replica
14531446
} // replica's loop
14541447
}
@@ -1584,14 +1577,14 @@ struct UccZdc {
15841577
const double twoParCorr{numTwoParCorr / denTwoParCorr};
15851578

15861579
// EbE three-particle pT correlation
1587-
const double denThreeParCorr{std::pow(w1, 3.) - 3. * w2 * w1 + 2. * w3};
1588-
const double numThreeParCorr{std::pow(p1, 3.) - 3. * p2 * p1 + 2. * p3};
1580+
const double denThreeParCorr{std::pow(w1, 3.) - (3. * w2 * w1) + (2. * w3)};
1581+
const double numThreeParCorr{std::pow(p1, 3.) - (3. * p2 * p1) + (2. * p3)};
15891582
const double threeParCorr{numThreeParCorr / denThreeParCorr};
15901583

15911584
hNch[replica]->Fill(nchMult);
1592-
pOneParCorrVsNch[replica]->Fill(nchMult, oneParCorr, w1);
1593-
pTwoParCorrVsNch[replica]->Fill(nchMult, twoParCorr, denTwoParCorr);
1594-
pThreeParCorrVsNch[replica]->Fill(nchMult, threeParCorr, denThreeParCorr);
1585+
pOneParCorrVsNch[replica]->Fill(nchMult, oneParCorr);
1586+
pTwoParCorrVsNch[replica]->Fill(nchMult, twoParCorr);
1587+
pThreeParCorrVsNch[replica]->Fill(nchMult, threeParCorr);
15951588
} // event per replica
15961589
} // replica's loop
15971590
}
@@ -1732,25 +1725,25 @@ struct UccZdc {
17321725
const double twoParCorr{numTwoParCorr / denTwoParCorr};
17331726

17341727
// EbE three-particle pT correlation
1735-
const double denThreeParCorr{std::pow(w1, 3.) - 3. * w2 * w1 + 2. * w3};
1736-
const double numThreeParCorr{std::pow(p1, 3.) - 3. * p2 * p1 + 2. * p3};
1728+
const double denThreeParCorr{std::pow(w1, 3.) - (3. * w2 * w1) + (2. * w3)};
1729+
const double numThreeParCorr{std::pow(p1, 3.) - (3. * p2 * p1) + (2. * p3)};
17371730
const double threeParCorr{numThreeParCorr / denThreeParCorr};
17381731

17391732
hNchVsZN[replica]->Fill(nchMult, sumZNs);
17401733
hNchVsV0A[replica]->Fill(nchMult, normV0A);
17411734
hNchVsT0M[replica]->Fill(nchMult, normT0M);
17421735

1743-
pNchVsOneParCorrVsZN[replica]->Fill(nchMult, sumZNs, oneParCorr, w1);
1744-
pNchVsTwoParCorrVsZN[replica]->Fill(nchMult, sumZNs, twoParCorr, denTwoParCorr);
1745-
pNchVsThreeParCorrVsZN[replica]->Fill(nchMult, sumZNs, threeParCorr, denThreeParCorr);
1736+
pNchVsOneParCorrVsZN[replica]->Fill(nchMult, sumZNs, oneParCorr);
1737+
pNchVsTwoParCorrVsZN[replica]->Fill(nchMult, sumZNs, twoParCorr);
1738+
pNchVsThreeParCorrVsZN[replica]->Fill(nchMult, sumZNs, threeParCorr);
17461739

1747-
pNchVsOneParCorrVsT0M[replica]->Fill(nchMult, normT0M, oneParCorr, w1);
1748-
pNchVsTwoParCorrVsT0M[replica]->Fill(nchMult, normT0M, twoParCorr, denTwoParCorr);
1749-
pNchVsThreeParCorrVsT0M[replica]->Fill(nchMult, normT0M, threeParCorr, denThreeParCorr);
1740+
pNchVsOneParCorrVsT0M[replica]->Fill(nchMult, normT0M, oneParCorr);
1741+
pNchVsTwoParCorrVsT0M[replica]->Fill(nchMult, normT0M, twoParCorr);
1742+
pNchVsThreeParCorrVsT0M[replica]->Fill(nchMult, normT0M, threeParCorr);
17501743

1751-
pNchVsOneParCorrVsV0A[replica]->Fill(nchMult, normV0A, oneParCorr, w1);
1752-
pNchVsTwoParCorrVsV0A[replica]->Fill(nchMult, normV0A, twoParCorr, denTwoParCorr);
1753-
pNchVsThreeParCorrVsV0A[replica]->Fill(nchMult, normV0A, threeParCorr, denThreeParCorr);
1744+
pNchVsOneParCorrVsV0A[replica]->Fill(nchMult, normV0A, oneParCorr);
1745+
pNchVsTwoParCorrVsV0A[replica]->Fill(nchMult, normV0A, twoParCorr);
1746+
pNchVsThreeParCorrVsV0A[replica]->Fill(nchMult, normV0A, threeParCorr);
17541747
} // event per replica
17551748
} // replica's loop
17561749
}

0 commit comments

Comments
 (0)