@@ -248,7 +248,7 @@ struct lfNucleiBATask {
248248 // ITS to TPC - Fake hit loop
249249 static constexpr int IntFakeLoop = 10 ; // Fixed O2Linter error
250250 // TPC low/high momentum range
251- static constexpr float CfgTpcClasses[] = {0 .5f , 1 .5f };
251+ static constexpr std::array< float , 2 > CfgTpcClasses = {0 .5f , 1 .5f };
252252 static constexpr float CfgKaonCut = 5 .f;
253253
254254 // PDG codes and masses used in this analysis
@@ -352,7 +352,7 @@ struct lfNucleiBATask {
352352 const AxisSpec avClsAxis{avClsBins, " <ITS Cls. Size>" };
353353 const AxisSpec avClsEffAxis{avClsBins, " <ITS Cls. Size> / cosh(#eta)" };
354354
355- if (((doprocessData == true ) || (doprocessDataLfPid == true )) && ((doprocessMCReco == true ) || (doprocessMCRecoLfPid == true ) || (doprocessMCGen == true ))) {
355+ if (((doprocessData) || (doprocessDataLfPid)) && ((doprocessMCReco) || (doprocessMCRecoLfPid) || (doprocessMCGen))) {
356356 LOG (fatal) << " Can't enable processData and processMCReco in the same time, pick one!" ;
357357 }
358358 if (enablePtShiftHe && enablePtShiftPID) {
@@ -2537,17 +2537,22 @@ struct lfNucleiBATask {
25372537 // Init all temp variables inside the track loop
25382538 float gamma = 0 .;
25392539
2540- float DPt = track.pt ();
2541- float antiDPt = track.pt ();
2540+ // Deuteron and helium pt init, before applying shift
2541+ const float trackPt = track.pt ();
2542+ const float trackP = track.p ();
2543+ const float trackTPCmomentum = track.tpcInnerParam ();
25422544
2543- float hePt = track. pt () ;
2544- float antihePt = track. pt () ;
2545+ float DPt = trackPt ;
2546+ float antiDPt = trackPt ;
25452547
2546- float heP = track. p () ;
2547- float antiheP = track. p () ;
2548+ float hePt = trackPt ;
2549+ float antihePt = trackPt ;
25482550
2549- float heTPCmomentum = track.tpcInnerParam ();
2550- float antiheTPCmomentum = track.tpcInnerParam ();
2551+ float heP = trackP;
2552+ float antiheP = trackP;
2553+
2554+ float heTPCmomentum = trackTPCmomentum;
2555+ float antiheTPCmomentum = trackTPCmomentum;
25512556
25522557 float massTOF = -99 .f , massTOFhe = -99 .f , massTOFantihe = -99 .f ;
25532558
@@ -2821,6 +2826,8 @@ struct lfNucleiBATask {
28212826 passDCAxyCutAntiHe = dcaXY2 / std::pow (parDCAxy[3 ] * (parDCAxy[0 ] + parDCAxy[1 ] / std::pow (antihePt, parDCAxy[2 ])), 2 ) + dcaZ2 / std::pow (parDCAz[3 ] * (parDCAz[0 ] + parDCAz[1 ] / std::pow (antihePt, parDCAz[2 ])), 2 ) <= 1 ;
28222827 passDCAzCutAntiHe = dcaXY2 / std::pow (parDCAxy[3 ] * (parDCAxy[0 ] + parDCAxy[1 ] / std::pow (antihePt, parDCAxy[2 ])), 2 ) + dcaZ2 / std::pow (parDCAz[3 ] * (parDCAz[0 ] + parDCAz[1 ] / std::pow (antihePt, parDCAz[2 ])), 2 ) <= 1 ;
28232828 break ;
2829+ default :
2830+ break ;
28242831 }
28252832
28262833 // Rapidity cuts
@@ -3564,20 +3571,20 @@ struct lfNucleiBATask {
35643571 histos.fill (HIST (" tracks/proton/dca/before/hNumMothers" ), nSaved);
35653572 if (nSaved > 0 ) {
35663573 for (int iMom = 0 ; iMom < nSaved; iMom++) {
3567- int pdgMom = pdgMomList[iMom];
3568- float pdgSign = (pdgMom > 0 ) ? 1.0 : -1.0 ;
3569- float ptMom = ptMomList[iMom];
3574+ const int pdgMomCurrent = pdgMomList[iMom];
3575+ const float pdgSign = (pdgMomCurrent > 0 ) ? 1 .0f : -1 .0f ;
3576+ const float ptMomCurrent = ptMomList[iMom];
35703577 int motherSpeciesBin = -1 ;
3571- if (pdgMom != -1 ) {
3578+ if (pdgMomCurrent != -1 ) {
35723579 motherSpeciesBin = 0 ;
35733580 for (int j = 0 ; j < NumMotherList; j++) {
3574- if (std::abs (PdgMotherList[j]) == std::abs (pdgMom )) {
3581+ if (std::abs (PdgMotherList[j]) == std::abs (pdgMomCurrent )) {
35753582 motherSpeciesBin = j + 1 ;
35763583 break ;
35773584 }
35783585 }
35793586 }
3580- histos.fill (HIST (" tracks/proton/dca/before/hMomTrueMaterial" ), pdgSign, motherSpeciesBin, ptMom );
3587+ histos.fill (HIST (" tracks/proton/dca/before/hMomTrueMaterial" ), pdgSign, motherSpeciesBin, ptMomCurrent );
35813588 }
35823589 }
35833590 }
@@ -3657,20 +3664,20 @@ struct lfNucleiBATask {
36573664 histos.fill (HIST (" tracks/deuteron/dca/before/hNumMothers" ), nSaved);
36583665 if (nSaved > 0 ) {
36593666 for (int iMom = 0 ; iMom < nSaved; iMom++) {
3660- int pdgMom = pdgMomList[iMom];
3661- float pdgSign = (pdgMom > 0 ) ? 1.0 : -1.0 ;
3662- float ptMom = ptMomList[iMom];
3667+ const int pdgMomCurrent = pdgMomList[iMom];
3668+ const float pdgSign = (pdgMomCurrent > 0 ) ? 1 .0f : -1 .0f ;
3669+ const float ptMomCurrent = ptMomList[iMom];
36633670 int motherSpeciesBin = -1 ;
3664- if (pdgMom != -1 ) {
3671+ if (pdgMomCurrent != -1 ) {
36653672 motherSpeciesBin = 0 ;
36663673 for (int j = 0 ; j < NumMotherList; j++) {
3667- if (std::abs (PdgMotherList[j]) == std::abs (pdgMom )) {
3674+ if (std::abs (PdgMotherList[j]) == std::abs (pdgMomCurrent )) {
36683675 motherSpeciesBin = j + 1 ;
36693676 break ;
36703677 }
36713678 }
36723679 }
3673- histos.fill (HIST (" tracks/deuteron/dca/before/hMomTrueMaterial" ), pdgSign, motherSpeciesBin, ptMom );
3680+ histos.fill (HIST (" tracks/deuteron/dca/before/hMomTrueMaterial" ), pdgSign, motherSpeciesBin, ptMomCurrent );
36743681 }
36753682 }
36763683 }
@@ -3803,20 +3810,20 @@ struct lfNucleiBATask {
38033810 histos.fill (HIST (" tracks/helium/dca/before/hNumMothers" ), nSaved);
38043811 if (nSaved > 0 ) {
38053812 for (int iMom = 0 ; iMom < nSaved; iMom++) {
3806- int pdgMom = pdgMomList[iMom];
3807- float pdgSign = (pdgMom > 0 ) ? 1.0 : -1.0 ;
3808- float ptMom = ptMomList[iMom];
3813+ const int pdgMomCurrent = pdgMomList[iMom];
3814+ const float pdgSign = (pdgMomCurrent > 0 ) ? 1 .0f : -1 .0f ;
3815+ const float ptMomCurrent = ptMomList[iMom];
38093816 int motherSpeciesBin = -1 ;
3810- if (pdgMom != -1 ) {
3817+ if (pdgMomCurrent != -1 ) {
38113818 motherSpeciesBin = 0 ;
38123819 for (int j = 0 ; j < NumMotherList; j++) {
3813- if (std::abs (PdgMotherList[j]) == std::abs (pdgMom )) {
3820+ if (std::abs (PdgMotherList[j]) == std::abs (pdgMomCurrent )) {
38143821 motherSpeciesBin = j + 1 ;
38153822 break ;
38163823 }
38173824 }
38183825 }
3819- histos.fill (HIST (" tracks/helium/dca/before/hMomTrueMaterial" ), pdgSign, motherSpeciesBin, ptMom );
3826+ histos.fill (HIST (" tracks/helium/dca/before/hMomTrueMaterial" ), pdgSign, motherSpeciesBin, ptMomCurrent );
38203827 }
38213828 }
38223829 }
@@ -4300,6 +4307,8 @@ struct lfNucleiBATask {
43004307 histos.fill (HIST (" tracks/proton/h2ProtonVspTNSigmaTPC" ), track.pt (), track.tpcNSigmaPr ());
43014308 }
43024309 break ;
4310+ default :
4311+ break ;
43034312 }
43044313 }
43054314 if (enableTr && trRapCut) {
@@ -4326,6 +4335,8 @@ struct lfNucleiBATask {
43264335 histos.fill (HIST (" tracks/proton/h2antiProtonVspTNSigmaTPC" ), track.pt (), track.tpcNSigmaPr ());
43274336 }
43284337 break ;
4338+ default :
4339+ break ;
43294340 }
43304341 }
43314342 if (enableTr && trRapCut) {
@@ -4511,6 +4522,8 @@ struct lfNucleiBATask {
45114522 histos.fill (HIST (" tracks/proton/h2antiProtonVspTNSigmaTOF" ), track.pt (), track.tofNSigmaPr ());
45124523 }
45134524 break ;
4525+ default :
4526+ break ;
45144527 }
45154528 if (outFlagOptions.enableExpSignalTOF )
45164529 histos.fill (HIST (" tracks/proton/h2antiProtonTOFExpSignalDiffVsPt" ), track.pt (), track.tofExpSignalDiffPr ());
@@ -4663,6 +4676,8 @@ struct lfNucleiBATask {
46634676 histos.fill (HIST (" tracks/deuteron/h2DeuteronVspTNSigmaTPC" ), DPt, track.tpcNSigmaDe ());
46644677 }
46654678 break ;
4679+ default :
4680+ break ;
46664681 }
46674682 }
46684683 if (isAntiDeWoTPCpid) {
@@ -4743,6 +4758,8 @@ struct lfNucleiBATask {
47434758 histos.fill (HIST (" tracks/deuteron/h2DeuteronVspTNSigmaTOF" ), DPt, track.tofNSigmaDe ());
47444759 }
47454760 break ;
4761+ default :
4762+ break ;
47464763 }
47474764 if (outFlagOptions.enableExpSignalTOF )
47484765 histos.fill (HIST (" tracks/deuteron/h2DeuteronTOFExpSignalDiffVsPt" ), DPt, track.tofExpSignalDiffDe ());
@@ -4763,6 +4780,8 @@ struct lfNucleiBATask {
47634780 histos.fill (HIST (" tracks/deuteron/h2antiDeuteronVspTNSigmaTOF" ), antiDPt, track.tofNSigmaDe ());
47644781 }
47654782 break ;
4783+ default :
4784+ break ;
47664785 }
47674786 if (outFlagOptions.enableExpSignalTOF )
47684787 histos.fill (HIST (" tracks/deuteron/h2antiDeuteronTOFExpSignalDiffVsPt" ), antiDPt, track.tofExpSignalDiffDe ());
@@ -4877,6 +4896,8 @@ struct lfNucleiBATask {
48774896 histos.fill (HIST (" tracks/h2TOFbetaVsP" ), track.p () / (1 .f * track.sign ()), track.beta ());
48784897 }
48794898 break ;
4899+ default :
4900+ break ;
48804901 }
48814902 }
48824903
@@ -5047,6 +5068,11 @@ struct lfNucleiBATask {
50475068 massTOFhe = heP * std::sqrt (1 .f / (track.beta () * track.beta ()) - 1 .f );
50485069 massTOFantihe = antiheP * std::sqrt (1 .f / (track.beta () * track.beta ()) - 1 .f );
50495070 break ;
5071+ default :
5072+ massTOF = -99 .f ;
5073+ massTOFhe = -99 .f ;
5074+ massTOFantihe = -99 .f ;
5075+ break ;
50505076 }
50515077 if (passDCAxyzCut && outFlagOptions.doTOFplots && outFlagOptions.enablePIDplot )
50525078 histos.fill (HIST (" tracks/h2TPCsignVsBetaGamma" ), (track.beta () * gamma) / (1 .f * track.sign ()), track.tpcSignal ());
@@ -6841,6 +6867,8 @@ struct lfNucleiBATask {
68416867 if (isMCSel8Event)
68426868 evLossHistos.fill (HIST (" evLoss/pt/hAntiHeliumTriggeredMCSel8" ), pt);
68436869 break ;
6870+ default :
6871+ break ;
68446872 }
68456873 }
68466874 }
0 commit comments