Skip to content

Commit e1ea7b2

Browse files
committed
Fixing build
1 parent e74e8ba commit e1ea7b2

1 file changed

Lines changed: 21 additions & 19 deletions

File tree

DPG/Tasks/AOTTrack/PID/HMPID/hmpidTableProducer.cxx

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ struct HmpidTableProducer {
5050

5151
HistogramRegistry histos{"histos", {}, OutputObjHandlingPolicy::AnalysisObject};
5252

53-
const AxisSpec axisEvtCounter{1, 0, +1, ""};
53+
AxisSpec axisEvtCounter{1, 0, +1, ""};
5454

5555
Service<o2::ccdb::BasicCCDBManager> ccdb;
5656
struct : ConfigurableGroup {
@@ -68,8 +68,8 @@ struct HmpidTableProducer {
6868
Configurable<bool> requireTOF{"requireTOF", true, "Require TOF track"};
6969

7070
// Absorbers position
71-
Configurable<float> absorberEdgeRich2{"absorberEdgeRich2", 435.5f, "Raggio esterno (bordo) del target Al davanti a rich2 [cm]"};
72-
Configurable<float> absorberEdgeRich4{"absorberEdgeRich4", 435.0f, "Raggio esterno (bordo) del target Al davanti a rich4 [cm]"};
71+
Configurable<float> absorberEdgeRich2{"absorberEdgeRich2", 435.5f, "Raggio esterno (bordo) del target Al davanti a Rich2 [cm]"};
72+
Configurable<float> absorberEdgeRich4{"absorberEdgeRich4", 435.0f, "Raggio esterno (bordo) del target Al davanti a Rich4 [cm]"};
7373

7474
using CollisionCandidates = o2::soa::Join<aod::Collisions, aod::EvSels, aod::Mults, aod::CentFV0As>;
7575

@@ -90,9 +90,9 @@ struct HmpidTableProducer {
9090

9191
std::unordered_set<uint32_t> mCollisionsWithHmpid;
9292

93-
const int rich2 = 2, rich4 = 4;
94-
const float kRich2AbsorberThickness = 4.0f;
95-
const float kRich4AbsorberThickness = 8.0f;
93+
static constexpr int Rich2 = 2, Rich4 = 4;
94+
static constexpr float Rich2AbsorberThickness = 4.0f;
95+
static constexpr float Rich4AbsorberThickness = 8.0f;
9696

9797
void init(o2::framework::InitContext&)
9898
{
@@ -252,13 +252,16 @@ struct HmpidTableProducer {
252252
}
253253

254254
int getHmpidChamber(
255-
std::array<double, 3> xIn,
256-
std::array<double, 3> pIn,
255+
const std::array<double, 3>& xIn,
256+
const std::array<double, 3>& pIn,
257257
double bz,
258258
int charge)
259259
{
260-
auto x = xIn;
261-
auto p = pIn;
260+
std::array<double, 3> x{};
261+
std::array<double, 3> p{};
262+
263+
x = xIn;
264+
p = pIn;
262265

263266
auto* param = o2::hmpid::Param::instance();
264267

@@ -274,21 +277,21 @@ struct HmpidTableProducer {
274277
param->norm(ch, nPc.data());
275278

276279
// Intersection track - radiator plane
277-
std::array<double, 3> xRad, pAtRad;
280+
std::array<double, 3> xRad{}, pAtRad{};
278281

279282
if (!intersectHelixPlane(bz, charge, x, p, pRad, nRad, xRad, pAtRad))
280283
continue;
281284

282285
// Intersection track - PC plane
283-
std::array<double, 3> xPc, pAtPc;
286+
std::array<double, 3> xPc{}, pAtPc{};
284287

285288
if (!intersectHelixPlane(bz, charge, xRad, pAtRad, pPc, nPc, xPc, pAtPc))
286289
continue;
287290

288-
double theta, phi;
291+
double theta = 0., phi = 0.;
289292
param->mars2LorsVec(ch, pAtRad.data(), theta, phi);
290293

291-
double xL, yL;
294+
double xL = 0., yL = 0.;
292295
param->mars2Lors(ch, xPc.data(), xL, yL);
293296

294297
// Use isInside to check Chamber intersected
@@ -367,7 +370,7 @@ struct HmpidTableProducer {
367370
int16_t charge = globalTrack.sign();
368371

369372
auto prop = o2::base::Propagator::Instance();
370-
double bz = static_cast<double>(prop->getNominalBz());
373+
auto bz = static_cast<double>(prop->getNominalBz());
371374

372375
int chamberM1 = getHmpidChamber(x, p, bz, charge);
373376

@@ -407,9 +410,8 @@ struct HmpidTableProducer {
407410
continue;
408411

409412
float hmpidPhotsCharge2[o2::aod::kDimPhotonsCharge];
410-
for (int i = 0; i < o2::aod::kDimPhotonsCharge; i++) // begin for - copy photon charges
413+
for (int i = 0; i < o2::aod::kDimPhotonsCharge; i++)
411414
hmpidPhotsCharge2[i] = t.hmpidPhotsCharge()[i];
412-
// end for - copy photon charges
413415

414416
// fill hmpid table
415417
hmpidAnalysis(
@@ -444,11 +446,11 @@ struct HmpidTableProducer {
444446
auto daughter = mcParticles.rawIteratorAt(idx);
445447
double r = std::hypot(daughter.vx(), daughter.vy());
446448

447-
if (chamberM3 == rich2 && r >= absorberEdgeRich2 - kRich2AbsorberThickness && r <= absorberEdgeRich2) {
449+
if (chamberM3 == Rich2 && r >= absorberEdgeRich2 - Rich2AbsorberThickness && r <= absorberEdgeRich2) {
448450
interactionInAbsorber = true;
449451
break;
450452
}
451-
if (chamberM3 == rich4 && r >= absorberEdgeRich4 - kRich4AbsorberThickness && r <= absorberEdgeRich4) {
453+
if (chamberM3 == Rich4 && r >= absorberEdgeRich4 - Rich4AbsorberThickness && r <= absorberEdgeRich4) {
452454
interactionInAbsorber = true;
453455
break;
454456
}

0 commit comments

Comments
 (0)