Skip to content

Commit d1ef6c6

Browse files
committed
Fix braces
1 parent c83c2e8 commit d1ef6c6

File tree

6 files changed

+46
-25
lines changed

6 files changed

+46
-25
lines changed

PWGHF/HFC/TableProducer/correlatorDplusHadrons.cxx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -564,8 +564,9 @@ struct HfCorrelatorDplusHadrons {
564564
listDaughters.clear();
565565
RecoDecay::getDaughters(particle1, &listDaughters, arrDaughDplusPDG, 2);
566566
int counterDaughters = 0;
567-
if (listDaughters.size() != NDaughters)
567+
if (listDaughters.size() != NDaughters) {
568568
continue;
569+
}
569570
bool isDaughtersOk = true;
570571
for (const auto& dauIdx : listDaughters) {
571572
auto daughI = mcParticles.rawIteratorAt(dauIdx - mcParticles.offset());
@@ -576,8 +577,9 @@ struct HfCorrelatorDplusHadrons {
576577
counterDaughters += 1;
577578
prongsId[counterDaughters - 1] = daughI.globalIndex();
578579
}
579-
if (!isDaughtersOk)
580+
if (!isDaughtersOk) {
580581
continue; // Skip this D+ candidate if any daughter fails eta cut
582+
}
581583
counterDplusHadron++;
582584

583585
registry.fill(HIST("hDplusBin"), poolBin);

PWGHF/HFC/Tasks/taskCharmHadronsTrackFemtoDream.cxx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -463,8 +463,9 @@ struct HfTaskCharmHadronsTrackFemtoDream {
463463
for (auto const& [p1, p2] : combinations(CombinationsFullIndexPolicy(sliceTrk1, sliceCharmHad))) {
464464

465465
if constexpr (Channel == DecayChannel::D0ToPiK) {
466-
if (p1.trackId() == p2.prong0Id() || p1.trackId() == p2.prong1Id())
466+
if (p1.trackId() == p2.prong0Id() || p1.trackId() == p2.prong1Id()) {
467467
continue;
468+
}
468469

469470
if (useCPR.value) {
470471
if (pairCloseRejectionSE2Prong.isClosePair(p1, p2, parts, col.magField())) {
@@ -478,8 +479,9 @@ struct HfTaskCharmHadronsTrackFemtoDream {
478479
}
479480

480481
if constexpr (Channel == DecayChannel::LcToPKPi || Channel == DecayChannel::DplusToPiKPi) {
481-
if (p1.trackId() == p2.prong0Id() || p1.trackId() == p2.prong1Id() || p1.trackId() == p2.prong2Id())
482+
if (p1.trackId() == p2.prong0Id() || p1.trackId() == p2.prong1Id() || p1.trackId() == p2.prong2Id()) {
482483
continue;
484+
}
483485
if (useCPR.value) {
484486
if (pairCloseRejectionSE3Prong.isClosePair(p1, p2, parts, col.magField())) {
485487
continue;
@@ -492,8 +494,9 @@ struct HfTaskCharmHadronsTrackFemtoDream {
492494
}
493495

494496
if constexpr (Channel == DecayChannel::DstarToD0Pi) {
495-
if (p1.trackId() == p2.prong0Id() || p1.trackId() == p2.prong1Id() || p1.trackId() == p2.prong2Id())
497+
if (p1.trackId() == p2.prong0Id() || p1.trackId() == p2.prong1Id() || p1.trackId() == p2.prong2Id()) {
496498
continue;
499+
}
497500
if (useCPR.value) {
498501
if (pairCloseRejectionSEDstar.isClosePair(p1, p2, parts, col.magField())) {
499502
continue;

PWGHF/HFC/Tasks/taskCharmHadronsV0FemtoDream.cxx

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -414,14 +414,17 @@ struct HfTaskCharmHadronsV0FemtoDream {
414414
for (auto const& [p1, p2] : combinations(CombinationsFullIndexPolicy(sliceV01, sliceCharmHad))) {
415415

416416
if constexpr (Channel == DecayChannel::D0ToPiK) {
417-
if (p1.childrenIds()[0] == p2.prong0Id() || p1.childrenIds()[0] == p2.prong1Id() || p1.childrenIds()[1] == p2.prong0Id() || p1.childrenIds()[1] == p2.prong1Id())
417+
if (p1.childrenIds()[0] == p2.prong0Id() || p1.childrenIds()[0] == p2.prong1Id() || p1.childrenIds()[1] == p2.prong0Id() || p1.childrenIds()[1] == p2.prong1Id()) {
418418
continue;
419+
}
419420
} else if constexpr (Channel == DecayChannel::LcToPKPi || Channel == DecayChannel::DplusToPiKPi) {
420-
if (p1.childrenIds()[0] == p2.prong0Id() || p1.childrenIds()[0] == p2.prong1Id() || p1.childrenIds()[0] == p2.prong2Id() || p1.childrenIds()[1] == p2.prong0Id() || p1.childrenIds()[1] == p2.prong1Id() || p1.childrenIds()[1] == p2.prong2Id())
421+
if (p1.childrenIds()[0] == p2.prong0Id() || p1.childrenIds()[0] == p2.prong1Id() || p1.childrenIds()[0] == p2.prong2Id() || p1.childrenIds()[1] == p2.prong0Id() || p1.childrenIds()[1] == p2.prong1Id() || p1.childrenIds()[1] == p2.prong2Id()) {
421422
continue;
423+
}
422424
} else if constexpr (Channel == DecayChannel::DstarToD0Pi) {
423-
if (p1.childrenIds()[0] == p2.prong0Id() || p1.childrenIds()[0] == p2.prong1Id() || p1.childrenIds()[0] == p2.prong2Id() || p1.childrenIds()[1] == p2.prong0Id() || p1.childrenIds()[1] == p2.prong1Id() || p1.childrenIds()[1] == p2.prong2Id())
425+
if (p1.childrenIds()[0] == p2.prong0Id() || p1.childrenIds()[0] == p2.prong1Id() || p1.childrenIds()[0] == p2.prong2Id() || p1.childrenIds()[1] == p2.prong0Id() || p1.childrenIds()[1] == p2.prong1Id() || p1.childrenIds()[1] == p2.prong2Id()) {
424426
continue;
427+
}
425428
}
426429
// v0 daughters selection
427430
const auto& posChild = femtoParts.iteratorAt(p1.index() - 2);
@@ -451,10 +454,11 @@ struct HfTaskCharmHadronsV0FemtoDream {
451454
}
452455

453456
float invMassV0 = 0.f;
454-
if (p1.sign() > 0)
457+
if (p1.sign() > 0) {
455458
invMassV0 = p1.mLambda();
456-
else
459+
} else {
457460
invMassV0 = p1.mAntiLambda();
461+
}
458462

459463
float chargeV0 = 0.;
460464
if ((p1.cut() & p1.sign()) == CutBitChargePositive) {
@@ -541,10 +545,11 @@ struct HfTaskCharmHadronsV0FemtoDream {
541545
}
542546

543547
float invMassV0 = 0.f;
544-
if (p1.sign() > 0)
548+
if (p1.sign() > 0) {
545549
invMassV0 = p1.mLambda();
546-
else
550+
} else {
547551
invMassV0 = p1.mAntiLambda();
552+
}
548553

549554
float chargeV0 = 0.;
550555
if ((p1.cut() & p1.sign()) == CutBitChargePositive) {
@@ -721,8 +726,9 @@ struct HfTaskCharmHadronsV0FemtoDream {
721726
FDV0Particles const& parts,
722727
CharmPart& charmPart)
723728
{
724-
if (!mixSetting.doMixEvent)
729+
if (!mixSetting.doMixEvent) {
725730
return;
731+
}
726732
auto run = [&](auto& v0Part) {
727733
switch (mixSetting.mixingBinPolicy) {
728734
case femtodreamcollision::kMult:
@@ -739,12 +745,13 @@ struct HfTaskCharmHadronsV0FemtoDream {
739745
}
740746
};
741747

742-
if (v0Sel.pdgCodeV0 == kLambda0)
748+
if (v0Sel.pdgCodeV0 == kLambda0) {
743749
run(partitionLambda);
744-
else if (v0Sel.pdgCodeV0 == kK0Short)
750+
} else if (v0Sel.pdgCodeV0 == kK0Short) {
745751
run(partitionK0Short);
746-
else
752+
} else {
747753
LOG(fatal) << "Unsupported V0 PDG: " << v0Sel.pdgCodeV0 << " (allowed: 3122, 310) for mixed-events";
754+
}
748755
}
749756

750757
void processDataLcV0(FilteredCollisions const& cols,

PWGHF/HFC/Tasks/taskFlow.cxx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -722,10 +722,12 @@ struct HfTaskFlow {
722722

723723
float dPhiStar = phi1 - phi2 - charge1 * fbSign * std::asin(0.075 * radius / pt1) + charge2 * fbSign * std::asin(0.075 * radius / pt2);
724724

725-
if (dPhiStar > constants::math::PI)
725+
if (dPhiStar > constants::math::PI) {
726726
dPhiStar = constants::math::TwoPI - dPhiStar;
727-
if (dPhiStar < -constants::math::PI)
727+
}
728+
if (dPhiStar < -constants::math::PI) {
728729
dPhiStar = -constants::math::TwoPI - dPhiStar;
730+
}
729731

730732
return dPhiStar;
731733
}
@@ -1114,8 +1116,9 @@ struct HfTaskFlow {
11141116
break;
11151117
}
11161118
}
1117-
if (bIsBelow)
1119+
if (bIsBelow) {
11181120
continue;
1121+
}
11191122
}
11201123
}
11211124
}

PWGHF/HFL/TableProducer/electronSelectionWithTpcEmcal.cxx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -540,13 +540,15 @@ struct HfElectronSelectionWithTpcEmcal {
540540
if (isEMcal) {
541541
continue;
542542
}
543-
if (std::abs(track.tofNSigmaEl()) > tofNSigmaEl)
543+
if (std::abs(track.tofNSigmaEl()) > tofNSigmaEl) {
544544
continue;
545+
}
545546
registry.fill(HIST("hTofNSigmaVsPt"), track.tofNSigmaEl(), track.pt());
546547
registry.fill(HIST("hTpcNSigmaVsPt"), track.tpcNSigmaEl(), track.pt());
547548

548-
if ((track.tpcNSigmaEl() < tpcNsigmaElectronMin || track.tpcNSigmaEl() > tpcNsigmaElectronMax))
549+
if ((track.tpcNSigmaEl() < tpcNsigmaElectronMin || track.tpcNSigmaEl() > tpcNsigmaElectronMax)) {
549550
continue;
551+
}
550552

551553
nonHfe(track, tracks, false);
552554
///////////////// NonHf electron Selection without Emcal ////////////////////////

PWGHF/Tasks/taskMcInjection.cxx

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -142,19 +142,23 @@ struct HfTaskMcInjection {
142142

143143
bool isCharm(int pdg)
144144
{
145-
if (std::abs(pdg) / 1000 == PDG_t::kCharm) // o2-linter: disable=magic-number (get thousands digit)
145+
if (std::abs(pdg) / 1000 == PDG_t::kCharm) { // o2-linter: disable=magic-number (get thousands digit)
146146
return true;
147-
if (std::abs(pdg) / 100 == PDG_t::kCharm) // o2-linter: disable=magic-number (get hundreds digit)
147+
}
148+
if (std::abs(pdg) / 100 == PDG_t::kCharm) { // o2-linter: disable=magic-number (get hundreds digit)
148149
return true;
150+
}
149151
return false;
150152
}
151153

152154
bool isBeauty(int pdg) // if needed in the future
153155
{
154-
if (std::abs(pdg) / 1000 == PDG_t::kBottom) // o2-linter: disable=magic-number (get thousands digit)
156+
if (std::abs(pdg) / 1000 == PDG_t::kBottom) { // o2-linter: disable=magic-number (get thousands digit)
155157
return true;
156-
if (std::abs(pdg) / 100 == PDG_t::kBottom) // o2-linter: disable=magic-number (get hundreds digit)
158+
}
159+
if (std::abs(pdg) / 100 == PDG_t::kBottom) { // o2-linter: disable=magic-number (get hundreds digit)
157160
return true;
161+
}
158162
return false;
159163
}
160164

0 commit comments

Comments
 (0)