Skip to content

Commit 0b328c0

Browse files
committed
fixedlinters
1 parent d433949 commit 0b328c0

File tree

1 file changed

+18
-19
lines changed

1 file changed

+18
-19
lines changed

PWGCF/EbyEFluctuations/Tasks/FactorialMomentsTask.cxx

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515
#include "TRandom.h"
1616
#include <TH1F.h>
1717

18-
#include <array>
19-
#include <iostream>
2018
// O2 includes
2119
#include "Common/Core/RecoDecay.h"
2220
#include "Common/Core/TrackSelection.h"
@@ -71,10 +69,10 @@ struct FactorialMoments {
7169
HistogramRegistry histos1{
7270
"histos1",
7371
{
74-
{"hRecoPtBefore", "Reco pT before cuts;p_{T} (GeV/c);Counts", {HistType::kTH1F, {{1000, 0.0, 20.0}}}},
75-
{"hGenPtBefore", "Gen pT before cuts;p_{T} (GeV/c);Counts", {HistType::kTH1F, {{1000, 0.0, 20.0}}}},
76-
{"hRecoPtAfter", "Reco pT after cuts;p_{T} (GeV/c);Counts", {HistType::kTH1F, {{1000, 0.0, 20.0}}}},
77-
{"hGenPtAfter", "Gen pT after cuts;p_{T} (GeV/c);Counts", {HistType::kTH1F, {{1000, 0.0, 20.0}}}},
72+
{"hRecoPtBefore", "Reco pT before cuts;pt (GeV/c);Counts", {HistType::kTH1F, {{1000, 0.0, 20.0}}}},
73+
{"hGenPtBefore", "Gen pT before cuts;pt (GeV/c);Counts", {HistType::kTH1F, {{1000, 0.0, 20.0}}}},
74+
{"hRecoPtAfter", "Reco pT after cuts;pt (GeV/c);Counts", {HistType::kTH1F, {{1000, 0.0, 20.0}}}},
75+
{"hGenPtAfter", "Gen pT after cuts;pt (GeV/c);Counts", {HistType::kTH1F, {{1000, 0.0, 20.0}}}},
7876
{"hRecoEtaBefore", "Reco #eta before cuts;#eta;Counts", {HistType::kTH1F, {{200, -2.0, 2.0}}}},
7977
{"mCentMCImpactFull", "Impact Parameter (MC All Events);Impact Parameter b [fm];Counts", {HistType::kTH1F, {{200, 0.0, 50.0}}}},
8078
{"mCentMCImpact005", "Impact Parameter (MC 0–5%);Impact Parameter b [fm];Counts", {HistType::kTH1F, {{200, 0.0, 20.0}}}},
@@ -87,13 +85,13 @@ struct FactorialMoments {
8785
{"hGenCharge", "Gen particle charge;Charge;Counts", {HistType::kTH1F, {{13, -6.5, 6.5}}}},
8886
{"hGenPhiAfter", "Gen #phi after cuts;#phi;Counts", {HistType::kTH1F, {{100, 0, 6.3}}}},
8987
{"mChargeDist", "MC particle charge;Charge;Counts", {HistType::kTH1F, {{9, -4.5, 4.5}}}},
90-
{"mDiffPhi", "Δ#phi between selected MC particles;Δ#phi;Counts", {HistType::kTH1F, {{2000, -0.01, 0.01}}}},
88+
{"mDiffPhi", "dphi between selected MC particles;dphi;Counts", {HistType::kTH1F, {{2000, -0.01, 0.01}}}},
9189
{"mPrimariesPerEvent", "Primary MC particles per event;N_{primaries};Counts", {HistType::kTH1I, {{20000, 0, 20000}}}},
92-
{"mDiffPt", "Δp_{T} between selected MC particles;Δp_{T} (GeV/c);Counts", {HistType::kTH1F, {{2000, -0.01, 0.01}}}},
93-
{"mDiffEta", "Δ#eta between selected MC particles;Δ#eta;Counts", {HistType::kTH1F, {{2000, -0.01, 0.01}}}},
94-
{"mADiffPhi", "Δ#phi between selected MC particles;Δ#phi;Counts", {HistType::kTH1F, {{2000, -0.01, 0.01}}}},
95-
{"mADiffPt", "Δp_{T} between selected MC particles;Δp_{T} (GeV/c);Counts", {HistType::kTH1F, {{2000, -0.01, 0.01}}}},
96-
{"mADiffEta", "Δ#eta between selected MC particles;Δ#eta;Counts", {HistType::kTH1F, {{2000, -0.01, 0.01}}}},
90+
{"mDiffPt", "dpt between selected MC particles;dpt (GeV/c);Counts", {HistType::kTH1F, {{2000, -0.01, 0.01}}}},
91+
{"mDiffEta", "deta between selected MC particles;deta;Counts", {HistType::kTH1F, {{2000, -0.01, 0.01}}}},
92+
{"mADiffPhi", "dphi between selected MC particles;dphi;Counts", {HistType::kTH1F, {{2000, -0.01, 0.01}}}},
93+
{"mADiffPt", "dpt between selected MC particles;dpt (GeV/c);Counts", {HistType::kTH1F, {{2000, -0.01, 0.01}}}},
94+
{"mADiffEta", "deta between selected MC particles;deta;Counts", {HistType::kTH1F, {{2000, -0.01, 0.01}}}},
9795
},
9896
};
9997

@@ -136,6 +134,7 @@ struct FactorialMoments {
136134
OutputObjHandlingPolicy::AnalysisObject,
137135
true};
138136
static const Int_t nBins = 52;
137+
static const Int_t nfqOrder = 6;
139138
Int_t countSamples = 0;
140139
Int_t testc1 = 0, testc2 = 0, testc3 = 0;
141140
std::array<Int_t, nBins> binningM;
@@ -194,11 +193,11 @@ struct FactorialMoments {
194193
for (Int_t iM = 0; iM < nBins; ++iM) {
195194
auto mHistsR = std::get<std::shared_ptr<TH2>>(histos.add(Form("bin%i/Reset/mEtaPhi%i", iPt + 1, iM), Form("#eta#phi_%i for bin %.2f-%.2f;#eta;#phi", iM, ptCuts.value[2 * iPt], ptCuts.value[2 * iPt + 1]), HistType::kTH2F, {{binningM[iM], -0.8, 0.8}, {binningM[iM], 0, 2 * TMath::Pi()}}));
196195
mHistArrReset.push_back(mHistsR);
197-
for (Int_t iq = 0; iq < 6; ++iq) {
196+
for (Int_t iq = 0; iq nfqOrder; ++iq) {
198197
tmpFqErr[iq][iPt][iM] = new TH1D(Form("tmpFqErr%i%i%i", iq, iPt, iM), Form("tmpFqErr%i%i%i", iq, iPt, iM), 100, 0, 10);
199198
}
200199
}
201-
for (Int_t i = 0; i < 6; ++i) {
200+
for (Int_t i = 0; i nfqOrder; ++i) {
202201
auto mHistFq = std::get<std::shared_ptr<TH1>>(histos.add(Form("mFinalFq%i_bin%i", i + 2, iPt + 1), Form("Final F_%i for bin %.2f-%.2f;M", i + 2, ptCuts.value[2 * iPt], ptCuts.value[2 * iPt + 1]), HistType::kTH1F, {{nBins, -0.5, nBins - 0.5}}));
203202
mFqBinFinal.push_back(mHistFq);
204203
auto mHistAv = std::get<std::shared_ptr<TH1>>(histos.add(Form("mFinalAvBin%i_bin%i", i + 2, iPt + 1), Form("Final AvBin_%i for bin %.2f-%.2f;M", i + 2, ptCuts.value[2 * iPt], ptCuts.value[2 * iPt + 1]), HistType::kTH1F, {{nBins, -0.5, nBins - 0.5}}));
@@ -254,7 +253,7 @@ struct FactorialMoments {
254253
double binconVal = 0;
255254
binconVal = hist[iPt * nBins + iM]->GetBinContent(iEta, iPhi);
256255
binContent += binconVal;
257-
for (Int_t iq = 0; iq < 6; ++iq) {
256+
for (Int_t iq = 0; iq nfqOrder; ++iq) {
258257
Double_t fqBin = 0;
259258
if (binconVal >= iq + 2) {
260259
fqBin = TMath::Factorial(binconVal) / (TMath::Factorial(binconVal - (iq + 2)));
@@ -267,7 +266,7 @@ struct FactorialMoments {
267266
}
268267
}
269268
binConEvent[iPt][iM] = binContent / (TMath::Power(binningM[iM], 2));
270-
for (Int_t iq = 0; iq < 6; ++iq) {
269+
for (Int_t iq = 0; iq nfqOrder; ++iq) {
271270
if (sumfqBin[iq] > 0) {
272271
fqEvent[iq][iPt][iM] = sumfqBin[iq] / (TMath::Power(binningM[iM], 2));
273272
fqEventSampled[iq][iPt][iM] += fqEvent[iq][iPt][iM];
@@ -278,7 +277,7 @@ struct FactorialMoments {
278277
if (compSample) {
279278
mBinConFinalSampled[iPt * 6 + iq]->Fill(iM, binConEventSampled[iq][iPt][iM] / samplesize);
280279

281-
double tmp = (fqEventSampled[iq][iPt][iM] / (samplesize)) / (pow(binConEventSampled[iq][iPt][iM] / (samplesize), (iq + 2)));
280+
double tmp = (fqEventSampled[iq][iPt][iM] / (samplesize)) / (TMath::Power(binConEventSampled[iq][iPt][iM] / (samplesize), (iq + 2)));
282281
mFqBinFinalSampled[iPt * 6 + iq]->Fill(iM, tmp);
283282
tmpFqErr[iq][iPt][iM]->Fill(tmp);
284283
errorFq[iq][iPt][iM] += TMath::Power(fqEventSampled[iq][iPt][iM] / (samplesize), 2);
@@ -393,7 +392,7 @@ struct FactorialMoments {
393392
binConEvent = {{{0, 0, 0, 0, 0}}};
394393
for (Int_t const& track : tracks) {
395394
double recoCharge = (track.sign() != 0) ? track.sign() : 0.;
396-
if (std::abs(track.eta()) < 0.8 && track.isGlobalTrack() && std::abs(recoCharge) >= 1e-6) {
395+
if (std::abs(track.eta()) centralEta && track.isGlobalTrack() && std::abs(recoCharge) >= 1e-6) {
397396
histos.fill(HIST("mCollID"), track.collisionId());
398397
histos.fill(HIST("mNFindableClsTPC"), track.tpcNClsFindable());
399398
histos.fill(HIST("mNClsTPC"), track.tpcNClsFound());
@@ -424,7 +423,7 @@ struct FactorialMoments {
424423
double charge = pdgInfo->Charge();
425424
double physCharge = charge / 3.0;
426425
histos.fill(HIST("mChargeBefore"), physCharge);
427-
if (mc.isPhysicalPrimary() && std::abs(mc.eta()) < 0.8 && std::abs(physCharge) >= 1e-6) {
426+
if (mc.isPhysicalPrimary() && std::abs(mc.eta()) centralEta && std::abs(physCharge) >= 1e-6) {
428427
histos.fill(HIST("mChargeAfter"), physCharge);
429428
histos.fill(HIST("mEta"), mc.eta());
430429
histos.fill(HIST("mPt"), mc.pt());

0 commit comments

Comments
 (0)