1616#ifndef PWGUD_CORE_UPCPAIRCUTS_H_
1717#define PWGUD_CORE_UPCPAIRCUTS_H_
1818
19- #include < cmath >
19+ #include " PWGUD/Core/UPCTauCentralBarrelHelperRL.h "
2020
21- #include " Framework/Logger.h"
22- #include " Framework/HistogramRegistry.h"
2321#include " CommonConstants/MathConstants.h"
2422#include " CommonConstants/PhysicsConstants.h"
23+ #include " Framework/HistogramRegistry.h"
24+ #include " Framework/Logger.h"
2525
26- #include " PWGUD/Core/UPCTauCentralBarrelHelperRL.h"
27-
28- using namespace o2 ;
29- using namespace o2 ::framework;
30- using namespace constants ::math;
26+ #include < cmath>
3127
3228class UPCPairCuts
3329{
@@ -39,14 +35,14 @@ class UPCPairCuts
3935 Rho,
4036 ParticlesLastEntry };
4137
42- void setHistogramRegistry (HistogramRegistry* registry) { histogramRegistry = registry; }
38+ void setHistogramRegistry (o2::framework:: HistogramRegistry* registry) { histogramRegistry = registry; }
4339
4440 void setPairCut (Particle particle, float cut)
4541 {
4642 LOGF (info, " Enabled pair cut for %d with value %f" , static_cast <int >(particle), cut);
4743 mCuts [particle] = cut;
4844 if (histogramRegistry != nullptr && histogramRegistry->contains (HIST (" ControlConvResonances" )) == false ) {
49- histogramRegistry->add (" ControlConvResonances" , " " , {HistType::kTH2F , {{6 , -0.5 , 5.5 , " id" }, {500 , -0.5 , 0.5 , " delta mass" }}});
45+ histogramRegistry->add (" ControlConvResonances" , " " , {o2::framework:: HistType::kTH2F , {{6 , -0.5 , 5.5 , " id" }, {500 , -0.5 , 0.5 , " delta mass" }}});
5046 }
5147 }
5248
@@ -57,7 +53,7 @@ class UPCPairCuts
5753 mTwoTrackRadius = radius;
5854
5955 if (histogramRegistry != nullptr && histogramRegistry->contains (HIST (" TwoTrackDistancePt_0" )) == false ) {
60- histogramRegistry->add (" TwoTrackDistancePt_0" , " " , {HistType::kTH3F , {{100 , -0.15 , 0.15 , " #Delta#eta" }, {100 , -0.05 , 0.05 , " #Delta#varphi^{*}_{min}" }, {20 , 0 , 10 , " #Delta p_{T}" }}});
56+ histogramRegistry->add (" TwoTrackDistancePt_0" , " " , {o2::framework:: HistType::kTH3F , {{100 , -0.15 , 0.15 , " #Delta#eta" }, {100 , -0.05 , 0.05 , " #Delta#varphi^{*}_{min}" }, {20 , 0 , 10 , " #Delta p_{T}" }}});
6157 histogramRegistry->addClone (" TwoTrackDistancePt_0" , " TwoTrackDistancePt_1" );
6258 }
6359 }
@@ -74,7 +70,7 @@ class UPCPairCuts
7470 float mTwoTrackRadius = 0 .8f ; // radius at which the two track cuts are applied
7571 int magField = 5 ; // magField: B field in kG
7672
77- HistogramRegistry* histogramRegistry = nullptr ; // if set, control histograms are stored here
73+ o2::framework:: HistogramRegistry* histogramRegistry = nullptr ; // if set, control histograms are stored here
7874
7975 template <typename T>
8076 bool conversionCut (T const & track1, T const & track2, Particle conv, double cut);
@@ -290,20 +286,20 @@ double UPCPairCuts::getInvMassSquaredFast(T const& track1, double m0_1, T const&
290286
291287 // fold onto 0...pi
292288 float deltaPhi = std::fabs (phi1 - phi2);
293- while (deltaPhi > TwoPI) {
294- deltaPhi -= TwoPI;
289+ while (deltaPhi > o2::constants::math:: TwoPI) {
290+ deltaPhi -= o2::constants::math:: TwoPI;
295291 }
296- if (deltaPhi > PI) {
297- deltaPhi = TwoPI - deltaPhi;
292+ if (deltaPhi > o2::constants::math:: PI) {
293+ deltaPhi = o2::constants::math:: TwoPI - deltaPhi;
298294 }
299295
300296 float cosDeltaPhi = 0 ;
301- if (deltaPhi < PI / 3 .0f ) {
297+ if (deltaPhi < o2::constants::math:: PI / 3 .0f ) {
302298 cosDeltaPhi = 1.0 - deltaPhi * deltaPhi / 2 + deltaPhi * deltaPhi * deltaPhi * deltaPhi / 24 ;
303- } else if (deltaPhi < 2 .0f * PI / 3 .0f ) {
304- cosDeltaPhi = -(deltaPhi - PI / 2 ) + 1.0 / 6 * std::pow ((deltaPhi - PI / 2 ), 3 );
299+ } else if (deltaPhi < 2 .0f * o2::constants::math:: PI / 3 .0f ) {
300+ cosDeltaPhi = -(deltaPhi - o2::constants::math:: PI / 2 ) + 1.0 / 6 * std::pow ((deltaPhi - o2::constants::math:: PI / 2 ), 3 );
305301 } else {
306- cosDeltaPhi = -1 .0f + 1 .0f / 2 .0f * (deltaPhi - PI) * (deltaPhi - PI) - 1 .0f / 24 .0f * std::pow (deltaPhi - PI, 4 .0f );
302+ cosDeltaPhi = -1 .0f + 1 .0f / 2 .0f * (deltaPhi - o2::constants::math:: PI) * (deltaPhi - o2::constants::math:: PI) - 1 .0f / 24 .0f * std::pow (deltaPhi - o2::constants::math:: PI, 4 .0f );
307303 }
308304
309305 double mass2 = m0_1 * m0_1 + m0_2 * m0_2 + 2 .0f * (std::sqrt (e1squ * e2squ) - (pt1 * pt2 * (cosDeltaPhi + 1 .0f / tantheta1 / tantheta2)));
@@ -330,14 +326,14 @@ float UPCPairCuts::getDPhiStar(T const& track1, T const& track2, float radius, i
330326
331327 float dphistar = phi1 - phi2 - charge1 * std::asin (0.015 * magField * radius / pt1) + charge2 * std::asin (0.015 * magField * radius / pt2);
332328
333- if (dphistar > PI) {
334- dphistar = TwoPI - dphistar;
329+ if (dphistar > o2::constants::math:: PI) {
330+ dphistar = o2::constants::math:: TwoPI - dphistar;
335331 }
336- if (dphistar < -PI) {
337- dphistar = -TwoPI - dphistar;
332+ if (dphistar < -o2::constants::math:: PI) {
333+ dphistar = -o2::constants::math:: TwoPI - dphistar;
338334 }
339- if (dphistar > PI) { // might look funny but is needed
340- dphistar = TwoPI - dphistar;
335+ if (dphistar > o2::constants::math:: PI) { // might look funny but is needed
336+ dphistar = o2::constants::math:: TwoPI - dphistar;
341337 }
342338
343339 return dphistar;
0 commit comments