@@ -1186,14 +1186,14 @@ struct derivedlambdakzeroanalysis {
11861186 // Calculation taken from CF: https://github.com/AliceO2Group/O2Physics/blob/376392cb87349886a300c75fa2492b50b7f46725/PWGCF/Flow/Tasks/flowAnalysisGF.cxx#L470
11871187 {
11881188 if (magField < 0 ) // for negative polarity field
1189- phi = TMath::TwoPi () - phi;
1189+ phi = o2::constants::math::TwoPI - phi;
11901190 if (sign < 0 ) // for negative charge
1191- phi = TMath::TwoPi () - phi;
1191+ phi = o2::constants::math::TwoPI - phi;
11921192 if (phi < 0 )
11931193 LOGF (warning, " phi < 0: %g" , phi);
11941194
1195- phi += TMath::Pi () / 18.0 ; // to center gap in the middle
1196- return fmod (phi, TMath::Pi () / 9.0 );
1195+ phi += o2::constants::math::PI / 18.0 ; // to center gap in the middle
1196+ return fmod (phi, o2::constants::math::PI / 9.0 );
11971197 }
11981198
11991199 bool isTrackFarFromTPCBoundary (double trackPt, double trackPhi, int sign)
@@ -1339,22 +1339,22 @@ struct derivedlambdakzeroanalysis {
13391339 // precalculate this information so that a check is one mask operation, not many
13401340 {
13411341 uint64_t bitMap = 0 ;
1342- bool isPositiveProton = v0.pdgCodePositive () == 2212 ;
1343- bool isPositivePion = v0.pdgCodePositive () == 211 || (doTreatPiToMuon && v0.pdgCodePositive () == - 13 );
1344- bool isNegativeProton = v0.pdgCodeNegative () == - 2212 ;
1345- bool isNegativePion = v0.pdgCodeNegative () == - 211 || (doTreatPiToMuon && v0.pdgCodeNegative () == 13 );
1342+ bool isPositiveProton = v0.pdgCodePositive () == PDG_t:: kProton ;
1343+ bool isPositivePion = v0.pdgCodePositive () == PDG_t:: kPiPlus || (doTreatPiToMuon && v0.pdgCodePositive () == PDG_t:: kMuonPlus );
1344+ bool isNegativeProton = v0.pdgCodeNegative () == PDG_t:: kProtonBar ;
1345+ bool isNegativePion = v0.pdgCodeNegative () == PDG_t:: kPiMinus || (doTreatPiToMuon && v0.pdgCodeNegative () == PDG_t:: kMuonMinus );
13461346
1347- if (v0.pdgCode () == 310 && isPositivePion && isNegativePion) {
1347+ if (v0.pdgCode () == PDG_t:: kK0Short && isPositivePion && isNegativePion) {
13481348 BITSET (bitMap, selConsiderK0Short);
13491349 if (v0.isPhysicalPrimary ())
13501350 BITSET (bitMap, selPhysPrimK0Short);
13511351 }
1352- if (v0.pdgCode () == 3122 && isPositiveProton && isNegativePion) {
1352+ if (v0.pdgCode () == PDG_t:: kLambda0 && isPositiveProton && isNegativePion) {
13531353 BITSET (bitMap, selConsiderLambda);
13541354 if (v0.isPhysicalPrimary ())
13551355 BITSET (bitMap, selPhysPrimLambda);
13561356 }
1357- if (v0.pdgCode () == - 3122 && isPositivePion && isNegativeProton) {
1357+ if (v0.pdgCode () == PDG_t:: kLambda0Bar && isPositivePion && isNegativeProton) {
13581358 BITSET (bitMap, selConsiderAntiLambda);
13591359 if (v0.isPhysicalPrimary ())
13601360 BITSET (bitMap, selPhysPrimAntiLambda);
@@ -1942,11 +1942,11 @@ struct derivedlambdakzeroanalysis {
19421942
19431943 // __________________________________________
19441944 if (verifyMask (selMap, secondaryMaskSelectionLambda) && analyseLambda) {
1945- if (v0mother.pdgCode () == 3312 && v0mother.isPhysicalPrimary ())
1945+ if (v0mother.pdgCode () == PDG_t:: kXiMinus && v0mother.isPhysicalPrimary ())
19461946 histos.fill (HIST (" h3dLambdaFeeddown" ), centrality, pt, std::hypot (v0mother.px (), v0mother.py ()));
19471947 }
19481948 if (verifyMask (selMap, secondaryMaskSelectionAntiLambda) && analyseAntiLambda) {
1949- if (v0mother.pdgCode () == - 3312 && v0mother.isPhysicalPrimary ())
1949+ if (v0mother.pdgCode () == PDG_t:: kXiPlus && v0mother.isPhysicalPrimary ())
19501950 histos.fill (HIST (" h3dAntiLambdaFeeddown" ), centrality, pt, std::hypot (v0mother.px (), v0mother.py ()));
19511951 }
19521952 }
@@ -2586,9 +2586,9 @@ struct derivedlambdakzeroanalysis {
25862586
25872587 float ptmc = RecoDecay::sqrtSumOfSquares (v0MC.pxPosMC () + v0MC.pxNegMC (), v0MC.pyPosMC () + v0MC.pyNegMC ());
25882588 float ymc = 1e-3 ;
2589- if (v0MC.pdgCode () == 310 )
2589+ if (v0MC.pdgCode () == PDG_t:: kK0Short )
25902590 ymc = RecoDecay::y (std::array{v0MC.pxPosMC () + v0MC.pxNegMC (), v0MC.pyPosMC () + v0MC.pyNegMC (), v0MC.pzPosMC () + v0MC.pzNegMC ()}, o2::constants::physics::MassKaonNeutral);
2591- else if (std::abs (v0MC.pdgCode ()) == 3122 )
2591+ else if (std::abs (v0MC.pdgCode ()) == PDG_t:: kLambda0 )
25922592 ymc = RecoDecay::y (std::array{v0MC.pxPosMC () + v0MC.pxNegMC (), v0MC.pyPosMC () + v0MC.pyNegMC (), v0MC.pzPosMC () + v0MC.pzNegMC ()}, o2::constants::physics::MassLambda);
25932593
25942594 uint64_t selMap = computeReconstructionBitmap (v0, collision, ymc, ymc, ptmc);
@@ -2653,9 +2653,9 @@ struct derivedlambdakzeroanalysis {
26532653
26542654 float ptmc = v0MC.ptMC ();
26552655 float ymc = 1e3 ;
2656- if (v0MC.pdgCode () == 310 )
2656+ if (v0MC.pdgCode () == PDG_t:: kK0Short )
26572657 ymc = v0MC.rapidityMC (0 );
2658- else if (std::abs (v0MC.pdgCode ()) == 3122 )
2658+ else if (std::abs (v0MC.pdgCode ()) == PDG_t:: kLambda0 )
26592659 ymc = v0MC.rapidityMC (1 );
26602660
26612661 if (std::abs (ymc) > v0Selections.rapidityCut )
@@ -2684,26 +2684,26 @@ struct derivedlambdakzeroanalysis {
26842684 centrality = eventSelections.useSPDTrackletsCent ? collision.centRun2SPDTracklets () : collision.centRun2V0M ();
26852685 }
26862686
2687- if (v0MC.pdgCode () == 310 ) {
2687+ if (v0MC.pdgCode () == PDG_t:: kK0Short ) {
26882688 histos.fill (HIST (" h2dGenK0ShortVsMultMC_RecoedEvt" ), mcCollision.multMCNParticlesEta05 (), ptmc);
26892689 }
2690- if (v0MC.pdgCode () == 3122 ) {
2690+ if (v0MC.pdgCode () == PDG_t:: kLambda0 ) {
26912691 histos.fill (HIST (" h2dGenLambdaVsMultMC_RecoedEvt" ), mcCollision.multMCNParticlesEta05 (), ptmc);
26922692 }
2693- if (v0MC.pdgCode () == - 3122 ) {
2693+ if (v0MC.pdgCode () == PDG_t:: kLambda0Bar ) {
26942694 histos.fill (HIST (" h2dGenAntiLambdaVsMultMC_RecoedEvt" ), mcCollision.multMCNParticlesEta05 (), ptmc);
26952695 }
26962696 }
26972697
2698- if (v0MC.pdgCode () == 310 ) {
2698+ if (v0MC.pdgCode () == PDG_t:: kK0Short ) {
26992699 histos.fill (HIST (" h2dGenK0Short" ), centrality, ptmc);
27002700 histos.fill (HIST (" h2dGenK0ShortVsMultMC" ), mcCollision.multMCNParticlesEta05 (), ptmc);
27012701 }
2702- if (v0MC.pdgCode () == 3122 ) {
2702+ if (v0MC.pdgCode () == PDG_t:: kLambda0 ) {
27032703 histos.fill (HIST (" h2dGenLambda" ), centrality, ptmc);
27042704 histos.fill (HIST (" h2dGenLambdaVsMultMC" ), mcCollision.multMCNParticlesEta05 (), ptmc);
27052705 }
2706- if (v0MC.pdgCode () == - 3122 ) {
2706+ if (v0MC.pdgCode () == PDG_t:: kLambda0Bar ) {
27072707 histos.fill (HIST (" h2dGenAntiLambda" ), centrality, ptmc);
27082708 histos.fill (HIST (" h2dGenAntiLambdaVsMultMC" ), mcCollision.multMCNParticlesEta05 (), ptmc);
27092709 }
@@ -2718,9 +2718,9 @@ struct derivedlambdakzeroanalysis {
27182718
27192719 float ptmc = cascMC.ptMC ();
27202720 float ymc = 1e3 ;
2721- if (std::abs (cascMC.pdgCode ()) == 3312 )
2721+ if (std::abs (cascMC.pdgCode ()) == PDG_t:: kXiMinus )
27222722 ymc = cascMC.rapidityMC (0 );
2723- else if (std::abs (cascMC.pdgCode ()) == 3334 )
2723+ else if (std::abs (cascMC.pdgCode ()) == PDG_t:: kOmegaMinus )
27242724 ymc = cascMC.rapidityMC (2 );
27252725
27262726 if (std::abs (ymc) > v0Selections.rapidityCut )
@@ -2749,33 +2749,33 @@ struct derivedlambdakzeroanalysis {
27492749 centrality = eventSelections.useSPDTrackletsCent ? collision.centRun2SPDTracklets () : collision.centRun2V0M ();
27502750 }
27512751
2752- if (cascMC.pdgCode () == 3312 ) {
2752+ if (cascMC.pdgCode () == PDG_t:: kXiMinus ) {
27532753 histos.fill (HIST (" h2dGenXiMinusVsMultMC_RecoedEvt" ), mcCollision.multMCNParticlesEta05 (), ptmc);
27542754 }
2755- if (cascMC.pdgCode () == - 3312 ) {
2755+ if (cascMC.pdgCode () == PDG_t:: kXiPlus ) {
27562756 histos.fill (HIST (" h2dGenXiPlusVsMultMC_RecoedEvt" ), mcCollision.multMCNParticlesEta05 (), ptmc);
27572757 }
2758- if (cascMC.pdgCode () == 3334 ) {
2758+ if (cascMC.pdgCode () == PDG_t:: kOmegaMinus ) {
27592759 histos.fill (HIST (" h2dGenOmegaMinusVsMultMC_RecoedEvt" ), mcCollision.multMCNParticlesEta05 (), ptmc);
27602760 }
2761- if (cascMC.pdgCode () == - 3334 ) {
2761+ if (cascMC.pdgCode () == PDG_t:: kOmegaPlus ) {
27622762 histos.fill (HIST (" h2dGenOmegaPlusVsMultMC_RecoedEvt" ), mcCollision.multMCNParticlesEta05 (), ptmc);
27632763 }
27642764 }
27652765
2766- if (cascMC.pdgCode () == 3312 ) {
2766+ if (cascMC.pdgCode () == PDG_t:: kXiMinus ) {
27672767 histos.fill (HIST (" h2dGenXiMinus" ), centrality, ptmc);
27682768 histos.fill (HIST (" h2dGenXiMinusVsMultMC" ), mcCollision.multMCNParticlesEta05 (), ptmc);
27692769 }
2770- if (cascMC.pdgCode () == - 3312 ) {
2770+ if (cascMC.pdgCode () == PDG_t:: kXiPlus ) {
27712771 histos.fill (HIST (" h2dGenXiPlus" ), centrality, ptmc);
27722772 histos.fill (HIST (" h2dGenXiPlusVsMultMC" ), mcCollision.multMCNParticlesEta05 (), ptmc);
27732773 }
2774- if (cascMC.pdgCode () == 3334 ) {
2774+ if (cascMC.pdgCode () == PDG_t:: kOmegaMinus ) {
27752775 histos.fill (HIST (" h2dGenOmegaMinus" ), centrality, ptmc);
27762776 histos.fill (HIST (" h2dGenOmegaMinusVsMultMC" ), mcCollision.multMCNParticlesEta05 (), ptmc);
27772777 }
2778- if (cascMC.pdgCode () == - 3334 ) {
2778+ if (cascMC.pdgCode () == PDG_t:: kOmegaPlus ) {
27792779 histos.fill (HIST (" h2dGenOmegaPlus" ), centrality, ptmc);
27802780 histos.fill (HIST (" h2dGenOmegaPlusVsMultMC" ), mcCollision.multMCNParticlesEta05 (), ptmc);
27812781 }
0 commit comments