Skip to content

Commit a5ebba1

Browse files
committed
fixedErrors
1 parent f1f2340 commit a5ebba1

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

PWGCF/EbyEFluctuations/Tasks/FactorialMomentsTask.cxx

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ struct FactorialMomentsTask {
135135
OutputObjHandlingPolicy::AnalysisObject,
136136
true};
137137
static const Int_t nBins = 52;
138-
constexpr double kMinCharge = 1e-6;
138+
double kMinCharge = 1e-6;
139139
static const Int_t nfqOrder = 6;
140140
Int_t countSamples = 0;
141141
Int_t testc1 = 0, testc2 = 0, testc3 = 0;
@@ -195,11 +195,11 @@ struct FactorialMomentsTask {
195195
for (Int_t iM = 0; iM < nBins; ++iM) {
196196
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()}}));
197197
mHistArrReset.push_back(mHistsR);
198-
for (Int_t iq = 0; iq nfqOrder; ++iq) {
198+
for (Int_t iq = 0; iq < nfqOrder; ++iq) {
199199
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);
200200
}
201201
}
202-
for (Int_t i = 0; i nfqOrder; ++i) {
202+
for (Int_t i = 0; i < nfqOrder; ++i) {
203203
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}}));
204204
mFqBinFinal.push_back(mHistFq);
205205
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}}));
@@ -255,7 +255,7 @@ struct FactorialMomentsTask {
255255
double binconVal = 0;
256256
binconVal = hist[iPt * nBins + iM]->GetBinContent(iEta, iPhi);
257257
binContent += binconVal;
258-
for (Int_t iq = 0; iq nfqOrder; ++iq) {
258+
for (Int_t iq = 0; iq < nfqOrder; ++iq) {
259259
Double_t fqBin = 0;
260260
if (binconVal >= iq + 2) {
261261
fqBin = TMath::Factorial(binconVal) / (TMath::Factorial(binconVal - (iq + 2)));
@@ -268,7 +268,7 @@ struct FactorialMomentsTask {
268268
}
269269
}
270270
binConEvent[iPt][iM] = binContent / (TMath::Power(binningM[iM], 2));
271-
for (Int_t iq = 0; iq nfqOrder; ++iq) {
271+
for (Int_t iq = 0; iq < nfqOrder; ++iq) {
272272
if (sumfqBin[iq] > 0) {
273273
fqEvent[iq][iPt][iM] = sumfqBin[iq] / (TMath::Power(binningM[iM], 2));
274274
fqEventSampled[iq][iPt][iM] += fqEvent[iq][iPt][iM];
@@ -321,13 +321,13 @@ struct FactorialMomentsTask {
321321
histos.fill(HIST("mCentFV0A"), coll.centFV0A());
322322
histos.fill(HIST("mCentFT0A"), coll.centFT0A());
323323
histos.fill(HIST("mCentFT0C"), coll.centFT0C());
324-
for (Int_t const& h : mHistArrReset) {
324+
for (auto const& h : mHistArrReset) {
325325
h->Reset();
326326
}
327327
countTracks = {0, 0, 0, 0, 0};
328328
fqEvent = {{{{{0, 0, 0, 0, 0, 0}}}}};
329329
binConEvent = {{{0, 0, 0, 0, 0}}};
330-
for (Int_t const& track : tracks) {
330+
for (auto const& track : tracks) {
331331
if (track.hasTPC())
332332
// if (track.hasITS())
333333
// if (track.isGlobalTrack())
@@ -386,15 +386,15 @@ struct FactorialMomentsTask {
386386
histos.fill(HIST("mVertexY"), coll.posY());
387387
histos.fill(HIST("mVertexZ"), coll.posZ());
388388
histos.fill(HIST("mCentFT0M"), coll.centRun2V0M());
389-
for (Int_t const& h : mHistArrReset) {
389+
for (auto const& h : mHistArrReset) {
390390
h->Reset();
391391
}
392392
countTracks = {0, 0, 0, 0, 0};
393393
fqEvent = {{{{{0, 0, 0, 0, 0, 0}}}}};
394394
binConEvent = {{{0, 0, 0, 0, 0}}};
395-
for (Int_t const& track : tracks) {
395+
for (auto const& track : tracks) {
396396
double recoCharge = (track.sign() != 0) ? track.sign() : 0.;
397-
if (std::abs(track.eta()) centralEta && track.isGlobalTrack() && std::abs(recoCharge) >= kMinCharge) {
397+
if (std::abs(track.eta()) < centralEta && track.isGlobalTrack() && std::abs(recoCharge) >= kMinCharge) {
398398
histos.fill(HIST("mCollID"), track.collisionId());
399399
histos.fill(HIST("mNFindableClsTPC"), track.tpcNClsFindable());
400400
histos.fill(HIST("mNClsTPC"), track.tpcNClsFound());
@@ -416,7 +416,7 @@ struct FactorialMomentsTask {
416416

417417
auto mccollision = coll.mcCollision_as<aod::McCollisions>();
418418
auto mcParts = mcParticles.sliceBy(perMcCollision, coll.mcCollision().globalIndex());
419-
for (Int_t const& mc : mcParts) {
419+
for (auto const& mc : mcParts) {
420420
int pdgCode = mc.pdgCode();
421421
auto pdgInfo = pdg->GetParticle(pdgCode);
422422
if (!pdgInfo) {
@@ -425,7 +425,7 @@ struct FactorialMomentsTask {
425425
double charge = pdgInfo->Charge();
426426
double physCharge = charge / 3.0;
427427
histos.fill(HIST("mChargeBefore"), physCharge);
428-
if (mc.isPhysicalPrimary() && std::abs(mc.eta()) centralEta && std::abs(physCharge) >= kMinCharge) {
428+
if (mc.isPhysicalPrimary() && std::abs(mc.eta()) < centralEta && std::abs(physCharge) >= kMinCharge) {
429429
histos.fill(HIST("mChargeAfter"), physCharge);
430430
histos.fill(HIST("mEta"), mc.eta());
431431
histos.fill(HIST("mPt"), mc.pt());
@@ -461,13 +461,13 @@ struct FactorialMomentsTask {
461461
histos.fill(HIST("mVertexZ"), coll.posZ());
462462
histos.fill(HIST("mCentFT0M"), coll.centRun2V0M());
463463

464-
for (Int_t const& h : mHistArrReset) {
464+
for (auto const& h : mHistArrReset) {
465465
h->Reset();
466466
}
467467
countTracks = {0, 0, 0, 0, 0};
468468
fqEvent = {{{{{0, 0, 0, 0, 0, 0}}}}};
469469
binConEvent = {{{0, 0, 0, 0, 0}}};
470-
for (Int_t const& track : tracks) {
470+
for (auto const& track : tracks) {
471471
if ((track.pt() < ptMin) || (!track.isGlobalTrack()) || (track.tpcNClsFindable() < minTPCCls)) {
472472
continue;
473473
}

0 commit comments

Comments
 (0)