Skip to content

Commit f24004f

Browse files
authored
Merge pull request #3 from alibuild/alibot-cleanup-9045
Please consider the following formatting changes to AliceO2Group#9045
2 parents 09e9d3b + d0628b1 commit f24004f

File tree

1 file changed

+13
-19
lines changed

1 file changed

+13
-19
lines changed

PWGCF/TwoParticleCorrelations/Tasks/neutronProtonCorrZdc.cxx

Lines changed: 13 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ struct NeutronProtonCorrZdc {
4646
// Configurable<int> cfgCentralityEstimator{"cfgCentralityEstimator", 0, "Choice of centrality estimator"};//0 for FTOC, 1 for FTOA, 2 for FTOM, 3 for FVOA. //To be included at a later stage
4747
// Configurable<bool> cfgProcessRun2{"cfgProcessRun2", false, "Analyse Run 2 converted data"};//To be included at a later stage
4848

49-
5049
ConfigurableAxis cfgAxisCent{"cfgAxisCent", {VARIABLE_WIDTH, 0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0, 17.0, 18.0, 19.0, 20.0, 21.0, 22.0, 23.0, 24.0, 25.0, 26.0, 27.0, 28.0, 29.0, 30.0, 31.0, 32.0, 33.0, 34.0, 35.0, 36.0, 37.0, 38.0, 39.0, 40.0, 41.0, 42.0, 43.0, 44.0, 45.0, 46.0, 47.0, 48.0, 49.0, 50.0, 51.0, 52.0, 53.0, 54.0, 55.0, 56.0, 57.0, 58.0, 59.0, 60.0, 61.0, 62.0, 63.0, 64.0, 65.0, 66.0, 67.0, 68.0, 69.0, 70.0, 71.0, 72.0, 73.0, 74.0, 75.0, 76.0, 77.0, 78.0, 79.0, 80.0, 81.0, 82.0, 83.0, 84.0, 85.0, 86.0, 87.0, 88.0, 89.0, 90.0, 91.0, 92.0, 93.0, 94.0, 95.0, 96.0, 97.0, 98.0, 99.0, 100.0}, "Centrality [%]"};
5150

5251
Filter collisionVtxZ = nabs(aod::collision::posZ) < 10.f;
@@ -74,7 +73,6 @@ struct NeutronProtonCorrZdc {
7473
HistogramConfigSpec defaultZPSectorHist({HistType::kTH2F, {cfgAxisCent, axisZPSectorSignal}});
7574
HistogramConfigSpec defaultZDCDiffHist({HistType::kTH2F, {cfgAxisCent, axisZDiffSignal}});
7675

77-
7876
// create histograms
7977
histos.add("eventCounter", "eventCounter", kTH1F, {axisCounter});
8078
histos.add("CentralityPercentile", "CentralityPercentile", kTH1F, {cfgAxisCent});
@@ -94,7 +92,7 @@ struct NeutronProtonCorrZdc {
9492
histos.add("ASide/CentvsdiffZNSignal", "CentvsdiffZNSignal", defaultZDCDiffHist);
9593
histos.add("ASide/CentvsdiffZPSignal", "CentvsdiffZPSignal", defaultZDCDiffHist);
9694

97-
//Cloning the folder
95+
// Cloning the folder
9896
histos.addClone("ASide/", "CSide/");
9997

10098
histos.add("CentvsZNSignalCommon", "CentvsZNSignalCommon", kTH2F, {cfgAxisCent, axisZNSignal});
@@ -105,19 +103,18 @@ struct NeutronProtonCorrZdc {
105103
histos.add("CentvsAlphaZP", "CentvsAlphaZP", kTH2F, {cfgAxisCent, axisAlphaZ});
106104
histos.add("CentvsDiffZNSignal", "CentvsDiffZNSignal", defaultZDCDiffHist);
107105
histos.add("CentvsDiffZPSignal", "CentvsDiffZPSignal", defaultZDCDiffHist);
108-
109106
}
110107
template <int side, typename Z>
111108
void fillZDCHistos(const float centr, const Z& zdc)
112109
{
113110
static constexpr std::string subDir[2] = {"ASide/", "CSide/"};
114111

115112
std::array<std::array<float, 4>, 2> znEnergyResponse = {zdc.energySectorZNA(), zdc.energySectorZNC()};
116-
std::array<std::array<float, 4>, 2> zpEnergyResponse = {zdc.energySectorZPA(), zdc.energySectorZPC()};
117-
std::array<float, 2> znEnergyResponseCommon = {zdc.energyCommonZNA(), zdc.energyCommonZNC()};
118-
std::array<float, 2> zpEnergyResponseCommon = {zdc.energyCommonZPA(), zdc.energyCommonZPC()};
113+
std::array<std::array<float, 4>, 2> zpEnergyResponse = {zdc.energySectorZPA(), zdc.energySectorZPC()};
114+
std::array<float, 2> znEnergyResponseCommon = {zdc.energyCommonZNA(), zdc.energyCommonZNC()};
115+
std::array<float, 2> zpEnergyResponseCommon = {zdc.energyCommonZPA(), zdc.energyCommonZPC()};
119116

120-
//Fill Neutron ZDC historgrams
117+
// Fill Neutron ZDC historgrams
121118
histos.fill(HIST(subDir[side]) + HIST("CentvsZNSector0Signal"), centr, znEnergyResponse[side][0]);
122119
histos.fill(HIST(subDir[side]) + HIST("CentvsZNSector1Signal"), centr, znEnergyResponse[side][1]);
123120
histos.fill(HIST(subDir[side]) + HIST("CentvsZNSector2Signal"), centr, znEnergyResponse[side][2]);
@@ -129,9 +126,7 @@ struct NeutronProtonCorrZdc {
129126
histos.fill(HIST(subDir[side]) + HIST("CentvsZNSignalCommon"), centr, znEnergyResponseCommon[side]);
130127
histos.fill(HIST(subDir[side]) + HIST("CentvsdiffZNSignal"), centr, sumZN - znEnergyResponseCommon[side]);
131128

132-
133-
134-
//Fill Proton ZDC histograms
129+
// Fill Proton ZDC histograms
135130
histos.fill(HIST(subDir[side]) + HIST("CentvsZPSector0Signal"), centr, zpEnergyResponse[side][0]);
136131
histos.fill(HIST(subDir[side]) + HIST("CentvsZPSector1Signal"), centr, zpEnergyResponse[side][1]);
137132
histos.fill(HIST(subDir[side]) + HIST("CentvsZPSector2Signal"), centr, zpEnergyResponse[side][2]);
@@ -142,7 +137,6 @@ struct NeutronProtonCorrZdc {
142137
histos.fill(HIST(subDir[side]) + HIST("CentvsZPSignalSum"), centr, sumZP);
143138
histos.fill(HIST(subDir[side]) + HIST("CentvsZPSignalCommon"), centr, zpEnergyResponseCommon[side]);
144139
histos.fill(HIST(subDir[side]) + HIST("CentvsdiffZPSignal"), centr, sumZP - zpEnergyResponseCommon[side]);
145-
146140
}
147141

148142
void processRun3(soa::Filtered<soa::Join<aod::Collisions, aod::EvSels, CentralitiesRun3>>::iterator const& collision, BCsRun3 const&, aod::Zdcs const&)
@@ -151,7 +145,7 @@ struct NeutronProtonCorrZdc {
151145
histos.fill(HIST("eventCounter"), 0.25);
152146
return;
153147
}
154-
if(collision.centFT0C()>cfgMaxCentrality) {
148+
if (collision.centFT0C() > cfgMaxCentrality) {
155149
histos.fill(HIST("eventCounter"), 0.75);
156150
return;
157151
}
@@ -163,14 +157,14 @@ struct NeutronProtonCorrZdc {
163157
histos.fill(HIST("eventCounter"), 1.25);
164158
histos.fill(HIST("CentralityPercentile"), cent);
165159

166-
fillZDCHistos<0>(cent,zdcread);//Fill A-side
167-
fillZDCHistos<1>(cent,zdcread);//Fill C-side
160+
fillZDCHistos<0>(cent, zdcread); // Fill A-side
161+
fillZDCHistos<1>(cent, zdcread); // Fill C-side
168162

169163
float sumZNC = (zdcread.energySectorZNC())[0] + (zdcread.energySectorZNC())[1] + (zdcread.energySectorZNC())[2] + (zdcread.energySectorZNC())[3];
170164
float sumZNA = (zdcread.energySectorZNA())[0] + (zdcread.energySectorZNA())[1] + (zdcread.energySectorZNA())[2] + (zdcread.energySectorZNA())[3];
171165
float sumZPC = (zdcread.energySectorZPC())[0] + (zdcread.energySectorZPC())[1] + (zdcread.energySectorZPC())[2] + (zdcread.energySectorZPC())[3];
172166
float sumZPA = (zdcread.energySectorZPA())[0] + (zdcread.energySectorZPA())[1] + (zdcread.energySectorZPA())[2] + (zdcread.energySectorZPA())[3];
173-
167+
174168
float alphaZN = (sumZNA - sumZNC) / (sumZNA + sumZNC);
175169
float alphaZP = (sumZPA - sumZPC) / (sumZPA + sumZPC);
176170

@@ -192,7 +186,7 @@ struct NeutronProtonCorrZdc {
192186
histos.fill(HIST("eventCounter"), 0.25);
193187
return;
194188
}
195-
if(collision.centRun2V0M()>cfgMaxCentrality) {
189+
if (collision.centRun2V0M() > cfgMaxCentrality) {
196190
histos.fill(HIST("eventCounter"), 0.75);
197191
return;
198192
}
@@ -204,8 +198,8 @@ struct NeutronProtonCorrZdc {
204198
histos.fill(HIST("eventCounter"), 1.25);
205199
histos.fill(HIST("CentralityPercentile"), cent);
206200

207-
fillZDCHistos<0>(cent,zdcread);//Fill A-side
208-
fillZDCHistos<1>(cent,zdcread);//Fill C-side
201+
fillZDCHistos<0>(cent, zdcread); // Fill A-side
202+
fillZDCHistos<1>(cent, zdcread); // Fill C-side
209203

210204
float sumZNC = (zdcread.energySectorZNC())[0] + (zdcread.energySectorZNC())[1] + (zdcread.energySectorZNC())[2] + (zdcread.energySectorZNC())[3];
211205
float sumZNA = (zdcread.energySectorZNA())[0] + (zdcread.energySectorZNA())[1] + (zdcread.energySectorZNA())[2] + (zdcread.energySectorZNA())[3];

0 commit comments

Comments
 (0)