Skip to content

Commit fcbc816

Browse files
authored
Merge pull request #32 from alibuild/alibot-cleanup-11678
Please consider the following formatting changes to AliceO2Group#11678
2 parents 27c3d09 + 3214b64 commit fcbc816

File tree

2 files changed

+53
-53
lines changed

2 files changed

+53
-53
lines changed

PWGHF/HFC/TableProducer/correlatorLcScHadrons.cxx

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ struct HfCorrelatorLcScHadronsSelection {
9292
for (const auto& candidate : candidates) {
9393

9494
auto yCand = estimateY<isCandSc>(candidate);
95-
95+
9696
if (std::abs(yCand) > yCandMax || candidate.pt() < ptCandMin) {
9797
isCandFound = false;
9898
continue;
@@ -119,7 +119,7 @@ struct HfCorrelatorLcScHadronsSelection {
119119
for (const auto& particle : mcParticles) {
120120

121121
isCandFound = matchCandAndMass<isCandSc>(particle, massCand);
122-
if (!isCandFound){
122+
if (!isCandFound) {
123123
continue;
124124
}
125125

@@ -137,31 +137,31 @@ struct HfCorrelatorLcScHadronsSelection {
137137

138138
/// Code to select collisions with at least one Lc - for real data and data-like analysis
139139
void processLcSelection(SelCollisions::iterator const& collision,
140-
CandsLcDataFiltered const& candidates)
140+
CandsLcDataFiltered const& candidates)
141141
{
142-
selectionCollision<false>(collision,candidates);
142+
selectionCollision<false>(collision, candidates);
143143
}
144144
PROCESS_SWITCH(HfCorrelatorLcScHadronsSelection, processLcSelection, "Process Lc Collision Selection for Data and Mc", true);
145145

146-
void processScSelection(SelCollisions::iterator const& collision,
147-
aod::HfCandSc const& candidates)
146+
void processScSelection(SelCollisions::iterator const& collision,
147+
aod::HfCandSc const& candidates)
148148
{
149-
selectionCollision<true>(collision,candidates);
149+
selectionCollision<true>(collision, candidates);
150150
}
151151
PROCESS_SWITCH(HfCorrelatorLcScHadronsSelection, processScSelection, "Process Sc Collision Selection for Data and Mc", false);
152152

153-
void processLcSelectionMcRec(SelCollisions::iterator const& collision,
153+
void processLcSelectionMcRec(SelCollisions::iterator const& collision,
154154
CandsLcMcRecFiltered const& candidates)
155155
{
156-
selectionCollision<false>(collision,candidates);
156+
selectionCollision<false>(collision, candidates);
157157
}
158-
PROCESS_SWITCH(HfCorrelatorLcScHadronsSelection, processLcSelectionMcRec, "Process Lc Selection McRec", false);
158+
PROCESS_SWITCH(HfCorrelatorLcScHadronsSelection, processLcSelectionMcRec, "Process Lc Selection McRec", false);
159159

160160
void processScSelectionMcRec(SelCollisions::iterator const& collision,
161-
CandsScMcRec const& candidates)
162-
{
163-
selectionCollision<true>(collision,candidates);
164-
}
161+
CandsScMcRec const& candidates)
162+
{
163+
selectionCollision<true>(collision, candidates);
164+
}
165165
PROCESS_SWITCH(HfCorrelatorLcScHadronsSelection, processScSelectionMcRec, "Process Sc Selection McRec", false);
166166

167167
void processLcSelectionMcGen(aod::McCollision const&,
@@ -241,12 +241,12 @@ struct HfCorrelatorLcScHadrons {
241241
bool isSignal = false;
242242

243243
TRandom3* rnd = new TRandom3(0);
244-
//std::vector<float> outputMl = {-1., -1., -1.};
244+
// std::vector<float> outputMl = {-1., -1., -1.};
245245
std::vector<float> outputMlPKPi = {-1., -1., -1.};
246246
std::vector<float> outputMlPiKP = {-1., -1., -1.};
247247

248248
// Event Mixing for the Data Mode
249-
//using SelCollisionsWithSc = soa::Join<aod::Collisions, aod::Mults, aod::EvSels>;
249+
// using SelCollisionsWithSc = soa::Join<aod::Collisions, aod::Mults, aod::EvSels>;
250250
using SelCollisions = soa::Filtered<soa::Join<aod::Collisions, aod::Mults, aod::EvSels, aod::LcSelection>>;
251251
using SelCollisionsMc = soa::Filtered<soa::Join<aod::McCollisions, aod::LcSelection, aod::MultsExtraMC>>; // collisionFilter applied
252252

@@ -834,7 +834,8 @@ struct HfCorrelatorLcScHadrons {
834834
}
835835

836836
template <bool isCandSc, typename CollisionType, typename PartType>
837-
void doSameEventMcGen(CollisionType const& mcCollision, PartType const& mcParticles){
837+
void doSameEventMcGen(CollisionType const& mcCollision, PartType const& mcParticles)
838+
{
838839

839840
int counterCharmCand = 0;
840841
registry.fill(HIST("hMcEvtCount"), 0);
@@ -850,9 +851,8 @@ struct HfCorrelatorLcScHadrons {
850851
for (const auto& particle : mcParticles) {
851852

852853
double massCand = -999.0;
853-
bool isCandFound = isCandSc ? matchCandAndMass<true>(particle, massCand) :
854-
matchCandAndMass<false>(particle, massCand);
855-
if (!isCandFound){
854+
bool isCandFound = isCandSc ? matchCandAndMass<true>(particle, massCand) : matchCandAndMass<false>(particle, massCand);
855+
if (!isCandFound) {
856856
continue;
857857
}
858858
double yCand = RecoDecay::y(particle.pVector(), massCand);
@@ -866,10 +866,10 @@ struct HfCorrelatorLcScHadrons {
866866
registry.fill(HIST("hPhiMcGen"), RecoDecay::constrainAngle(particle.phi(), -PIHalf));
867867
registry.fill(HIST("hYMcGen"), yCand);
868868

869-
int8_t chargeLc = pdg->GetParticle(particle.pdgCode())->Charge(); // Retrieve charge
870-
if (chargeLc != 0){
871-
chargeLc = chargeLc / std::abs(chargeLc);
872-
}
869+
int8_t chargeLc = pdg->GetParticle(particle.pdgCode())->Charge(); // Retrieve charge
870+
if (chargeLc != 0) {
871+
chargeLc = chargeLc / std::abs(chargeLc);
872+
}
873873

874874
isPrompt = particle.originMcGen() == RecoDecay::OriginType::Prompt;
875875
isNonPrompt = particle.originMcGen() == RecoDecay::OriginType::NonPrompt;
@@ -887,19 +887,19 @@ struct HfCorrelatorLcScHadrons {
887887
listDaughters.clear();
888888
const size_t expectedDaughters = isCandSc ? 4 : 3;
889889

890-
if (isCandSc){
891-
if (massCand == o2::constants::physics::MassSigmaC0 || massCand == o2::constants::physics::MassSigmaCStar0){
890+
if (isCandSc) {
891+
if (massCand == o2::constants::physics::MassSigmaC0 || massCand == o2::constants::physics::MassSigmaCStar0) {
892892
std::array<int, NDaughtersSc> arrDaughSc0PDG = {kProton, -kKPlus, kPiPlus, kPiMinus};
893893
RecoDecay::getDaughters(particle, &listDaughters, arrDaughSc0PDG, 2);
894894
} else {
895895
std::array<int, NDaughtersSc> arrDaughScPlusPDG = {kProton, -kKPlus, kPiPlus, kPiPlus};
896896
RecoDecay::getDaughters(particle, &listDaughters, arrDaughScPlusPDG, 2);
897897
}
898898
} else {
899-
std::array<int, NDaughtersLc> arrDaughLcPDG = {kProton, -kKPlus, kPiPlus};
900-
RecoDecay::getDaughters(particle, &listDaughters, arrDaughLcPDG, 2);
899+
std::array<int, NDaughtersLc> arrDaughLcPDG = {kProton, -kKPlus, kPiPlus};
900+
RecoDecay::getDaughters(particle, &listDaughters, arrDaughLcPDG, 2);
901901
}
902-
902+
903903
int counterDaughters = 0;
904904
std::vector<int> prongsId(expectedDaughters);
905905
if (listDaughters.size() == expectedDaughters) {
@@ -921,9 +921,9 @@ struct HfCorrelatorLcScHadrons {
921921

922922
if (std::find(prongsId.begin(), prongsId.end(), particleAssoc.globalIndex()) != prongsId.end()) {
923923
if (!storeAutoCorrelationFlag) {
924-
continue;
925-
}
926-
correlationStatus = true;
924+
continue;
925+
}
926+
correlationStatus = true;
927927
}
928928

929929
if ((std::abs(particleAssoc.pdgCode()) != kElectron) && (std::abs(particleAssoc.pdgCode()) != kMuonMinus) && (std::abs(particleAssoc.pdgCode()) != kPiPlus) && (std::abs(particle.pdgCode()) != kKPlus) && (std::abs(particleAssoc.pdgCode()) != kProton)) {
@@ -1050,14 +1050,14 @@ struct HfCorrelatorLcScHadrons {
10501050

10511051
/// Lc-Hadron correlation pair builder - for Mc Gen-level analysis
10521052
void processMcGenLc(SelCollisionsMc::iterator const& mcCollision,
1053-
CandidatesLcMcGen const& mcParticles)
1053+
CandidatesLcMcGen const& mcParticles)
10541054
{
10551055
doSameEventMcGen<false>(mcCollision, mcParticles);
10561056
}
10571057
PROCESS_SWITCH(HfCorrelatorLcScHadrons, processMcGenLc, "Process Mc Gen Lc mode", false);
10581058

1059-
void processMcGenSc(SelCollisionsMc::iterator const& mcCollision,
1060-
CandidatesScMcGen const& mcParticles)
1059+
void processMcGenSc(SelCollisionsMc::iterator const& mcCollision,
1060+
CandidatesScMcGen const& mcParticles)
10611061
{
10621062
doSameEventMcGen<true>(mcCollision, mcParticles);
10631063
}

PWGHF/HFC/Utils/utilsCorrelations.h

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,8 @@ bool passPIDSelection(Atrack const& track, SpeciesContainer const mPIDspecies,
124124
}
125125

126126
template <bool isScCand, typename McParticle>
127-
bool matchCandAndMass(McParticle const& particle, double& massCand) {
127+
bool matchCandAndMass(McParticle const& particle, double& massCand)
128+
{
128129
const auto pdgCand = std::abs(particle.pdgCode());
129130
const auto matchGenFlag = std::abs(particle.flagMcMatchGen());
130131

@@ -155,7 +156,7 @@ bool matchCandAndMass(McParticle const& particle, double& massCand) {
155156
case BIT(aod::hf_cand_sigmac::DecayType::ScplusplusToPKPiPi):
156157
massCand = o2::constants::physics::MassSigmaCStarPlusPlus;
157158
return true;
158-
159+
159160
case BIT(aod::hf_cand_sigmac::DecayType::ScStarPlusPlusToPKPiPi):
160161
massCand = o2::constants::physics::MassSigmaCStarPlusPlus;
161162
return true;
@@ -169,26 +170,25 @@ bool matchCandAndMass(McParticle const& particle, double& massCand) {
169170
}
170171
}
171172

173+
template <bool isCandSc, typename CandType>
174+
double estimateY(CandType const& candidate)
175+
{
176+
double y = -999.;
177+
const int chargeScZero = 0;
178+
if constexpr (isCandSc) {
179+
int8_t chargeCand = candidate.charge();
172180

173-
template <bool isCandSc, typename CandType>
174-
double estimateY(CandType const& candidate)
175-
{
176-
double y = -999.;
177-
const int chargeScZero = 0;
178-
if constexpr (isCandSc) {
179-
int8_t chargeCand = candidate.charge();
180-
181-
if (chargeCand == chargeScZero) {
182-
y = hfHelper.ySc0(candidate);
183-
} else {
184-
y = hfHelper.yScPlusPlus(candidate);
185-
}
186-
181+
if (chargeCand == chargeScZero) {
182+
y = hfHelper.ySc0(candidate);
187183
} else {
188-
y = hfHelper.yLc(candidate);
184+
y = hfHelper.yScPlusPlus(candidate);
189185
}
190-
return y;
186+
187+
} else {
188+
y = hfHelper.yLc(candidate);
191189
}
190+
return y;
191+
}
192192

193193
// ========= Find Leading Particle ==============
194194
template <typename TTracks, typename T1> //// FIXME: 14 days

0 commit comments

Comments
 (0)