|
32 | 32 | #include <TH1.h> |
33 | 33 | #include <TH2.h> |
34 | 34 | #include <TRandom3.h> |
| 35 | +#include <Rtypes.h> |
35 | 36 |
|
36 | 37 | #include <cmath> |
37 | 38 | #include <cstdint> |
| 39 | +#include <array> |
38 | 40 |
|
39 | 41 | using namespace o2; |
40 | 42 | using namespace o2::framework; |
@@ -125,10 +127,10 @@ struct ZdcExtraTableProducer { |
125 | 127 | } |
126 | 128 |
|
127 | 129 | template <typename TCollision> |
128 | | - uint8_t eventSelected(TCollision collision) |
| 130 | + uint8_t eventSelected(TCollision const& collision) |
129 | 131 | { |
130 | 132 | uint8_t selectionBits = 0; |
131 | | - bool selected; |
| 133 | + bool selected = false; |
132 | 134 |
|
133 | 135 | registry.fill(HIST("hEventCount"), AllEvents); |
134 | 136 |
|
@@ -253,8 +255,8 @@ struct ZdcExtraTableProducer { |
253 | 255 | // |
254 | 256 | double sumZNC = 0; |
255 | 257 | double sumZNA = 0; |
256 | | - double pmqZNC[4] = {}; |
257 | | - double pmqZNA[4] = {}; |
| 258 | + std::array<double, 4> pmqZNC = {}; |
| 259 | + std::array<double, 4> pmqZNA = {}; |
258 | 260 | // |
259 | 261 | if (isZNChit) { |
260 | 262 | for (int it = 0; it < NTowers; it++) { |
@@ -292,8 +294,8 @@ struct ZdcExtraTableProducer { |
292 | 294 | constexpr float kBeamEne = 5.36 * 0.5; |
293 | 295 |
|
294 | 296 | // Provide coordinates of centroid over ZN (side C) front face |
295 | | - constexpr float X[4] = {-1.75, 1.75, -1.75, 1.75}; |
296 | | - constexpr float Y[4] = {-1.75, -1.75, 1.75, 1.75}; |
| 297 | + constexpr std::array<float, 4> X = {-1.75, 1.75, -1.75, 1.75}; |
| 298 | + constexpr std::array<float, 4> Y = {-1.75, -1.75, 1.75, 1.75}; |
297 | 299 | constexpr float kAlpha = 0.395; // saturation correction |
298 | 300 |
|
299 | 301 | float numXZNC = 0., numYZNC = 0., denZNC = 0.; |
@@ -328,7 +330,8 @@ struct ZdcExtraTableProducer { |
328 | 330 | znaCommon = sumZNA; |
329 | 331 | } |
330 | 332 |
|
331 | | - float centroidZNC[2], centroidZNA[2]; |
| 333 | + std::array<float, 2> centroidZNC = {}; |
| 334 | + std::array<float, 2> centroidZNA = {}; |
332 | 335 |
|
333 | 336 | if (denZNC != 0.) { |
334 | 337 | float cZNC = 1.0; |
|
0 commit comments