1111
1212#include " PWGLF/Utils/inelGt.h"
1313
14+ #include " Common/Constants/MathConstants.h"
1415#include " Common/Constants/PhysicsConstants.h"
1516#include " Common/Core/TrackSelection.h"
1617#include " Common/Core/TrackSelectionDefaults.h"
@@ -46,6 +47,7 @@ using namespace o2;
4647using namespace o2 ::framework;
4748using namespace o2 ::framework::expressions;
4849using namespace o2 ::constants::physics;
50+ using namespace o2 ::constants::math;
4951using BCsRun3 = soa::Join<aod::BCs, aod::Timestamps, aod::BcSels,
5052 aod::Run3MatchedToBCSparse>;
5153
@@ -191,7 +193,10 @@ struct MultiplicityPt {
191193 if (!passesCutWoDCA (track)) {
192194 return false ;
193195 }
194- const float maxDcaXY = maxDcaXYFactor.value * (0 .0105f + 0 .0350f / std::pow (track.pt (), 1 .1f ));
196+ constexpr float dcaXYConst = 0 .0105f ;
197+ constexpr float dcaXYPtScale = 0 .0350f ;
198+ constexpr float dcaXYPtPower = 1 .1f ;
199+ const float maxDcaXY = maxDcaXYFactor.value * (dcaXYConst + dcaXYPtScale / std::pow (track.pt (), dcaXYPtPower));
195200 if (std::abs (track.dcaXY ()) > maxDcaXY) {
196201 return false ;
197202 }
@@ -249,8 +254,8 @@ struct MultiplicityPt {
249254 float nsigmaKa = std::abs (track.tpcNSigmaKa ());
250255 float nsigmaPr = std::abs (track.tpcNSigmaPr ());
251256
252- // Find the hypothesis with smallest |nσ| that passes the cut
253- float minNSigma = 999 . 0f ;
257+ constexpr float largeNSigmaValue = 999 . 0f ;
258+ float minNSigma = largeNSigmaValue ;
254259 int bestSpecies = -1 ;
255260
256261 if (nsigmaPi < cfgCutNsigma.value && nsigmaPi < minNSigma) {
@@ -540,10 +545,10 @@ void MultiplicityPt::init(InitContext const&)
540545 }
541546 }
542547
543- // ========================================================================
544- // MONITORING HISTOGRAMS
545- // ========================================================================
546- ue.add (" evsel" , " Event selection" , HistType::kTH1D , {{20 , 0.5 , 20.5 }});
548+ constexpr int nEvSelBins = 20 ;
549+ constexpr float evSelMin = 0 . 5f ;
550+ constexpr float evSelMax = 20 . 5f ;
551+ ue.add (" evsel" , " Event selection" , HistType::kTH1D , {{nEvSelBins, evSelMin, evSelMax }});
547552 auto h = ue.get <TH1>(HIST (" evsel" ));
548553 h->GetXaxis ()->SetBinLabel (1 , " Events read" );
549554 h->GetXaxis ()->SetBinLabel (2 , " INEL>0" );
@@ -559,7 +564,7 @@ void MultiplicityPt::init(InitContext const&)
559564 h->GetXaxis ()->SetBinLabel (15 , " INEL>1 (final)" );
560565
561566 ue.add (" hEta" , " Track eta;#eta;Counts" , HistType::kTH1D , {{20 , -0.8 , 0.8 }});
562- ue.add (" hPhi" , " Track phi;#varphi (rad);Counts" , HistType::kTH1D , {{64 , 0 , 2.0 * o2::constants::math::PI }});
567+ ue.add (" hPhi" , " Track phi;#varphi (rad);Counts" , HistType::kTH1D , {{64 , 0 , TwoPI }});
563568 ue.add (" hvtxZ" , " Vertex Z (data);Vertex Z (cm);Events" , HistType::kTH1F , {{40 , -20.0 , 20.0 }});
564569 ue.add (" hvtxZmc" , " MC vertex Z;Vertex Z (cm);Events" , HistType::kTH1F , {{40 , -20.0 , 20.0 }});
565570
0 commit comments