Skip to content

Commit ed3c328

Browse files
committed
Please consider the following formatting changes
1 parent 6bb5e6d commit ed3c328

File tree

1 file changed

+56
-56
lines changed

1 file changed

+56
-56
lines changed

PWGLF/Tasks/Nuspex/spectraTOF.cxx

Lines changed: 56 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,9 @@ static const bool doprocessLfFullParticle[Np] = {doprocessLfFullEl, doprocessLfF
8686

8787
// Spectra task
8888
struct SpectraTOF {
89-
static constexpr int EvSelInelGt0Cut = 1;
90-
static constexpr int EvSelInelGt1Cut = 2;
91-
89+
static constexpr int EvSelInelGt0Cut = 1;
90+
static constexpr int EvSelInelGt1Cut = 2;
91+
9292
struct : ConfigurableGroup {
9393
Configurable<float> cfgCutVertex{"cfgCutVertex", 10.0f, "Accepted z-vertex range"};
9494
Configurable<int> cfgINELCut{"cfgINELCut", 0, "INEL event selection: 0 no sel, 1 INEL>0, 2 INEL>1"};
@@ -304,27 +304,27 @@ struct SpectraTOF {
304304

305305
histos.add("event/vertexz", "", HistType::kTH1D, {vtxZAxis});
306306
histos.add("test_occupancy/event/vertexz", "", HistType::kTH1D, {vtxZAxis});
307-
308-
enum EEvSelBin {
309-
kEventsRead = 1,
310-
kInelGt0Frac,
311-
kInelGt1Frac,
312-
kEvSelPassed,
313-
kNoITSROFrameBorder1,
314-
kNoITSROFrameBorder2,
315-
kNoSameBunchPileup,
316-
kIsGoodZvtxFT0vsPV,
317-
kIsVertexITSTPC,
318-
kNoTimeFrameBorder,
319-
kInelGt0FracRepeat,
320-
kInelGt1FracRepeat,
321-
kPosZPassed,
322-
kInelGt0Final,
323-
kInelGt1Final
324-
}
325-
307+
308+
enum EEvSelBin {
309+
kEventsRead = 1,
310+
kInelGt0Frac,
311+
kInelGt1Frac,
312+
kEvSelPassed,
313+
kNoITSROFrameBorder1,
314+
kNoITSROFrameBorder2,
315+
kNoSameBunchPileup,
316+
kIsGoodZvtxFT0vsPV,
317+
kIsVertexITSTPC,
318+
kNoTimeFrameBorder,
319+
kInelGt0FracRepeat,
320+
kInelGt1FracRepeat,
321+
kPosZPassed,
322+
kInelGt0Final,
323+
kInelGt1Final
324+
}
325+
326326
auto h = histos.add<TH1>("evsel", "evsel", HistType::kTH1D, {{20, 0.5, 20.5}});
327-
327+
328328
h->GetXaxis()->SetBinLabel(kEventsRead, "Events read");
329329
h->GetXaxis()->SetBinLabel(kInelGt0Frac, "INEL>0 (fraction)");
330330
h->GetXaxis()->SetBinLabel(kInelGt1Frac, "INEL>1 (fraction)");
@@ -615,13 +615,13 @@ struct SpectraTOF {
615615
histos.add("MC/MultiplicityMCINELgt1", "MC multiplicity", kTH1D, {multAxis});
616616
}
617617
if (doprocessTrackMCLabels) {
618-
618+
619619
for (int par = 0; par < Np; par++) {
620-
if (doprocessFullParticle[par]){ //executes only for the enabled particles
621-
for (int i = 0; i < NpCharge; i++) {
622-
hMCPdgNsigmaTPC[par - 2][i] = histos.add<TH3>(Form("test_mclabels/nsigmatpc/%s/%s/pdg_%i", (i < Np) ? "pos" : "neg", pN[par], PDGs[i % Np]), Form("True %s (%i) in %s selection", pTCharge[i], PDGs[i], (i < Np) ? pTCharge[par] : pTCharge[par + Np]), kTH3D, {ptAxis, nsigmaTPCAxisOccupancy, multAxis});
623-
}
624-
}
620+
if (doprocessFullParticle[par]) { // executes only for the enabled particles
621+
for (int i = 0; i < NpCharge; i++) {
622+
hMCPdgNsigmaTPC[par - 2][i] = histos.add<TH3>(Form("test_mclabels/nsigmatpc/%s/%s/pdg_%i", (i < Np) ? "pos" : "neg", pN[par], PDGs[i % Np]), Form("True %s (%i) in %s selection", pTCharge[i], PDGs[i], (i < Np) ? pTCharge[par] : pTCharge[par + Np]), kTH3D, {ptAxis, nsigmaTPCAxisOccupancy, multAxis});
623+
}
624+
}
625625
}
626626
}
627627

@@ -1083,11 +1083,11 @@ struct SpectraTOF {
10831083
}
10841084
}
10851085
// Filling DCA info with the TPC+TOF PID
1086-
static constexpr float DcaMaxCombinedSigma = 2.f;
1087-
static constexpr float DcaMaxTPCSigma = 1.f;
1088-
static constexpr float DcaTrkPtCut = 0.4f;
1089-
static constexpr float DcaPhiPtMin = 0.9f;
1090-
static constexpr float DcaPhiPtMax = 1.1f;
1086+
static constexpr float DcaMaxCombinedSigma = 2.f;
1087+
static constexpr float DcaMaxTPCSigma = 1.f;
1088+
static constexpr float DcaTrkPtCut = 0.4f;
1089+
static constexpr float DcaPhiPtMin = 0.9f;
1090+
static constexpr float DcaPhiPtMax = 1.1f;
10911091
bool isDCAPureSample = (std::sqrt(nsigmaTOF * nsigmaTOF + nsigmaTPC * nsigmaTPC) < DcaMaxCombinedSigma);
10921092
if (track.pt() <= DcaTrkPtCut) {
10931093
isDCAPureSample = (nsigmaTPC < DcaMaxTPCSigma);
@@ -1442,10 +1442,10 @@ struct SpectraTOF {
14421442
return true;
14431443
}
14441444

1445-
static constexpr int ItsMaxLayer = 7; //bit runs from 0-6
1446-
static constexpr int TrdBit = 10;
1447-
static constexpr int TofBit = 11;
1448-
static constexpr int GlobalMismatchBit = 15;
1445+
static constexpr int ItsMaxLayer = 7; // bit runs from 0-6
1446+
static constexpr int TrdBit = 10;
1447+
static constexpr int TofBit = 11;
1448+
static constexpr int GlobalMismatchBit = 15;
14491449
template <typename ParticleType>
14501450
bool isMismatchedTrack(const ParticleType& track, const int detector)
14511451
{
@@ -1762,7 +1762,7 @@ struct SpectraTOF {
17621762
} // end of the process function
17631763
PROCESS_SWITCH(SpectraTOF, processDerived, "Derived data processor", false);
17641764

1765-
#define MAKE_PROCESS_FUNCTION(processorName, inputPid, particleId, isFull, tofTable, tpcTable) \
1765+
#define MAKE_PROCESS_FUNCTION(processorName, inputPid, particleId, isFull, tofTable, tpcTable) \
17661766
void process##processorName##inputPid(CollisionCandidates::iterator const& collision, \
17671767
soa::Join<TrackCandidates, \
17681768
aod::pid##tofTable##inputPid, \
@@ -1889,20 +1889,20 @@ struct SpectraTOF {
18891889
template <std::size_t id>
18901890
bool isParticleEnabled()
18911891
{
1892-
static_assert(id < NpCharge, "Unknown particle id!");
1893-
constexpr std::size_t Idx = id % Np;
1894-
if (doprocessFullParticle[Idx] || doprocessLfFullParticle[Idx]){
1895-
return true;
1896-
}
1892+
static_assert(id < NpCharge, "Unknown particle id!");
1893+
constexpr std::size_t Idx = id % Np;
1894+
if (doprocessFullParticle[Idx] || doprocessLfFullParticle[Idx]) {
1895+
return true;
1896+
}
18971897
return false;
18981898
}
18991899

19001900
using RecoMCCollisions = soa::Join<aod::Collisions, aod::McCollisionLabels, aod::EvSels, aod::CentFT0As, aod::CentFT0Cs, aod::TPCMults, aod::PVMults, aod::MultZeqs, aod::CentFT0Ms>; // RD
19011901
template <std::size_t i, typename TrackType, typename ParticleType>
19021902
void fillTrackHistogramsMC(TrackType const& track,
1903-
ParticleType::iterator const& mcParticle,
1904-
RecoMCCollisions::iterator const& collision,
1905-
ParticleType const& mcParticles)
1903+
ParticleType::iterator const& mcParticle,
1904+
RecoMCCollisions::iterator const& collision,
1905+
ParticleType const& mcParticles)
19061906
{
19071907
if (!isParticleEnabled<i>()) { // Check if the particle is enabled
19081908
return;
@@ -1945,7 +1945,7 @@ struct SpectraTOF {
19451945
}
19461946

19471947
if (!mcParticle.isPhysicalPrimary()) { // Secondaries (weak decays and material)
1948-
if (mcParticle.getProcess() == kPDecay) { // Particles from decay
1948+
if (mcParticle.getProcess() == kPDecay) { // Particles from decay
19491949
if (enableDCAxyzHistograms) {
19501950
hDcaXYZStr[i]->Fill(track.pt(), track.dcaXY(), track.dcaZ());
19511951
} else {
@@ -2095,7 +2095,7 @@ struct SpectraTOF {
20952095
const bool isProtonTOF = std::abs(nsigmaTOFPr) < trkselOptions.cfgCutNsigma;
20962096

20972097
if (!mcParticle.isPhysicalPrimary()) { // Is not physical primary
2098-
if (mcParticle.getProcess() == kPDecay) { // Is from decay
2098+
if (mcParticle.getProcess() == kPDecay) { // Is from decay
20992099
if (includeCentralityMC) {
21002100
if (includeCentralityMC) {
21012101
histos.fill(HIST(hpt_num_str[i]), track.pt(), multiplicity, track.dcaXY());
@@ -2701,12 +2701,12 @@ struct SpectraTOF {
27012701
}
27022702
PROCESS_SWITCH(SpectraTOF, processMCgen, "process generated MC", false);
27032703
void processMCgenRecoEvs(soa::Join<TrackCandidates,
2704-
aod::pidTPCFullPi, aod::pidTPCFullKa, aod::pidTPCFullPr,
2705-
aod::pidTOFFullPi, aod::pidTOFFullKa, aod::pidTOFFullPr> const& tracks,
2706-
aod::McTrackLabels const& mcTrackLabels,
2707-
GenMCCollisions const&,
2708-
RecoMCCollisions const& collisions,
2709-
aod::McParticles const& mcParticles)
2704+
aod::pidTPCFullPi, aod::pidTPCFullKa, aod::pidTPCFullPr,
2705+
aod::pidTOFFullPi, aod::pidTOFFullKa, aod::pidTOFFullPr> const& tracks,
2706+
aod::McTrackLabels const& mcTrackLabels,
2707+
GenMCCollisions const&,
2708+
RecoMCCollisions const& collisions,
2709+
aod::McParticles const& mcParticles)
27102710
{
27112711
for (const auto& collision : collisions) {
27122712
if (!collision.has_mcCollision()) {
@@ -2820,7 +2820,7 @@ struct SpectraTOF {
28202820
const auto& mcLabel = mcTrackLabels.iteratorAt(track.globalIndex());
28212821
const auto& mcParticle = mcParticles.iteratorAt(mcLabel.mcParticleId());
28222822
int pdgCode = mcParticle.pdgCode();
2823-
static_for<2, 4>([&](auto par) { //for pi, K, p only
2823+
static_for<2, 4>([&](auto par) { // for pi, K, p only
28242824
const auto& nsigmaTPCpar = o2::aod::pidutils::tpcNSigma<par>(track);
28252825
bool isTPCpar = std::abs(nsigmaTPCpar) < trkselOptions.cfgCutNsigma;
28262826
// Precompute rapidity values to avoid redundant calculations

0 commit comments

Comments
 (0)