Skip to content

Commit 648f3f3

Browse files
author
Yuanjun Mei
committed
Fix errors
1 parent 4bb7216 commit 648f3f3

1 file changed

Lines changed: 18 additions & 25 deletions

File tree

‎PWGCF/MultiparticleCorrelations/Tasks/multiparticleCorrelationsMei.cxx‎

Lines changed: 18 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -777,9 +777,6 @@ struct MultiparticleCorrelationsMei // this name is used in lower-case format to
777777
if (particlePDG) {
778778
const int chargeMCUnit = 3;
779779
auto chargeMC = particlePDG->Charge() / chargeMCUnit;
780-
if (tc.fRunMessageSwitch && chargeMC == 2) {
781-
LOGF(info, "ParticlePID with charge 2 is %d", thisMCParticle.pdgCode());
782-
}
783780
if (chargeMC != 1 && chargeMC != -1) {
784781
return false;
785782
}
@@ -880,7 +877,7 @@ struct MultiparticleCorrelationsMei // this name is used in lower-case format to
880877
bool isFirstCollision = true; // this is used to ensure that weights hist are booked once and only once, otherwise, a crash
881878
int collisionCounter = 0;
882879
int thisRunNumber = 0;
883-
static constexpr int runMessagePeriod = 100;
880+
static constexpr int RunMessagePeriod = 100;
884881

885882
// *) Define all member functions to be called in the main process* functions:
886883
template <ERecSim rs, typename T1, typename T2>
@@ -901,7 +898,7 @@ struct MultiparticleCorrelationsMei // this name is used in lower-case format to
901898
}
902899

