Skip to content

Commit c5ca332

Browse files
committed
FIXXX
1 parent c07c390 commit c5ca332

2 files changed

Lines changed: 16 additions & 12 deletions

File tree

ALICE3/TableProducer/OTF/onTheFlyTofPid.cxx

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -371,12 +371,12 @@ struct OnTheFlyTofPid {
371371

372372
struct TOFLayerEfficiency {
373373
private:
374-
const float layerRadius;
375-
const float layerLength;
376-
const float pixelDimensionZ;
377-
const float pixelDimensionRPhi;
378-
const float fractionInactive;
379-
const float magField;
374+
float layerRadius;
375+
float layerLength;
376+
float pixelDimensionZ;
377+
float pixelDimensionRPhi;
378+
float fractionInactive;
379+
float magField;
380380

381381
TAxis* axisZ = nullptr;
382382
TAxis* axisRPhi = nullptr;
@@ -418,16 +418,16 @@ struct OnTheFlyTofPid {
418418
const float inactiveBorderRPhi = pixelDimensionRPhi * std::sqrt(fractionInactive) / 2;
419419
const float inactiveBorderZ = pixelDimensionZ * std::sqrt(fractionInactive) / 2;
420420
static constexpr int NDimBorderArray = 4;
421-
const double arrayRPhi[NDimBorderArray] = {-pixelDimensionRPhi / 2, -pixelDimensionRPhi / 2 + inactiveBorderRPhi, pixelDimensionRPhi / 2 - inactiveBorderRPhi, pixelDimensionRPhi / 2};
421+
const std::array<double, NDimBorderArray> arrayRPhi = {-pixelDimensionRPhi / 2, -pixelDimensionRPhi / 2 + inactiveBorderRPhi, pixelDimensionRPhi / 2 - inactiveBorderRPhi, pixelDimensionRPhi / 2};
422422
for (int i = 0; i < NDimBorderArray; i++) {
423423
LOG(info) << "arrayRPhi[" << i << "] = " << arrayRPhi[i];
424424
}
425-
axisInPixelRPhi = new TAxis(3, arrayRPhi);
426-
const double arrayZ[NDimBorderArray] = {-pixelDimensionZ / 2, -pixelDimensionZ / 2 + inactiveBorderZ, pixelDimensionZ / 2 - inactiveBorderZ, pixelDimensionZ / 2};
425+
axisInPixelRPhi = new TAxis(3, arrayRPhi.data());
426+
const std::array<double, NDimBorderArray> arrayZ = {-pixelDimensionZ / 2, -pixelDimensionZ / 2 + inactiveBorderZ, pixelDimensionZ / 2 - inactiveBorderZ, pixelDimensionZ / 2};
427427
for (int i = 0; i < NDimBorderArray; i++) {
428428
LOG(info) << "arrayZ[" << i << "] = " << arrayZ[i];
429429
}
430-
axisInPixelZ = new TAxis(3, arrayZ);
430+
axisInPixelZ = new TAxis(3, arrayZ.data());
431431

432432
hHitMap = new TH2F(Form("hHitMap_R%.0f", layerRadius), "HitMap;z (cm); r#phi (cm)", 1000, -1000, 1000, 1000, -1000, 1000);
433433
hHitMapInPixel = new TH2F(Form("hHitMapInPixel_R%.0f", layerRadius), "HitMapInPixel;z (cm); r#phi (cm)", 1000, -10, 10, 1000, -10, 10);
@@ -491,13 +491,17 @@ struct OnTheFlyTofPid {
491491
case kInactiveBottom:
492492
case kInactiveTop:
493493
return false;
494+
default:
495+
break;
494496
}
495497
switch (axisInPixelZ->FindBin(localZ)) {
496498
case kInactiveLeft:
497499
case kInactiveRight:
498500
case kInactiveBottom:
499501
case kInactiveTop:
500502
return false;
503+
default:
504+
break;
501505
}
502506
hHitMapInPixel->Fill(localZ, localRPhi);
503507
hHitMap->Fill(z, rphi);

ALICE3/TableProducer/OTF/onTheFlyTrackerPid.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -355,8 +355,8 @@ struct OnTheFlyTrackerPid {
355355
(-centerDistance + trcCircle.rC + radius) *
356356
(centerDistance + trcCircle.rC + radius));
357357

358-
const float point1[2] = {radical * ux + displace * vx, radical * uy + displace * vy};
359-
const float point2[2] = {radical * ux - displace * vx, radical * uy - displace * vy};
358+
const std::array<float, 2> point1 = {radical * ux + displace * vx, radical * uy + displace * vy};
359+
const std::array<float, 2> point2 = {radical * ux - displace * vx, radical * uy - displace * vy};
360360

361361
std::array<float, 3> mom{};
362362
track.getPxPyPzGlo(mom);

0 commit comments

Comments
 (0)