Skip to content

Commit 7051a5f

Browse files
authored
Merge pull request #4 from alibuild/alibot-cleanup-15416
Formatting changes
2 parents 04aafb9 + ad1fe18 commit 7051a5f

File tree

1 file changed

+33
-37
lines changed

1 file changed

+33
-37
lines changed

Common/TableProducer/zdcExtraTableProducer.cxx

Lines changed: 33 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ struct ZdcExtraTableProducer {
6767
Configurable<bool> cfgEvSelsIsGoodITSLayersAll{"cfgEvSelsIsGoodITSLayersAll", true, "Event selection: is good ITS layers all"};
6868
// Calibration settings
6969
Configurable<float> cfgCalibrationDownscaling{"cfgCalibrationDownscaling", 1.f, "Percentage of events to be saved to derived table"};
70-
70+
7171
// Output settings
7272
Configurable<bool> cfgSaveQaHistos{"cfgSaveQaHistos", false, "Flag to save QA histograms"};
7373

@@ -102,9 +102,9 @@ struct ZdcExtraTableProducer {
102102

103103
// Skip histogram registration if QA flag is false
104104
if (!cfgSaveQaHistos) {
105-
return;}
106-
107-
105+
return;
106+
}
107+
108108
registry.add("ZNApmc", "ZNApmc; ZNA PMC; Entries", {HistType::kTH1F, {{nBins, -0.5, maxZN}}});
109109
registry.add("ZNCpmc", "ZNCpmc; ZNC PMC; Entries", {HistType::kTH1F, {{nBins, -0.5, maxZN}}});
110110
registry.add("ZNApm1", "ZNApm1; ZNA PM1; Entries", {HistType::kTH1F, {{nBins, -0.5, maxZN}}});
@@ -120,7 +120,6 @@ struct ZdcExtraTableProducer {
120120

121121
registry.add("ZNACentroid", "ZNA Centroid; X; Y", {HistType::kTH2F, {{50, -1.5, 1.5}, {50, -1.5, 1.5}}});
122122
registry.add("ZNCCentroid", "ZNC Centroid; X; Y", {HistType::kTH2F, {{50, -1.5, 1.5}, {50, -1.5, 1.5}}});
123-
124123
}
125124

126125
template <typename TCollision>
@@ -129,7 +128,7 @@ struct ZdcExtraTableProducer {
129128
uint8_t selectionBits = 0;
130129
bool selected;
131130

132-
registry.fill(HIST("hEventCount"), evSel_allEvents);
131+
registry.fill(HIST("hEventCount"), evSel_allEvents);
133132

134133
selected = std::fabs(collision.posZ()) < cfgEvSelVtxZ;
135134
if (selected) {
@@ -140,44 +139,44 @@ struct ZdcExtraTableProducer {
140139
selected = collision.sel8();
141140
if (selected) {
142141
selectionBits |= (uint8_t)(0x1u << evSel_sel8);
143-
registry.fill(HIST("hEventCount"), evSel_sel8);
142+
registry.fill(HIST("hEventCount"), evSel_sel8);
144143
}
145144

146145
auto occupancy = collision.trackOccupancyInTimeRange();
147146
selected = occupancy <= cfgEvSelsMaxOccupancy;
148147
if (selected) {
149148
selectionBits |= (uint8_t)(0x1u << evSel_occupancy);
150-
registry.fill(HIST("hEventCount"), evSel_occupancy);
149+
registry.fill(HIST("hEventCount"), evSel_occupancy);
151150
}
152151

153152
selected = collision.selection_bit(o2::aod::evsel::kNoSameBunchPileup);
154153
if (selected) {
155154
selectionBits |= (uint8_t)(0x1u << evSel_kNoSameBunchPileup);
156-
registry.fill(HIST("hEventCount"), evSel_kNoSameBunchPileup);
155+
registry.fill(HIST("hEventCount"), evSel_kNoSameBunchPileup);
157156
}
158157

159158
selected = collision.selection_bit(o2::aod::evsel::kIsGoodZvtxFT0vsPV);
160159
if (selected) {
161160
selectionBits |= (uint8_t)(0x1u << evSel_kIsGoodZvtxFT0vsPV);
162-
registry.fill(HIST("hEventCount"), evSel_kIsGoodZvtxFT0vsPV);
161+
registry.fill(HIST("hEventCount"), evSel_kIsGoodZvtxFT0vsPV);
163162
}
164163

165164
selected = collision.selection_bit(o2::aod::evsel::kNoCollInTimeRangeStandard);
166165
if (selected) {
167166
selectionBits |= (uint8_t)(0x1u << evSel_kNoCollInTimeRangeStandard);
168-
registry.fill(HIST("hEventCount"), evSel_kNoCollInTimeRangeStandard);
167+
registry.fill(HIST("hEventCount"), evSel_kNoCollInTimeRangeStandard);
169168
}
170169

171170
selected = collision.selection_bit(o2::aod::evsel::kIsVertexITSTPC);
172171
if (selected) {
173172
selectionBits |= (uint8_t)(0x1u << evSel_kIsVertexITSTPC);
174-
registry.fill(HIST("hEventCount"), evSel_kIsVertexITSTPC);
173+
registry.fill(HIST("hEventCount"), evSel_kIsVertexITSTPC);
175174
}
176175

177176
selected = collision.selection_bit(o2::aod::evsel::kIsGoodITSLayersAll);
178177
if (selected) {
179178
selectionBits |= (uint8_t)(0x1u << evSel_kIsGoodITSLayersAll);
180-
registry.fill(HIST("hEventCount"), evSel_kIsGoodITSLayersAll);
179+
registry.fill(HIST("hEventCount"), evSel_kIsGoodITSLayersAll);
181180
}
182181

183182
return selectionBits;
@@ -209,10 +208,10 @@ struct ZdcExtraTableProducer {
209208

210209
// OR we can select a narrow window in both ZN TDCs using the configurable parameters
211210
if (tdcCut) { // a narrow TDC window is set
212-
if ((tdcZNC >= tdcZNmincut) && (tdcZNC <= tdcZNmaxcut) ) {
211+
if ((tdcZNC >= tdcZNmincut) && (tdcZNC <= tdcZNmaxcut)) {
213212
isZNChit = true;
214213
}
215-
if ((tdcZNA >= tdcZNmincut) && (tdcZNA <= tdcZNmaxcut) ) {
214+
if ((tdcZNA >= tdcZNmincut) && (tdcZNA <= tdcZNmaxcut)) {
216215
isZNAhit = true;
217216
}
218217
} else { // if no window on TDC is set
@@ -235,31 +234,29 @@ struct ZdcExtraTableProducer {
235234
sumZNC += pmqZNC[it];
236235
}
237236

238-
if (cfgSaveQaHistos)
239-
{
237+
if (cfgSaveQaHistos) {
240238
registry.get<TH1>(HIST("ZNCpmc"))->Fill(pmcZNC);
241-
registry.get<TH1>(HIST("ZNCpm1"))->Fill(pmqZNC[0]);
242-
registry.get<TH1>(HIST("ZNCpm2"))->Fill(pmqZNC[1]);
243-
registry.get<TH1>(HIST("ZNCpm3"))->Fill(pmqZNC[2]);
244-
registry.get<TH1>(HIST("ZNCpm4"))->Fill(pmqZNC[3]);
245-
registry.get<TH1>(HIST("ZNCsumq"))->Fill(sumZNC);
246-
}
239+
registry.get<TH1>(HIST("ZNCpm1"))->Fill(pmqZNC[0]);
240+
registry.get<TH1>(HIST("ZNCpm2"))->Fill(pmqZNC[1]);
241+
registry.get<TH1>(HIST("ZNCpm3"))->Fill(pmqZNC[2]);
242+
registry.get<TH1>(HIST("ZNCpm4"))->Fill(pmqZNC[3]);
243+
registry.get<TH1>(HIST("ZNCsumq"))->Fill(sumZNC);
244+
}
247245
}
248246
if (isZNAhit) {
249247
for (int it = 0; it < kNTowers; it++) {
250248
pmqZNA[it] = (zdc.energySectorZNA())[it];
251249
sumZNA += pmqZNA[it];
252250
}
253251
//
254-
if (cfgSaveQaHistos)
255-
{
256-
registry.get<TH1>(HIST("ZNApmc"))->Fill(pmcZNA);
257-
registry.get<TH1>(HIST("ZNApm1"))->Fill(pmqZNA[0]);
258-
registry.get<TH1>(HIST("ZNApm2"))->Fill(pmqZNA[1]);
259-
registry.get<TH1>(HIST("ZNApm3"))->Fill(pmqZNA[2]);
260-
registry.get<TH1>(HIST("ZNApm4"))->Fill(pmqZNA[3]);
261-
registry.get<TH1>(HIST("ZNAsumq"))->Fill(sumZNA);
262-
}
252+
if (cfgSaveQaHistos) {
253+
registry.get<TH1>(HIST("ZNApmc"))->Fill(pmcZNA);
254+
registry.get<TH1>(HIST("ZNApm1"))->Fill(pmqZNA[0]);
255+
registry.get<TH1>(HIST("ZNApm2"))->Fill(pmqZNA[1]);
256+
registry.get<TH1>(HIST("ZNApm3"))->Fill(pmqZNA[2]);
257+
registry.get<TH1>(HIST("ZNApm4"))->Fill(pmqZNA[3]);
258+
registry.get<TH1>(HIST("ZNAsumq"))->Fill(sumZNA);
259+
}
263260
}
264261

265262
// Q-vectors (centroid) calculation
@@ -324,11 +321,10 @@ struct ZdcExtraTableProducer {
324321
centroidZNA[0] = 999.;
325322
centroidZNA[1] = 999.;
326323
}
327-
if (cfgSaveQaHistos)
328-
{
329-
registry.get<TH2>(HIST("ZNCCentroid"))->Fill(centroidZNC[0], centroidZNC[1]);
330-
registry.get<TH2>(HIST("ZNACentroid"))->Fill(centroidZNA[0], centroidZNA[1]);
331-
}
324+
if (cfgSaveQaHistos) {
325+
registry.get<TH2>(HIST("ZNCCentroid"))->Fill(centroidZNC[0], centroidZNC[1]);
326+
registry.get<TH2>(HIST("ZNACentroid"))->Fill(centroidZNA[0], centroidZNA[1]);
327+
}
332328

333329
auto vz = collision.posZ();
334330
auto vx = collision.posX();

0 commit comments

Comments
 (0)