Skip to content

Commit f79ba4c

Browse files
committed
Please consider the following formatting changes
1 parent 7114730 commit f79ba4c

2 files changed

Lines changed: 38 additions & 37 deletions

File tree

PWGUD/Core/UPCPairCuts.h

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,17 @@ using namespace constants::math;
3030

3131
class UPCPairCuts
3232
{
33-
public:
34-
enum Particle { Photon = 0,
33+
public:
34+
enum Particle { Photon = 0,
3535
K0,
3636
Lambda,
3737
Phi,
3838
Rho,
3939
ParticlesLastEntry };
4040

41-
void SetHistogramRegistry(HistogramRegistry* registry) { histogramRegistry = registry; }
41+
void SetHistogramRegistry(HistogramRegistry* registry) { histogramRegistry = registry; }
4242

43-
void SetPairCut(Particle particle, float cut)
43+
void SetPairCut(Particle particle, float cut)
4444
{
4545
LOGF(info, "Enabled pair cut for %d with value %f", static_cast<int>(particle), cut);
4646
mCuts[particle] = cut;
@@ -66,11 +66,12 @@ class UPCPairCuts
6666

6767
template <typename T>
6868
bool twoTrackCut(T const& track1, T const& track2);
69-
protected:
69+
70+
protected:
7071
float mCuts[ParticlesLastEntry] = {-1};
7172
float mTwoTrackDistance = -1; // distance below which the pair is flagged as to be removed
7273
float mTwoTrackRadius = 0.8f; // radius at which the two track cuts are applied
73-
int magField = 5; // magField: B field in kG
74+
int magField = 5; // magField: B field in kG
7475

7576
HistogramRegistry* histogramRegistry = nullptr; // if set, control histograms are stored here
7677

@@ -149,7 +150,7 @@ bool UPCPairCuts::twoTrackCut(T const& track1, T const& track2)
149150
}
150151

151152
if (dphistarminabs < mTwoTrackDistance && std::fabs(deta) < mTwoTrackDistance) {
152-
//LOGF(debug, "Removed track pair %ld %ld with %f %f %f %f %d %f %f %d %d", track1.index(), track2.index(), deta, dphistarminabs, track1.phi2(), track1.pt(), track1.sign(), track2.phi2(), track2.pt(), track2.sign(), magField);
153+
// LOGF(debug, "Removed track pair %ld %ld with %f %f %f %f %d %f %f %d %d", track1.index(), track2.index(), deta, dphistarminabs, track1.phi2(), track1.pt(), track1.sign(), track2.phi2(), track2.pt(), track2.sign(), magField);
153154
return true;
154155
}
155156

@@ -165,7 +166,7 @@ bool UPCPairCuts::twoTrackCut(T const& track1, T const& track2)
165166
template <typename T>
166167
bool UPCPairCuts::conversionCut(T const& track1, T const& track2, Particle conv, double cut)
167168
{
168-
//LOGF(info, "pt is %f %f", track1.pt(), track2.pt());
169+
// LOGF(info, "pt is %f %f", track1.pt(), track2.pt());
169170

170171
if (cut < 0) {
171172
return false;
@@ -306,7 +307,7 @@ double UPCPairCuts::getInvMassSquaredFast(T const& track1, double m0_1, T const&
306307

307308
double mass2 = m0_1 * m0_1 + m0_2 * m0_2 + 2.0f * (std::sqrt(e1squ * e2squ) - (pt1 * pt2 * (cosDeltaPhi + 1.0f / tantheta1 / tantheta2)));
308309

309-
//LOGF(debug, "%f %f %f %f %f %f %f %f %f", pt1, eta1, phi1, pt2, eta2, phi2, m0_1, m0_2, mass2);
310+
// LOGF(debug, "%f %f %f %f %f %f %f %f %f", pt1, eta1, phi1, pt2, eta2, phi2, m0_1, m0_2, mass2);
310311

311312
return mass2;
312313
}
@@ -341,4 +342,4 @@ float UPCPairCuts::getDPhiStar(T const& track1, T const& track2, float radius, i
341342
return dphistar;
342343
}
343344

344-
#endif
345+
#endif

Tutorials/PWGCF/TwoParticleCorrelations/src/firstcfcorrelations.cxx

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -39,20 +39,20 @@ struct firstcorrelations {
3939
Configurable<float> cfgPtCutMax = {"maxpt", 10.0, "Maximum accepted track pT. Default 5.0 GeV"};
4040
Configurable<float> cfgEtaCut = {"etacut", 0.8, "Eta cut. Default 0.8"};
4141
Configurable<LabeledArray<float>> cfgPairCut{"cfgPairCut",
42-
{cfgPairCutDefaults[0],
43-
5,
44-
{"Photon", "K0", "Lambda", "Phi", "Rho"}},
45-
"Pair cuts on various particles"};
46-
//Configurable<float> cfgTwoTrackCut{"cfgTwoTrackCut", -1, {"Two track cut"}};
42+
{cfgPairCutDefaults[0],
43+
5,
44+
{"Photon", "K0", "Lambda", "Phi", "Rho"}},
45+
"Pair cuts on various particles"};
46+
// Configurable<float> cfgTwoTrackCut{"cfgTwoTrackCut", -1, {"Two track cut"}};
4747
ConfigurableAxis axisVertex{"axisVertex", {7, -7, 7}, "vertex axis for histograms"};
4848
ConfigurableAxis axisDeltaPhi{"axisDeltaPhi", {72, -constants::math::PIHalf, constants::math::PIHalf * 3}, "delta phi axis for histograms"};
4949
ConfigurableAxis axisDeltaEta{"axisDeltaEta", {40, -2, 2}, "delta eta axis for histograms"};
5050
ConfigurableAxis axisPtTrigger{"axisPtTrigger", {VARIABLE_WIDTH, 0.5, 1.0, 1.5, 2.0, 3.0, 4.0, 6.0, 10.0}, "pt trigger axis for histograms"};
5151
ConfigurableAxis axisPtAssoc{"axisPtAssoc", {VARIABLE_WIDTH, 0.5, 1.0, 1.5, 2.0, 3.0, 4.0, 6.0}, "pt associated axis for histograms"};
52-
ConfigurableAxis axisMultiplicity{"axisMultiplicity", {VARIABLE_WIDTH, 0, 5, 10, 20, 30, 40, 50, 100.1},"multiplicity / centrality axis for histograms"};
52+
ConfigurableAxis axisMultiplicity{"axisMultiplicity", {VARIABLE_WIDTH, 0, 5, 10, 20, 30, 40, 50, 100.1}, "multiplicity / centrality axis for histograms"};
5353
ConfigurableAxis axisVertexEfficiency{"axisVertexEfficiency", {10, -10, 10}, "vertex axis for efficiency histograms"};
5454
ConfigurableAxis axisEtaEfficiency{"axisEtaEfficiency", {20, -1.0, 1.0}, "eta axis for efficiency histograms"};
55-
ConfigurableAxis axisPtEfficiency{"axisPtEfficiency", {VARIABLE_WIDTH, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0, 1.25, 1.5, 1.75, 2.0, 2.25,2.5, 2.75, 3.0, 3.25, 3.5, 3.75, 4.0, 4.5, 5.0, 6.0, 7.0, 8.0}, "pt axis for efficiency histograms"};
55+
ConfigurableAxis axisPtEfficiency{"axisPtEfficiency", {VARIABLE_WIDTH, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0, 1.25, 1.5, 1.75, 2.0, 2.25, 2.5, 2.75, 3.0, 3.25, 3.5, 3.75, 4.0, 4.5, 5.0, 6.0, 7.0, 8.0}, "pt axis for efficiency histograms"};
5656

5757
// Output definitions
5858
OutputObj<CorrelationContainer> same{"sameEvent"};
@@ -72,25 +72,25 @@ struct firstcorrelations {
7272
histos.add("eventcount", "bin", {HistType::kTH1F, {{maxMixBin + 2, -2.5, -0.5 + maxMixBin, "bin"}}});
7373
mPairCuts.SetHistogramRegistry(&histos);
7474
if (cfgPairCut->get("Photon") > 0 || cfgPairCut->get("K0") > 0 || cfgPairCut->get("Lambda") > 0 ||
75-
cfgPairCut->get("Phi") > 0 || cfgPairCut->get("Rho") > 0) {
76-
mPairCuts.SetPairCut(PairCuts::Photon, cfgPairCut->get("Photon"));
77-
mPairCuts.SetPairCut(PairCuts::K0, cfgPairCut->get("K0"));
78-
mPairCuts.SetPairCut(PairCuts::Lambda, cfgPairCut->get("Lambda"));
79-
mPairCuts.SetPairCut(PairCuts::Phi, cfgPairCut->get("Phi"));
80-
mPairCuts.SetPairCut(PairCuts::Rho, cfgPairCut->get("Rho"));
81-
doPairCuts = true;
75+
cfgPairCut->get("Phi") > 0 || cfgPairCut->get("Rho") > 0) {
76+
mPairCuts.SetPairCut(PairCuts::Photon, cfgPairCut->get("Photon"));
77+
mPairCuts.SetPairCut(PairCuts::K0, cfgPairCut->get("K0"));
78+
mPairCuts.SetPairCut(PairCuts::Lambda, cfgPairCut->get("Lambda"));
79+
mPairCuts.SetPairCut(PairCuts::Phi, cfgPairCut->get("Phi"));
80+
mPairCuts.SetPairCut(PairCuts::Rho, cfgPairCut->get("Rho"));
81+
doPairCuts = true;
8282
}
8383

8484
std::vector<AxisSpec> corrAxis = {{axisDeltaEta, "#Delta#eta"},
85-
{axisPtAssoc, "p_{T} (GeV/c)"},
86-
{axisPtTrigger, "p_{T} (GeV/c)"},
87-
{axisMultiplicity, "multiplicity / centrality"},
88-
{axisDeltaPhi, "#Delta#varphi (rad)"},
89-
{axisVertex, "z-vtx (cm)"}};
85+
{axisPtAssoc, "p_{T} (GeV/c)"},
86+
{axisPtTrigger, "p_{T} (GeV/c)"},
87+
{axisMultiplicity, "multiplicity / centrality"},
88+
{axisDeltaPhi, "#Delta#varphi (rad)"},
89+
{axisVertex, "z-vtx (cm)"}};
9090
std::vector<AxisSpec> effAxis = {{axisEtaEfficiency, "#eta"},
91-
{axisEtaEfficiency, "#eta"},
92-
{axisPtEfficiency, "p_{T} (GeV/c)"},
93-
{axisVertexEfficiency, "z-vtx (cm)"}};
91+
{axisEtaEfficiency, "#eta"},
92+
{axisPtEfficiency, "p_{T} (GeV/c)"},
93+
{axisVertexEfficiency, "z-vtx (cm)"}};
9494
same.setObject(new CorrelationContainer("sameEvent", "sameEvent", corrAxis, effAxis, {}));
9595
mixed.setObject(new CorrelationContainer("mixedEvent", "mixedEvent", corrAxis, effAxis, {}));
9696
LOGF(info, "Finishing init");
@@ -103,8 +103,8 @@ struct firstcorrelations {
103103
ColumnBinningPolicy<aod::collision::PosZ, aod::cent::CentRun2V0M> bindingOnVtxAndMult{{vtxBinsEdges, multBinsEdges}, true}; // true is for ’ignore overflows’ (true by default)
104104

105105
SameKindPair<soa::Filtered<soa::Join<aod::Collisions, aod::EvSels, aod::CentRun2V0Ms>>,
106-
soa::Filtered<soa::Join<aod::Tracks, aod::TrackSelection>>,
107-
ColumnBinningPolicy<aod::collision::PosZ, aod::cent::CentRun2V0M>>
106+
soa::Filtered<soa::Join<aod::Tracks, aod::TrackSelection>>,
107+
ColumnBinningPolicy<aod::collision::PosZ, aod::cent::CentRun2V0M>>
108108
pair{bindingOnVtxAndMult, 10, -1, &cache}; // indicates that 5 events should be mixed and under/overflow (-1) to be ignored
109109

110110
Filter collisionZVtxFilter = nabs(aod::collision::posZ) < cfgZVtxCut;
@@ -113,7 +113,7 @@ struct firstcorrelations {
113113
template <typename TCollision, typename TTracks>
114114
void fillQA(TCollision collision, float centrality, TTracks tracks)
115115
{
116-
for (auto& track: tracks) {
116+
for (auto& track : tracks) {
117117
histos.fill(HIST("yields"), centrality, track.pt(), track.eta());
118118
histos.fill(HIST("etaphi"), centrality, track.eta(), track.phi());
119119
}
@@ -124,7 +124,7 @@ struct firstcorrelations {
124124
{
125125
target->fillEvent(centrality, CorrelationContainer::kCFStepAll);
126126

127-
if (!collision.alias_bit(kINT7) || !collision.sel7()){
127+
if (!collision.alias_bit(kINT7) || !collision.sel7()) {
128128
return false;
129129
}
130130

@@ -151,7 +151,7 @@ struct firstcorrelations {
151151
if (deltaPhi < -PIHalf) {
152152
deltaPhi += TwoPI;
153153
}
154-
target->getPairHist()->Fill(CorrelationContainer::kCFStepReconstructed,track1.eta() - track2.eta(), track2.pt(), track1.pt(), centrality, deltaPhi, posZ,1.0);
154+
target->getPairHist()->Fill(CorrelationContainer::kCFStepReconstructed, track1.eta() - track2.eta(), track2.pt(), track1.pt(), centrality, deltaPhi, posZ, 1.0);
155155
}
156156
}
157157
}

0 commit comments

Comments
 (0)