@@ -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);
0 commit comments