Skip to content

Commit bf33581

Browse files
committed
resolving o2 linter issues
1 parent d816a8b commit bf33581

File tree

2 files changed

+28
-26
lines changed

2 files changed

+28
-26
lines changed

PWGUD/Core/UPCPairCuts.h

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99
// granted to it by virtue of its status as an Intergovernmental Organization
1010
// or submit itself to any jurisdiction.
1111

12+
// Functions which cut on particle pairs (decays, conversions, two-track cuts) adapted for data from UD tables
13+
// Based on the code "PWGCF/Core/PairCuts.h" made by Jan Fiete Grosse-Oetringhaus
14+
// Author:
15+
1216
#ifndef PWGUD_CORE_UPCPAIRCUTS_H_
1317
#define PWGUD_CORE_UPCPAIRCUTS_H_
1418

@@ -17,13 +21,10 @@
1721
#include "Framework/Logger.h"
1822
#include "Framework/HistogramRegistry.h"
1923
#include "CommonConstants/MathConstants.h"
24+
#include "CommonConstants/PhysicsConstants.h"
2025

2126
#include "PWGUD/Core/UPCTauCentralBarrelHelperRL.h"
2227

23-
// Functions which cut on particle pairs (decays, conversions, two-track cuts) adapted for data from UD tables
24-
// Based on the code "PWGCF/Core/PairCuts.h" made by Jan Fiete Grosse-Oetringhaus
25-
// Author:
26-
2728
using namespace o2;
2829
using namespace o2::framework;
2930
using namespace constants::math;
@@ -38,9 +39,9 @@ class UPCPairCuts
3839
Rho,
3940
ParticlesLastEntry };
4041

41-
void SetHistogramRegistry(HistogramRegistry* registry) { histogramRegistry = registry; }
42+
void setHistogramRegistry(HistogramRegistry* registry) { histogramRegistry = registry; }
4243

43-
void SetPairCut(Particle particle, float cut)
44+
void setPairCut(Particle particle, float cut)
4445
{
4546
LOGF(info, "Enabled pair cut for %d with value %f", static_cast<int>(particle), cut);
4647
mCuts[particle] = cut;
@@ -49,7 +50,7 @@ class UPCPairCuts
4950
}
5051
}
5152

52-
void SetTwoTrackCuts(float distance = 0.02f, float radius = 0.8f)
53+
void setTwoTrackCuts(float distance = 0.02f, float radius = 0.8f)
5354
{
5455
LOGF(info, "Enabled two-track cut with distance %f and radius %f", distance, radius);
5556
mTwoTrackDistance = distance;
@@ -176,28 +177,28 @@ bool UPCPairCuts::conversionCut(T const& track1, T const& track2, Particle conv,
176177

177178
switch (conv) {
178179
case Photon:
179-
massD1 = 0.51e-3;
180-
massD2 = 0.51e-3;
180+
massD1 = o2::constants::physics::MassElectron;
181+
massD2 = o2::constants::physics::MassElectron;
181182
massM = 0;
182183
break;
183184
case K0:
184-
massD1 = 0.1396;
185-
massD2 = 0.1396;
186-
massM = 0.4976;
185+
massD1 = o2::constants::physics::MassPiPlus;
186+
massD2 = o2::constants::physics::MassPiPlus;
187+
massM = o2::constants::physics::MassK0;
187188
break;
188189
case Lambda:
189-
massD1 = 0.9383;
190-
massD2 = 0.1396;
191-
massM = 1.115;
190+
massD1 = o2::constants::physics::MassProton;
191+
massD2 = o2::constants::physics::MassPiPlus;
192+
massM = o2::constants::physics::MassLambda0;
192193
break;
193194
case Phi:
194-
massD1 = 0.4937;
195-
massD2 = 0.4937;
196-
massM = 1.019;
195+
massD1 = o2::constants::physics::MassKPlus;
196+
massD2 = o2::constants::physics::MassKPlus;
197+
massM = o2::constants::physics::MassPhi;
197198
break;
198199
case Rho:
199-
massD1 = 0.1396;
200-
massD2 = 0.1396;
200+
massD1 = o2::constants::physics::MassPiPlus;
201+
massD2 = o2::constants::physics::MassPiPlus;
201202
massM = 0.770;
202203
break;
203204
default:

PWGUD/Tasks/upcPhotonuclearAnalysisJMG.cxx

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
///
1212
/// \brief
1313
/// \author Josué Martínez García, josuem@cern.ch
14+
/// \file upcPhotonuclearAnalysisJMG.cxx
1415

1516
#include "Framework/AnalysisDataModel.h"
1617
#include "Framework/AnalysisTask.h"
@@ -156,14 +157,14 @@ struct upcPhotonuclearAnalysisJMG {
156157

157158
const int maxMixBin = axisMultiplicity->size() * axisVertex->size();
158159
histos.add("eventcount", "bin", {HistType::kTH1F, {{maxMixBin + 2, -2.5, -0.5 + maxMixBin, "bin"}}});
159-
mPairCuts.SetHistogramRegistry(&histos);
160+
mPairCuts.setHistogramRegistry(&histos);
160161
if (cfgPairCut->get("Photon") > 0 || cfgPairCut->get("K0") > 0 || cfgPairCut->get("Lambda") > 0 ||
161162
cfgPairCut->get("Phi") > 0 || cfgPairCut->get("Rho") > 0) {
162-
mPairCuts.SetPairCut(UPCPairCuts::Photon, cfgPairCut->get("Photon"));
163-
mPairCuts.SetPairCut(UPCPairCuts::K0, cfgPairCut->get("K0"));
164-
mPairCuts.SetPairCut(UPCPairCuts::Lambda, cfgPairCut->get("Lambda"));
165-
mPairCuts.SetPairCut(UPCPairCuts::Phi, cfgPairCut->get("Phi"));
166-
mPairCuts.SetPairCut(UPCPairCuts::Rho, cfgPairCut->get("Rho"));
163+
mPairCuts.setPairCut(UPCPairCuts::Photon, cfgPairCut->get("Photon"));
164+
mPairCuts.setPairCut(UPCPairCuts::K0, cfgPairCut->get("K0"));
165+
mPairCuts.setPairCut(UPCPairCuts::Lambda, cfgPairCut->get("Lambda"));
166+
mPairCuts.setPairCut(UPCPairCuts::Phi, cfgPairCut->get("Phi"));
167+
mPairCuts.setPairCut(UPCPairCuts::Rho, cfgPairCut->get("Rho"));
167168
doPairCuts = true;
168169
}
169170
histos.add("Events/hCountCollisions", "0 total - 1 side A - 2 side C - 3 both side; Number of analysed collision; counts", kTH1F, {axisCollision});

0 commit comments

Comments
 (0)