@@ -4558,7 +4558,7 @@ struct Photonhbt {
45584558 return ;
45594559 }
45604560 const float clean = std::max ({a.pos .sharedFrac , a.ele .sharedFrac , b.pos .sharedFrac , b.ele .sharedFrac }) < qaflags.cfgPairClassMaxSharedFrac .value ? 1 .f : 0 .f ;
4561- const float cls = static_cast <float >(pcPairClass (a, b));
4561+ const auto cls = static_cast <float >(pcPairClass (a, b));
45624562 fRegistryPairMC .fill (HIST (" PairClass/Pairs/hPairClass" ), sample, cls, q, static_cast <float >(pcPairOrigin (a, b)), clean);
45634563 fRegistryPairMC .fill (HIST (" PairClass/Pairs/hKtQ" ), sample, cls, q, 0 .5f * std::hypot (a.px + b.px , a.py + b.py ));
45644564 if (cls == 4 .f ) { // o2-linter: disable=magic-number (half swap)
@@ -4567,7 +4567,7 @@ struct Photonhbt {
45674567 if (x->mpdg == kPcGamma && pcSameMother (*x, *y)) {
45684568 const float src = (x->free && y->free ) ? 0 .f : (x->free || y->free ) ? 3 .f
45694569 : (x->srcPhoton == y->srcPhoton ? 1 .f : 2 .f );
4570- fRegistryPairMC .fill (HIST (" PairClass/Pairs/hHalfSwapLegs" ), sample, q, src, static_cast <float >((a.nFree > 0 ) + (b.nFree > 0 )));
4570+ fRegistryPairMC .fill (HIST (" PairClass/Pairs/hHalfSwapLegs" ), sample, q, src, static_cast <float >((a.nFree > 0 ? 1 : 0 ) + (b.nFree > 0 ? 1 : 0 )));
45714571 }
45724572 }
45734573 }
@@ -4576,7 +4576,7 @@ struct Photonhbt {
45764576 const float eA = std::sqrt (a.px * a.px + a.py * a.py + a.pz * a.pz ), eB = std::sqrt (b.px * b.px + b.py * b.py + b.pz * b.pz );
45774577 fRegistryPairMC .fill (HIST (" PairClass/Pairs/hDEQinv" ), sample, cls, q, std::fabs (eA - eB), 0 .5f * std::hypot (a.px + b.px , a.py + b.py ));
45784578 }
4579- fRegistryPairMC .fill (HIST (" PairClass/Pairs/hFreeLegPair" ), sample, cls, q, static_cast <float >((a.nFree > 0 ) + (b.nFree > 0 )), static_cast <float >(! a.original + ! b.original ));
4579+ fRegistryPairMC .fill (HIST (" PairClass/Pairs/hFreeLegPair" ), sample, cls, q, static_cast <float >((a.nFree > 0 ? 1 : 0 ) + (b.nFree > 0 ? 1 : 0 )), static_cast <float >(( a.original ? 0 : 1 ) + ( b.original ? 0 : 1 ) ));
45804580 {
45814581 const ROOT ::Math::PxPyPzMVector v1 (a.px , a.py , a.pz , 0 .f ), v2 (b.px , b.py , b.pz , 0 .f );
45824582 const auto sum = v1 + v2;
@@ -4612,7 +4612,7 @@ struct Photonhbt {
46124612 }
46134613 fRegistryPairMC .fill (HIST (" PairClass/Pairs/hPairDist" ), sample, cls, q, std::hypot (a.vx - b.vx , a.vy - b.vy , a.vz - b.vz ), pcTrueDist ({&a.pos , &a.ele , &b.pos , &b.ele }));
46144614 ROOT ::Math::PxPyPzMVector sum4;
4615- const PcLeg* legs4[ 4 ] = {&a.pos , &a.ele , &b.pos , &b.ele };
4615+ const std::array< const PcLeg*, 4 > legs4 {&a.pos , &a.ele , &b.pos , &b.ele };
46164616 for (const auto * l : legs4) {
46174617 sum4 += ROOT::Math::PxPyPzMVector (l->px , l->py , l->pz , o2::constants::physics::MassElectron);
46184618 }
@@ -4639,7 +4639,7 @@ struct Photonhbt {
46394639 if (q < 0 .1f ) {
46404640 auto dtgl = [](PcPhoton const & p) { const float ptp = std::hypot (p.pos .px , p.pos .py ), pte = std::hypot (p.ele .px , p.ele .py ); return (ptp > 0 .f && pte > 0 .f ) ? std::fabs (p.pos .pz / ptp - p.ele .pz / pte) : 0 .3f ; };
46414641 const float pmin = std::min ({std::hypot (a.pos .px , a.pos .py , a.pos .pz ), std::hypot (a.ele .px , a.ele .py , a.ele .pz ), std::hypot (b.pos .px , b.pos .py , b.pos .pz ), std::hypot (b.ele .px , b.ele .py , b.ele .pz )});
4642- const float nIts = static_cast <float >((a.pos .its ? 1 : 0 ) + (a.ele .its ? 1 : 0 ) + (b.pos .its ? 1 : 0 ) + (b.ele .its ? 1 : 0 ));
4642+ const auto nIts = static_cast <float >((a.pos .its ? 1 : 0 ) + (a.ele .its ? 1 : 0 ) + (b.pos .its ? 1 : 0 ) + (b.ele .its ? 1 : 0 ));
46434643 fRegistryPairMC .fill (HIST (" PairClass/Pairs/hPairLegs" ), sample, cls, q, std::min (std::max (dtgl (a), dtgl (b)), 0 .299f ), std::min (pmin, 0 .999f ), nIts, static_cast <float >(pcPairOrigin (a, b)));
46444644 constexpr float kTpcRin = 85 .f , kTpcRout = 247 .f ; // o2-linter: disable=magic-number (TPC drift volume, diagnostic)
46454645 auto crossesCE = [&](PcLeg const & l) {
@@ -4753,12 +4753,15 @@ struct Photonhbt {
47534753 default :
47544754 break ;
47554755 }
4756- if (pdg == 11 || pdg == 13 || pdg == 22 )
4756+ if (pdg == 11 || pdg == 13 || pdg == 22 ) {
47574757 return 8 .f ; // o2-linter: disable=magic-number (leptons, photon: other)
4758- if (pdg > 1000 )
4758+ }
4759+ if (pdg > 1000 ) {
47594760 return 6 .f ; // o2-linter: disable=magic-number (baryons)
4760- if (pdg < 100 )
4761+ }
4762+ if (pdg < 100 ) {
47614763 return 7 .f ; // o2-linter: disable=magic-number (no hadron mother: quark, gluon, string, cluster, none)
4764+ }
47624765 return 8 .f ;
47634766 };
47644767 fRegistryPairMC .fill (HIST (" PairClass/Pairs/hBremsAncestry" ), sample, cls == 16 .f ? 0 .f : 1 .f , q, ancClass (y->gpdg ), ancClass (y->ggpdg ), ancClass (y->rootPdg )); // o2-linter: disable=magic-number (class)
@@ -4838,7 +4841,7 @@ struct Photonhbt {
48384841 p.pos = pos;
48394842 p.ele = ele;
48404843 p.svertexer = p.original && posV0 >= 0 ;
4841- p.nFree = (posV0 == -2 ) + (eleV0 == -2 ); // o2-linter: disable=magic-number (free-leg stub v0Id of the mixer)
4844+ p.nFree = (posV0 == -2 ? 1 : 0 ) + (eleV0 == -2 ? 1 : 0 ); // o2-linter: disable=magic-number (free-leg stub v0Id of the mixer)
48424845 p.chi2 = photon.chiSquareNDF ();
48434846 p.dcaxy = photon.dcaXYtopv ();
48444847 p.dcaz = photon.dcaZtopv ();
@@ -5298,7 +5301,7 @@ struct Photonhbt {
52985301 fRegistryCF .fill (HIST (" Pair/mix/hPhi_lowerPtV0" ), (g1.pt () < g2.pt ()) ? g1.phi () : g2.phi ());
52995302 }
53005303 ndiphoton++;
5301- const float origin = static_cast <float >(pcPairOrigin (a, b));
5304+ const auto origin = static_cast <float >(pcPairOrigin (a, b));
53025305 const float sameSign = pcAlpha (a) * pcAlpha (b) > 0 .f ? 1 .f : 0 .f ;
53035306 fRegistry .fill (HIST (" CoReco/hPairOrigin" ), kSample , origin, obs.qinv , obs.kt , sameSign);
53045307
@@ -5308,7 +5311,7 @@ struct Photonhbt {
53085311 } else {
53095312 fillMixTruth (collision, pwl1.fIsTruePhoton , pwl2.fIsTruePhoton , obs);
53105313 }
5311- const float cls = static_cast <float >(pcPairClass (a, b));
5314+ const auto cls = static_cast <float >(pcPairClass (a, b));
53125315 const auto q3 = lcmsQ (obs.v1 , obs.v2 );
53135316 fRegistryPairMC .fill (HIST (" CoReco/MC/hClass3D" ), kSample , cls, q3[0 ], q3[1 ], q3[2 ], obs.kt );
53145317 fRegistryPairMC .fill (HIST (" CoReco/MC/hClassQ" ), kSample , cls, obs.qinv , pcTrueQ (a, b), obs.kt );
0 commit comments