Skip to content

Commit b1e234b

Browse files
committed
Fix PR formatting issues
1 parent 34f5074 commit b1e234b

2 files changed

Lines changed: 18 additions & 24 deletions

File tree

‎PWGUD/Tasks/CMakeLists.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,4 +307,4 @@ o2physics_add_dpl_workflow(pt-spectra-inclusive-upc
307307
o2physics_add_dpl_workflow(sg-deuteron-spectra
308308
SOURCES sgDeuteronSpectra.cxx
309309
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore
310-
COMPONENT_NAME Analysis)
310+
COMPONENT_NAME Analysis)

‎PWGUD/Tasks/sgDeuteronSpectra.cxx‎

Lines changed: 17 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ using namespace o2::framework;
3030
using namespace o2::framework::expressions;
3131

3232
struct SGDeuteronSpectra {
33-
//UPC cuts
33+
// UPC cuts
3434
SGSelector sgSelector;
3535
Configurable<float> FV0_cut{"FV0", 50., "FV0A threshold"};
3636
Configurable<float> ZDC_cut{"ZDC", 10., "ZDC threshold"};
@@ -39,7 +39,7 @@ struct SGDeuteronSpectra {
3939
Configurable<float> FDDA_cut{"FDDA", 10000., "FDDA threshold"};
4040
Configurable<float> FDDC_cut{"FDDC", 10000., "FDDC threshold"};
4141

42-
//Track cuts
42+
// Track cuts
4343
Configurable<float> PV_cut{"PV_cut", 1.0, "Use Only PV tracks"};
4444
Configurable<float> dcaZ_cut{"dcaZ_cut", 2.0, "dcaZ cut"};
4545
Configurable<float> dcaXY_cut{"dcaXY_cut", 0.0, "dcaXY cut (0 for Pt-function)"};
@@ -49,19 +49,19 @@ struct SGDeuteronSpectra {
4949
Configurable<float> eta_cut{"eta_cut", 0.9, "Track Pseudorapidity"};
5050
Configurable<float> pt_cut{"pt_cut", 0.1, "Track Pt"};
5151

52-
//configurable axis for histograms
52+
// Configurable axis for histograms
5353
ConfigurableAxis ptAxis{"ptAxis", {200, 0.0, 10.0}, "p_{T}"};
54-
ConfigurableAxis nsigmaAxis{"nSigmaAxis", {800,-20.0,20.0}, "nSigma axis for TPC and TOF"};
54+
ConfigurableAxis nsigmaAxis{"nSigmaAxis", {800, -20.0, 20.0}, "nSigma axis for TPC and TOF"};
5555

56-
// initialize histogram registry
57-
HistogramRegistry registry{"registry",{}};
56+
// Initialize histogram registry
57+
HistogramRegistry registry{"registry", {}};
5858

5959
void init(InitContext&)
6060
{
6161
const AxisSpec axispt{ptAxis, "p_{T}"};
6262
const AxisSpec axistpc{nsigmaAxis, "n#sigma_{TPC}"};
6363
const AxisSpec axistof{nsigmaAxis, "n#sigma_{TOF}"};
64-
64+
6565
// Collision histograms
6666
registry.add("collisions/GapSide", "Gap Side: A, C, A+C", {HistType::kTH1F, {{3, -0.5, 2.5}}});
6767
registry.add("collisions/TrueGapSide", "Gap Side: A, C, A+C", {HistType::kTH1F, {{4, -1.5, 2.5}}});
@@ -83,18 +83,15 @@ struct SGDeuteronSpectra {
8383
registry.add("tracks/Antideut_Pt_TPC_DoubleGap", "", {HistType::kTH2F, {axispt, axistpc}});
8484
registry.add("tracks/Antideut_Pt_TOF_DoubleGap", "", {HistType::kTH2F, {axispt, axistof}});
8585
registry.add("tracks/Antideut_Pt_TOF_DoubleGap_TPCpresel", "", {HistType::kTH2F, {axispt, axistof}});
86-
87-
}
88-
86+
}
8987

90-
// define data types
88+
// Define data types
9189
using UDCollisionsFull = soa::Join<aod::UDCollisions, aod::SGCollisions, aod::UDCollisionsSels, aod::UDZdcsReduced>; // UDCollisions
9290
using UDCollisionFull = UDCollisionsFull::iterator;
9391
using UDTracksFull = soa::Join<aod::UDTracks, aod::UDTracksPID, aod::UDTracksPIDExtra, aod::UDTracksExtra, aod::UDTracksFlags, aod::UDTracksDCA>;
9492

9593
void process(UDCollisionFull const& coll, UDTracksFull const& tracks)
9694
{
97-
9895
registry.fill(HIST("collisions/GapSide"), coll.gapSide(), 1.);
9996
float FIT_cut[5] = {FV0_cut, FT0A_cut, FT0C_cut, FDDA_cut, FDDC_cut};
10097
int truegapSide = sgSelector.trueGap(coll, FIT_cut[0], FIT_cut[1], FIT_cut[2], ZDC_cut);
@@ -112,14 +109,13 @@ struct SGDeuteronSpectra {
112109
if (TMath::Abs(t.tpcNSigmaDe()) < 3.0) {
113110
registry.fill(HIST("tracks/Deut_Pt_TOF_GapA_TPCpresel"), t.pt(), t.tofNSigmaDe());
114111
}
115-
}
116-
else {
112+
} else {
117113
registry.fill(HIST("tracks/Antideut_Pt_TPC_GapA"), t.pt(), t.tpcNSigmaDe());
118114
registry.fill(HIST("tracks/Antideut_Pt_TOF_GapA"), t.pt(), t.tofNSigmaDe());
119115
if (TMath::Abs(t.tpcNSigmaDe()) < 3.0) {
120116
registry.fill(HIST("tracks/Antideut_Pt_TOF_GapA_TPCpresel"), t.pt(), t.tofNSigmaDe());
121117
}
122-
}
118+
}
123119
}
124120

125121
if (truegapSide == 1) {
@@ -129,30 +125,28 @@ struct SGDeuteronSpectra {
129125
if (TMath::Abs(t.tpcNSigmaDe()) < 3.0) {
130126
registry.fill(HIST("tracks/Deut_Pt_TOF_GapC_TPCpresel"), t.pt(), t.tofNSigmaDe());
131127
}
132-
}
133-
else {
128+
} else {
134129
registry.fill(HIST("tracks/Antideut_Pt_TPC_GapC"), t.pt(), t.tpcNSigmaDe());
135130
registry.fill(HIST("tracks/Antideut_Pt_TOF_GapC"), t.pt(), t.tofNSigmaDe());
136131
if (TMath::Abs(t.tpcNSigmaDe()) < 3.0) {
137132
registry.fill(HIST("tracks/Antideut_Pt_TOF_GapC_TPCpresel"), t.pt(), t.tofNSigmaDe());
138133
}
139-
}
134+
}
140135
}
141-
136+
142137
if (truegapSide == 2) {
143138
if (t.sign() > 0) {
144139
registry.fill(HIST("tracks/Deut_Pt_TPC_DoubleGap"), t.pt(), t.tpcNSigmaDe());
145140
registry.fill(HIST("tracks/Deut_Pt_TOF_DoubleGap"), t.pt(), t.tofNSigmaDe());
146141
if (TMath::Abs(t.tpcNSigmaDe()) < 3.0) { registry.fill(HIST("tracks/Deut_Pt_TOF_DoubleGap_TPCpresel"), t.pt(), t.tofNSigmaDe());
147142
}
148-
}
149-
else {
150-
registry.fill(HIST("tracks/Antideut_Pt_TPC_DoubleGap"),t.pt(), t.tpcNSigmaDe());
143+
} else {
144+
registry.fill(HIST("tracks/Antideut_Pt_TPC_DoubleGap"), t.pt(), t.tpcNSigmaDe());
151145
registry.fill(HIST("tracks/Antideut_Pt_TOF_DoubleGap"), t.pt(), t.tofNSigmaDe());
152146
if (TMath::Abs(t.tpcNSigmaDe()) < 3.0) {
153147
registry.fill(HIST("tracks/Antideut_Pt_TOF_DoubleGap_TPCpresel"), t.pt(), t.tofNSigmaDe());
154148
}
155-
}
149+
}
156150
}
157151
}
158152
}

0 commit comments

Comments
 (0)