903900
if (tc.fRunMessageSwitch) {
904-
if (collisionCounter % runMessagePeriod == 0) {
901+
if (collisionCounter % RunMessagePeriod == 0) {
905902
LOGF(info, "Successfully running, run number is %d", thisRunNumber);
906903
collisionCounter = 0;
907904
}
@@ -926,13 +923,9 @@ struct MultiparticleCorrelationsMei // this name is used in lower-case format to
926923
if (tc.fMasterCutSwitch) {
927924
if (passEventCutsReal && passTechnicalCut) {
928925
eventHistFill<rs, eReal, eAfter>(collision, tracks);
929-
if (tc.fQualityAssuranceSwitch) {
930-
qaFill<rs, eReal, eAfter>(collision);
931-
}
932-
}
933-
if (passEventCutsReal && passTechnicalCut) {
934926
eventHistFill<rs, eMC, eAfter>(collision, tracks);
935927
if (tc.fQualityAssuranceSwitch) {
928+
qaFill<rs, eReal, eAfter>(collision);
936929
qaFill<rs, eMC, eAfter>(collision);
937930
}
938931
}
@@ -1096,9 +1089,9 @@ struct MultiparticleCorrelationsMei // this name is used in lower-case format to
10961089
const float minEta = lEtaBins[1];
10971090
const float maxEta = lEtaBins[2];
10981091

1099-
constexpr int nBinsCharge = 5;
1100-
constexpr float minCharge = -2.5;
1101-
constexpr float maxCharge = 2.5;
1092+
constexpr int NBinsCharge = 5;
1093+
constexpr float MinCharge = -2.5;
1094+
constexpr float MaxCharge = 2.5;
11021095

11031096
if (doprocessRec || doprocessRecSim) {
11041097
pc.fParticleHist[eHistPt][eRec][eBefore] = new TH1F("[eHistPt][eRec][eBefore]", "p_{T} distribution for reconstructed particles before cuts", nBinsPt, minPt, maxPt);
@@ -1110,7 +1103,7 @@ struct MultiparticleCorrelationsMei // this name is used in lower-case format to
11101103
pc.fParticleHist[eHistEta][eRec][eBefore] = new TH1F("[eHistEta][eRec][eBefore]", "#eta distribution for reconstructed particles before cuts", nBinsEta, minEta, maxEta);
11111104
pc.fParticleHist[eHistEta][eRec][eBefore]->GetXaxis()->SetTitle("#eta");
11121105

1113-
pc.fParticleHist[eHistCharge][eRec][eBefore] = new TH1F("[eHistCharge][eRec][eBefore]", "charge distribution for reconstructed particles before cuts", nBinsCharge, minCharge, maxCharge);
1106+
pc.fParticleHist[eHistCharge][eRec][eBefore] = new TH1F("[eHistCharge][eRec][eBefore]", "charge distribution for reconstructed particles before cuts", NBinsCharge, MinCharge, MaxCharge);
11141107
pc.fParticleHist[eHistCharge][eRec][eBefore]->GetXaxis()->SetTitle("Particle charge");
11151108

11161109
for (int i = 0; i < eParticleHistograms_N; ++i) {
@@ -1128,7 +1121,7 @@ struct MultiparticleCorrelationsMei // this name is used in lower-case format to
11281121
pc.fParticleHist[eHistEta][eRec][eAfter] = new TH1F("[eHistEta][eRec][eAfter]", "#eta distribution for reconstructed particles after cuts", nBinsEta, minEta, maxEta);
11291122
pc.fParticleHist[eHistEta][eRec][eAfter]->GetXaxis()->SetTitle("#eta");
11301123

1131-
pc.fParticleHist[eHistCharge][eRec][eAfter] = new TH1F("[eHistCharge][eRec][eAfter]", "charge distribution for reconstructed particles after cuts", nBinsCharge, minCharge, maxCharge);
1124+
pc.fParticleHist[eHistCharge][eRec][eAfter] = new TH1F("[eHistCharge][eRec][eAfter]", "charge distribution for reconstructed particles after cuts", NBinsCharge, MinCharge, MaxCharge);
11321125
pc.fParticleHist[eHistCharge][eRec][eAfter]->GetXaxis()->SetTitle("Particle charge");
11331126

11341127
for (int i = 0; i < eParticleHistograms_N; ++i) {
@@ -1148,7 +1141,7 @@ struct MultiparticleCorrelationsMei // this name is used in lower-case format to
11481141
pc.fParticleHist[eHistEta][eSim][eBefore] = new TH1F("[eHistEta][eSim][eBefore]", "#eta distribution for simulated particles before cuts", nBinsEta, minEta, maxEta);
11491142
pc.fParticleHist[eHistEta][eSim][eBefore]->GetXaxis()->SetTitle("#eta");
11501143

1151-
pc.fParticleHist[eHistCharge][eSim][eBefore] = new TH1F("[eHistCharge][eSim][eBefore]", "charge distribution for simulated particles before cuts", nBinsCharge, minCharge, maxCharge);
1144+
pc.fParticleHist[eHistCharge][eSim][eBefore] = new TH1F("[eHistCharge][eSim][eBefore]", "charge distribution for simulated particles before cuts", NBinsCharge, MinCharge, MaxCharge);
11521145
pc.fParticleHist[eHistCharge][eSim][eBefore]->GetXaxis()->SetTitle("Particle charge");
11531146

11541147
for (int i = 0; i < eParticleHistograms_N; ++i) {
@@ -1166,7 +1159,7 @@ struct MultiparticleCorrelationsMei // this name is used in lower-case format to
11661159
pc.fParticleHist[eHistEta][eSim][eAfter] = new TH1F("[eHistEta][eSim][eAfter]", "#eta distribution for simulated particles after cuts", nBinsEta, minEta, maxEta);
11671160
pc.fParticleHist[eHistEta][eSim][eAfter]->GetXaxis()->SetTitle("#eta");
11681161

1169-
pc.fParticleHist[eHistCharge][eSim][eAfter] = new TH1F("[eHistCharge][eSim][eAfter]", "charge distribution for simulated particles after cuts", nBinsCharge, minCharge, maxCharge);
1162+
pc.fParticleHist[eHistCharge][eSim][eAfter] = new TH1F("[eHistCharge][eSim][eAfter]", "charge distribution for simulated particles after cuts", NBinsCharge, MinCharge, MaxCharge);
11701163
pc.fParticleHist[eHistCharge][eSim][eAfter]->GetXaxis()->SetTitle("Particle charge");
11711164

11721165
for (int i = 0; i < eParticleHistograms_N; ++i) {
@@ -1182,8 +1175,8 @@ struct MultiparticleCorrelationsMei // this name is used in lower-case format to
11821175
ec.fEventHistList->SetOwner(true);
11831176
fBaseList->Add(ec.fEventHistList);
11841177

1185-
constexpr std::array<float, 12> defaultCentBoundaries = {0.f, 5.f, 10.f, 20.f, 30.f, 40.f, 50.f, 60.f, 70.f, 80.f, 90.f, 100.f};
1186-
constexpr int nDefaultCentBins = defaultCentBoundaries.size() - 1;
1178+
constexpr std::array<float, 12> DefaultCentBoundaries = {0.f, 5.f, 10.f, 20.f, 30.f, 40.f, 50.f, 60.f, 70.f, 80.f, 90.f, 100.f};
1179+
constexpr int NDefaultCentBins = DefaultCentBoundaries.size() - 1;
11871180

11881181
std::vector<float> lCent = cfCentBins.value;
11891182
const int nBinsCent = static_cast<int>(lCent[0]);
@@ -1222,7 +1215,7 @@ struct MultiparticleCorrelationsMei // this name is used in lower-case format to
12221215

12231216
if (doprocessRec || doprocessRecSim) {
12241217
if (tc.fALICECentBinSwitch) {
1225-
ec.fEventHist[eHistCentrality][eRec][eBefore] = new TH1F("[eHistCentrality][eRec][eBefore]", "Centrality (reconstructed) before cuts", nDefaultCentBins, defaultCentBoundaries.data());
1218+
ec.fEventHist[eHistCentrality][eRec][eBefore] = new TH1F("[eHistCentrality][eRec][eBefore]", "Centrality (reconstructed) before cuts", NDefaultCentBins, DefaultCentBoundaries.data());
12261219
} else {
12271220
ec.fEventHist[eHistCentrality][eRec][eBefore] = new TH1F("[eHistCentrality][eRec][eBefore]", "Centrality (reconstructed) before cuts", nBinsCent, minCent, maxCent);
12281221
}
@@ -1252,7 +1245,7 @@ struct MultiparticleCorrelationsMei // this name is used in lower-case format to
12521245

12531246
if (tc.fMasterCutSwitch) {
12541247
if (tc.fALICECentBinSwitch) {
1255-
ec.fEventHist[eHistCentrality][eRec][eAfter] = new TH1F("[eHistCentrality][eRec][eAfter]", "Centrality (reconstructed) after cuts", nDefaultCentBins, defaultCentBoundaries.data());
1248+
ec.fEventHist[eHistCentrality][eRec][eAfter] = new TH1F("[eHistCentrality][eRec][eAfter]", "Centrality (reconstructed) after cuts", NDefaultCentBins, DefaultCentBoundaries.data());
12561249
} else {
12571250
ec.fEventHist[eHistCentrality][eRec][eAfter] = new TH1F("[eHistCentrality][eRec][eAfter]", "Centrality (reconstructed) after cuts", nBinsCent, minCent, maxCent);
12581251
}
@@ -1284,7 +1277,7 @@ struct MultiparticleCorrelationsMei // this name is used in lower-case format to
12841277

12851278
if (doprocessSim || doprocessRecSim) {
12861279
if (tc.fALICECentBinSwitch) {
1287-
ec.fEventHist[eHistCentrality][eSim][eBefore] = new TH1F("[eHistCentrality][eSim][eBefore]", "Centrality (simulated) before cuts", nDefaultCentBins, defaultCentBoundaries.data());
1280+
ec.fEventHist[eHistCentrality][eSim][eBefore] = new TH1F("[eHistCentrality][eSim][eBefore]", "Centrality (simulated) before cuts", NDefaultCentBins, DefaultCentBoundaries.data());
12881281
} else {
12891282
ec.fEventHist[eHistCentrality][eSim][eBefore] = new TH1F("[eHistCentrality][eSim][eBefore]", "Centrality (simulated) before cuts", nBinsCent, minCent, maxCent);
12901283
}
@@ -1314,7 +1307,7 @@ struct MultiparticleCorrelationsMei // this name is used in lower-case format to
13141307

13151308
if (tc.fMasterCutSwitch) {
13161309
if (tc.fALICECentBinSwitch) {
1317-
ec.fEventHist[eHistCentrality][eSim][eAfter] = new TH1F("[eHistCentrality][eSim][eAfter]", "Centrality (simulated) after cuts", nDefaultCentBins, defaultCentBoundaries.data());
1310+
ec.fEventHist[eHistCentrality][eSim][eAfter] = new TH1F("[eHistCentrality][eSim][eAfter]", "Centrality (simulated) after cuts", NDefaultCentBins, DefaultCentBoundaries.data());
13181311
} else {
13191312
ec.fEventHist[eHistCentrality][eSim][eAfter] = new TH1F("[eHistCentrality][eSim][eAfter]", "Centrality (simulated) after cuts", nBinsCent, minCent, maxCent);
13201313
}
@@ -1351,13 +1344,13 @@ struct MultiparticleCorrelationsMei // this name is used in lower-case format to
13511344
fBaseList->Add(obs.fObservablesList);
13521345

13531346
if (doprocessRec || doprocessRecSim) {
1354-
obs.fProfTwo[eRec] = new TProfile("fProfTwo[eRec]", "Two particle correlation for reconstructed data after cuts", nDefaultCentBins, defaultCentBoundaries.data());
1347+
obs.fProfTwo[eRec] = new TProfile("fProfTwo[eRec]", "Two particle correlation for reconstructed data after cuts", NDefaultCentBins, DefaultCentBoundaries.data());
13551348
obs.fProfTwo[eRec]->GetYaxis()->SetTitle("#LT#LTk#GT#GT");
13561349
obs.fProfTwo[eRec]->Sumw2();
13571350
obs.fObservablesList->Add(obs.fProfTwo[eRec]);
13581351

13591352
if (doprocessRecSim) {
1360-
obs.fProfTwo[eSim] = new TProfile("fProfTwo[eSim]", "Two particle correlation for simulated data after cuts", nDefaultCentBins, defaultCentBoundaries.data());
1353+
obs.fProfTwo[eSim] = new TProfile("fProfTwo[eSim]", "Two particle correlation for simulated data after cuts", NDefaultCentBins, DefaultCentBoundaries.data());
13611354
obs.fProfTwo[eSim]->GetYaxis()->SetTitle("#LT#LTk#GT#GT");
13621355
obs.fProfTwo[eSim]->Sumw2();
13631356
obs.fObservablesList->Add(obs.fProfTwo[eSim]);

0 commit comments

Comments
 (0)