Skip to content

Commit 51bed22

Browse files
Merge pull request #71 from alibuild/alibot-cleanup-16484
[PWGLF] Please consider the following formatting changes to #16484
2 parents 4255ce2 + 97de1b5 commit 51bed22

3 files changed

Lines changed: 55 additions & 51 deletions

File tree

PWGLF/DataModel/LFLambda1405Table.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ DECLARE_SOA_COLUMN(NSigmaTPCPiDau, nSigmaTPCPiDau, float); //! Number of sigma
4949
DECLARE_SOA_COLUMN(NSigmaTOFPiDau, nSigmaTOFPiDau, float); //! Number of sigmas for the lambda1405 pion daughter in TOF
5050

5151
// Flow columns
52-
DECLARE_SOA_COLUMN(ScalarProd, scalarProd, float); //! Scalar product of the candidate
53-
DECLARE_SOA_COLUMN(Centrality, centrality, float); //! Centrality of the candidate
52+
DECLARE_SOA_COLUMN(ScalarProd, scalarProd, float); //! Scalar product of the candidate
53+
DECLARE_SOA_COLUMN(Centrality, centrality, float); //! Centrality of the candidate
5454

5555
// MC Columns
5656
DECLARE_SOA_COLUMN(PtMC, ptMC, float); //! pT of the candidate in MC
@@ -73,8 +73,8 @@ DECLARE_SOA_TABLE(Lambda1405Cands, "AOD", "LAMBDA1405",
7373
lambda1405::NSigmaTPCPiDau, lambda1405::NSigmaTOFPiDau);
7474

7575
DECLARE_SOA_TABLE(Lambda1405Flow, "AOD", "LAMBDA1405FLOW",
76-
o2::soa::Index<>,
77-
lambda1405::Pt,
76+
o2::soa::Index<>,
77+
lambda1405::Pt,
7878
lambda1405::Mass, lambda1405::SigmaMinusMass, lambda1405::SigmaPlusMass,
7979
lambda1405::AlphaAPSigma, lambda1405::QtAPSigma,
8080
lambda1405::NSigmaTPCPiKink, lambda1405::NSigmaTOFPiKink,

PWGLF/TableProducer/Common/kinkBuilder.cxx

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ struct kinkBuilder {
311311
hSelKinkedTrackQA->GetXaxis()->SetBinLabel(11, "MothLastLayerRadiusCheck");
312312
hMothDaughSignsInit = qaRegistry.add<TH2>("hMothDaughSignsInit", "; Sign Mother; Sign Daughter", {HistType::kTH2F, {{3, -1.5, 1.5}, {3, -1.5, 1.5}}});
313313
hMothDaughSignsFinal = qaRegistry.add<TH2>("hMothDaughSignsFinal", "; Sign Mother; Sign Daughter", {HistType::kTH2F, {{3, -1.5, 1.5}, {3, -1.5, 1.5}}});
314-
hZDiff = qaRegistry.add<TH2>("hZDiff", "; #Delta z (#mu m);(Q_{Mother}, Q_{Daughter})", HistType::kTH2F, {zDiffBins, {4, -0.5, 3.5}});
314+
hZDiff = qaRegistry.add<TH2>("hZDiff", "; #Delta z (#mu m);(Q_{Mother}, Q_{Daughter})", HistType::kTH2F, {zDiffBins, {4, -0.5, 3.5}});
315315
hZDiff->GetYaxis()->SetBinLabel(1, "(+,+)");
316316
hZDiff->GetYaxis()->SetBinLabel(2, "(-,-)");
317317
hZDiff->GetYaxis()->SetBinLabel(3, "(+,-)");
@@ -344,12 +344,12 @@ struct kinkBuilder {
344344

345345
if (doprocessMc) {
346346
if (skipBkgCands) {
347-
hRecCandidates = qaRegistry.add<TH2>("hRecCandidates", ";Counts;", {HistType::kTH2F, {{kNMatchedDecays, -0.5, kNMatchedDecays-0.5}, absPtAxis}});
347+
hRecCandidates = qaRegistry.add<TH2>("hRecCandidates", ";Counts;", {HistType::kTH2F, {{kNMatchedDecays, -0.5, kNMatchedDecays - 0.5}, absPtAxis}});
348348
hRecCandidates->GetXaxis()->SetBinLabel(1, "#Sigma^{-} #rightarrow n#pi^{-}");
349349
hRecCandidates->GetXaxis()->SetBinLabel(2, "#Sigma^{+} #rightarrow n#pi^{+}");
350350
hRecCandidates->GetXaxis()->SetBinLabel(3, "#Sigma^{+} #rightarrow p#pi^{0}");
351351
}
352-
hGenCandidates = qaRegistry.add<TH2>("hGenCandidates", ";Counts;", {HistType::kTH2F, {{kNMatchedDecays, -0.5, kNMatchedDecays-0.5}, absPtAxis}});
352+
hGenCandidates = qaRegistry.add<TH2>("hGenCandidates", ";Counts;", {HistType::kTH2F, {{kNMatchedDecays, -0.5, kNMatchedDecays - 0.5}, absPtAxis}});
353353
hGenCandidates->GetXaxis()->SetBinLabel(1, "#Sigma^{-} #rightarrow n#pi^{-}");
354354
hGenCandidates->GetXaxis()->SetBinLabel(2, "#Sigma^{+} #rightarrow n#pi^{+}");
355355
hGenCandidates->GetXaxis()->SetBinLabel(3, "#Sigma^{+} #rightarrow p#pi^{0}");
@@ -426,15 +426,15 @@ struct kinkBuilder {
426426
if (candidate.itsNClsInnerBarrel() != 0)
427427
return false;
428428
hSelDaugQA->Fill(4.f, isPositive);
429-
429+
430430
if (candidate.itsNCls() >= 4)
431431
return false;
432432
hSelDaugQA->Fill(5.f, isPositive);
433-
433+
434434
if (candidate.tpcNClsCrossedRows() <= 0.8 * candidate.tpcNClsFindable())
435435
return false;
436436
hSelDaugQA->Fill(6.f, isPositive);
437-
437+
438438
if (candidate.tpcNClsFound() <= nTPCClusMinDaug)
439439
return false;
440440
hSelDaugQA->Fill(7.f, isPositive);
@@ -452,7 +452,7 @@ struct kinkBuilder {
452452
auto trackDaug = tracks.rawIteratorAt(svCand.tr1Idx);
453453

454454
// Fill Selections QA histo
455-
int chargeCombSvCand = 2*unlikeSignBkg + (trackMoth.sign() == -1 ? 1 : 0);
455+
int chargeCombSvCand = 2 * unlikeSignBkg + (trackMoth.sign() == -1 ? 1 : 0);
456456
hSelKinkedTrackQA->Fill(0.f, chargeCombSvCand); // all candidates bin
457457
hMothDaughSignsInit->Fill(trackMoth.sign(), trackDaug.sign());
458458

@@ -630,8 +630,9 @@ struct kinkBuilder {
630630
LOG(info) << "Task initialized for run " << mRunNumber << " with magnetic field " << mBz << " kZG";
631631
}
632632

633-
template<typename TColls, typename TTracks, typename TAmbiTracks>
634-
void buildSvPool(const TColls& collisions, const TTracks& tracks, const TAmbiTracks& ambiguousTracks, const aod::BCs& bcs) {
633+
template <typename TColls, typename TTracks, typename TAmbiTracks>
634+
void buildSvPool(const TColls& collisions, const TTracks& tracks, const TAmbiTracks& ambiguousTracks, const aod::BCs& bcs)
635+
{
635636
svCreator.clearPools();
636637
svCreator.fillBC2Coll(collisions, bcs);
637638

@@ -685,15 +686,16 @@ struct kinkBuilder {
685686
}
686687
PROCESS_SWITCH(kinkBuilder, processData, "Data processing", false);
687688

688-
template<bool checkKinkDaugPdg, typename TMother>
689-
int matchKinkDecay(const TMother& motherPart, const aod::McParticles& mcParticles) {
689+
template <bool checkKinkDaugPdg, typename TMother>
690+
int matchKinkDecay(const TMother& motherPart, const aod::McParticles& mcParticles)
691+
{
690692
int pdgMother = motherPart.pdgCode();
691693
int8_t sign = 0;
692694
int pdgCodeNeutralDaug{-1}, pdgCodeChargedDaug{-1};
693695
std::array<int, 2> finState = {-1, -1};
694696
switch (std::abs(pdgMother)) {
695697
case PDG_t::kSigmaMinus: {
696-
// Swap the sign of the neutral decay products in case of anti-particles
698+
// Swap the sign of the neutral decay products in case of anti-particles
697699
pdgCodeNeutralDaug = (pdgMother > 0) ? +PDG_t::kNeutron : -PDG_t::kNeutron;
698700
pdgCodeChargedDaug = (pdgMother > 0) ? +PDG_t::kPiMinus : +PDG_t::kPiPlus;
699701
finState = {pdgCodeChargedDaug, pdgCodeNeutralDaug}; // Both decay channels have the same neutral daughter
@@ -711,7 +713,7 @@ struct kinkBuilder {
711713
case PDG_t::kSigmaPlus: {
712714
// Swap the sign of the neutral decay products in case of anti-particles
713715
pdgCodeNeutralDaug = (pdgMother > 0) ? +PDG_t::kNeutron : -PDG_t::kNeutron;
714-
pdgCodeChargedDaug = (pdgMother > 0) ? +PDG_t::kPiPlus : +PDG_t::kPiMinus;
716+
pdgCodeChargedDaug = (pdgMother > 0) ? +PDG_t::kPiPlus : +PDG_t::kPiMinus;
715717
finState = {pdgCodeChargedDaug, pdgCodeNeutralDaug};
716718
// if constexpr (checkKinkDaugPdg) {
717719
// LOG(info) << "[kink] Matching Sigma+ decay with daughter PDG " << pdgDaug << " and neutral daughter PDG " << pdgCodeNeutralDaug;
@@ -750,7 +752,7 @@ struct kinkBuilder {
750752
McRecoCollisionsCent const& mcRecoCollisions,
751753
aod::McParticles const& mcParticles,
752754
TracksFullMc const& tracksMc,
753-
aod::AmbiguousTracks const& ambiTracksMc,
755+
aod::AmbiguousTracks const& ambiTracksMc,
754756
aod::BCs const& bcs)
755757
{
756758
kinkCandidates.clear();

PWGLF/Tasks/Resonances/lambda1405analysis.cxx

Lines changed: 35 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -75,21 +75,21 @@ struct lambda1405candidate {
7575
float sigmaAlphaAP = -1; // Alpha of the Sigma
7676
float sigmaQtAP = -1; // qT of the Sigma
7777
float kinkPt = -1; // pT of the kink daughter
78-
float kinkPiNSigTpc = -1; // Number of sigmas for the pion candidate from Sigma kink in Tpc
79-
float kinkPiNSigTof = -1; // Number of sigmas for the pion candidate from Sigma kink in Tof
80-
float kinkPrNSigTpc = -1; // Number of sigmas for the proton candidate from Sigma kink in Tpc
81-
float kinkPrNSigTof = -1; // Number of sigmas for the proton candidate from Sigma kink in Tof
78+
float kinkPiNSigTpc = -1; // Number of sigmas for the pion candidate from Sigma kink in Tpc
79+
float kinkPiNSigTof = -1; // Number of sigmas for the pion candidate from Sigma kink in Tof
80+
float kinkPrNSigTpc = -1; // Number of sigmas for the proton candidate from Sigma kink in Tpc
81+
float kinkPrNSigTof = -1; // Number of sigmas for the proton candidate from Sigma kink in Tof
8282
float kinkDcaDauToPv = -1; // DCA of the kink daughter to the primary vertex
8383
float sigmaRadius = -1; // Radius of the Sigma decay vertex
8484

8585
float piPt = -1; // pT of the pion daughter
8686
float bachPiNSigTpc = -1; // Number of sigmas for the pion candidate
8787
float bachPiNSigTof = -1; // Number of sigmas for the pion candidate using Tof
88-
int kinkDauId = 0; // Id of the pion from Sigma decay in MC
89-
int sigmaId = 0; // Id of the Sigma candidate in MC
90-
int piId = 0; // Id of the pion candidate in MC
88+
int kinkDauId = 0; // Id of the pion from Sigma decay in MC
89+
int sigmaId = 0; // Id of the Sigma candidate in MC
90+
int piId = 0; // Id of the pion candidate in MC
9191

92-
float scalarProd = -1; // Scalar product for flow analysis
92+
float scalarProd = -1; // Scalar product for flow analysis
9393
};
9494

9595
struct lambda1405analysis {
@@ -430,7 +430,8 @@ struct lambda1405analysis {
430430
}
431431

432432
template <typename TCand, typename TTrack>
433-
void fillHistosSigma(const lambda1405candidate& lambda1405Cand, const TCand& sigmaCand, const TTrack& kinkDauTrack) {
433+
void fillHistosSigma(const lambda1405candidate& lambda1405Cand, const TCand& sigmaCand, const TTrack& kinkDauTrack)
434+
{
434435

435436
if (sigmaCand.mothSign() > 0) {
436437
rSigmaPlus.fill(HIST("hSigmaPlusMass"), sigmaCand.mSigmaPlus());
@@ -566,15 +567,15 @@ struct lambda1405analysis {
566567
auto kinkDauMom = std::array{sigmaCand.pxDaug(), sigmaCand.pyDaug(), sigmaCand.pzDaug()};
567568
auto sigmaMom = std::array{sigmaCand.pxMoth(), sigmaCand.pyMoth(), sigmaCand.pzMoth()};
568569
// Sigma properties
569-
lambda1405Cand.sigmaId = sigmaCand.globalIndex();
570+
lambda1405Cand.sigmaId = sigmaCand.globalIndex();
570571
lambda1405Cand.sigmaMinusMass = sigmaCand.mSigmaMinus();
571-
lambda1405Cand.sigmaPlusMass = sigmaCand.mSigmaPlus();
572-
lambda1405Cand.xiMinusMass = sigmaCand.mXiMinus();
573-
lambda1405Cand.sigmaSign = sigmaCand.mothSign();
574-
lambda1405Cand.sigmaAlphaAP = alphaAP(sigmaMom, kinkDauMom);
575-
lambda1405Cand.sigmaQtAP = qtAP(sigmaMom, kinkDauMom);
576-
lambda1405Cand.sigmaPt = sigmaCand.ptMoth();
577-
lambda1405Cand.sigmaRadius = sigmaRad;
572+
lambda1405Cand.sigmaPlusMass = sigmaCand.mSigmaPlus();
573+
lambda1405Cand.xiMinusMass = sigmaCand.mXiMinus();
574+
lambda1405Cand.sigmaSign = sigmaCand.mothSign();
575+
lambda1405Cand.sigmaAlphaAP = alphaAP(sigmaMom, kinkDauMom);
576+
lambda1405Cand.sigmaQtAP = qtAP(sigmaMom, kinkDauMom);
577+
lambda1405Cand.sigmaPt = sigmaCand.ptMoth();
578+
lambda1405Cand.sigmaRadius = sigmaRad;
578579
lambda1405Cand.kinkDcaDauToPv = sigmaCand.dcaDaugPv();
579580

580581
if (lambda1405Cand.sigmaQtAP < cutSigmaQtAPMin || lambda1405Cand.sigmaQtAP > cutSigmaQtAPMax) {
@@ -596,8 +597,8 @@ struct lambda1405analysis {
596597
}
597598

598599
// Kink daughter properties
599-
lambda1405Cand.kinkDauId = kinkDauTrack.globalIndex();
600-
lambda1405Cand.kinkPt = kinkDauTrack.pt();
600+
lambda1405Cand.kinkDauId = kinkDauTrack.globalIndex();
601+
lambda1405Cand.kinkPt = kinkDauTrack.pt();
601602
lambda1405Cand.kinkPiNSigTpc = kinkDauTrack.tpcNSigmaPi();
602603
lambda1405Cand.kinkPiNSigTof = kinkDauTrack.tofNSigmaPi();
603604
lambda1405Cand.kinkPrNSigTpc = kinkDauTrack.tpcNSigmaPr();
@@ -620,8 +621,8 @@ struct lambda1405analysis {
620621
continue;
621622
}
622623
rSelections.fill(HIST("hSelectionsBachPi"), 5); // PID sel
623-
rSelections.fill(HIST("hSelectionsL1405"), 2); // Bach Pi selection
624-
624+
rSelections.fill(HIST("hSelectionsL1405"), 2); // Bach Pi selection
625+
625626
auto piMom = std::array{piTrack.px(), piTrack.py(), piTrack.pz()};
626627
float invMass{-1.f};
627628
if (lambda1405Cand.isSigmaMinus) {
@@ -632,7 +633,7 @@ struct lambda1405analysis {
632633
if (invMass > cutUpperMass) {
633634
continue;
634635
}
635-
rSelections.fill(HIST("hSelectionsL1405"), 3); // Upper mass selection
636+
rSelections.fill(HIST("hSelectionsL1405"), 3); // Upper mass selection
636637

637638
// Daughter Pi properties
638639
lambda1405Cand.piId = piTrack.globalIndex();
@@ -653,7 +654,7 @@ struct lambda1405analysis {
653654
lambda1405Cand.phi = std::atan2(lambda1405Cand.py, lambda1405Cand.px);
654655
lambda1405Cand.scalarProd = -1;
655656
fillHistosLambda1405(lambda1405Cand, piTrack);
656-
rSelections.fill(HIST("hSelectionsL1405"), 4); // Accepted
657+
rSelections.fill(HIST("hSelectionsL1405"), 4); // Accepted
657658
selectedCandidates.push_back(lambda1405Cand);
658659
}
659660
}
@@ -785,8 +786,9 @@ struct lambda1405analysis {
785786
}
786787
PROCESS_SWITCH(lambda1405analysis, processDataWCentQVecs, "Data processing with centrality and Q vectors info", false);
787788

788-
template<typename TMother>
789-
int matchGenDecay(const TMother& motherPart, const aod::McParticles& mcParticles) {
789+
template <typename TMother>
790+
int matchGenDecay(const TMother& motherPart, const aod::McParticles& mcParticles)
791+
{
790792
LOG(info) << "Matching MC decay for particle with PDG code " << motherPart.pdgCode() << " and index " << motherPart.globalIndex();
791793
int pdgMother = motherPart.pdgCode();
792794
int8_t sign = 0;
@@ -795,7 +797,7 @@ struct lambda1405analysis {
795797

796798
// Match L(1405) --> n pi- pi+ final state
797799
std::array<int, 3> finalState;
798-
if (pdgMother > 0) { // Change sign of neutral decay products
800+
if (pdgMother > 0) { // Change sign of neutral decay products
799801
finalState = {PDG_t::kNeutron, PDG_t::kPiMinus, PDG_t::kPiPlus};
800802
} else {
801803
finalState = {-PDG_t::kNeutron, PDG_t::kPiMinus, PDG_t::kPiPlus};
@@ -815,7 +817,7 @@ struct lambda1405analysis {
815817
}
816818

817819
// Match L(1405) --> p pi0 pi+ final state, only possible for Sigma+
818-
if (pdgMother > 0) { // Change sign of neutral decay products
820+
if (pdgMother > 0) { // Change sign of neutral decay products
819821
finalState = {PDG_t::kProton, PDG_t::kPi0, PDG_t::kPiMinus};
820822
} else {
821823
finalState = {PDG_t::kProton, -PDG_t::kPi0, PDG_t::kPiMinus};
@@ -846,7 +848,7 @@ struct lambda1405analysis {
846848
constructCollCandidates(sigmaCand, tracksPerCol, selectedCandidates);
847849
LOG(info) << "Selected " << selectedCandidates.size() << " Lambda(1405) candidates in this collision";
848850
for (const auto& lambda1405Cand : selectedCandidates) {
849-
rLambda1405.fill(HIST("hRecoL1405"), 0., lambda1405Cand.pt()); // All reconstructed
851+
rLambda1405.fill(HIST("hRecoL1405"), 0., lambda1405Cand.pt()); // All reconstructed
850852

851853
// Do MC association
852854
auto mcLabPiKink = trackLabelsMC.rawIteratorAt(lambda1405Cand.kinkDauId);
@@ -859,7 +861,7 @@ struct lambda1405analysis {
859861
<< "Bachelor Pi MC assoc: " << mcLabPi.has_mcParticle();
860862
continue; // Skip if no valid MC association
861863
}
862-
rLambda1405.fill(HIST("hRecoL1405"), 1., lambda1405Cand.pt()); // All with associated MC particle
864+
rLambda1405.fill(HIST("hRecoL1405"), 1., lambda1405Cand.pt()); // All with associated MC particle
863865

864866
auto mcTrackKink = mcLabPiKink.mcParticle_as<aod::McParticles>();
865867
auto mcTrackSigma = mcLabSigma.mcParticle_as<aod::McParticles>();
@@ -876,22 +878,22 @@ struct lambda1405analysis {
876878
<< "isSigmaPlusToPrKink: " << isSigmaPlusToPrKink;
877879
continue; // Skip if not a valid Sigma kink decay
878880
}
879-
rLambda1405.fill(HIST("hRecoL1405"), 2., lambda1405Cand.pt()); // Has kink decay in MC
881+
rLambda1405.fill(HIST("hRecoL1405"), 2., lambda1405Cand.pt()); // Has kink decay in MC
880882

881883
if (std::abs(mcTrackPi.pdgCode()) != 211) {
882884
LOG(info) << "Skipping candidate due to bachelor Pi not being a pion in MC: "
883885
<< "Bachelor Pi PDG code: " << mcTrackPi.pdgCode();
884886
continue; // Skip if not a valid pion candidate
885887
}
886-
rLambda1405.fill(HIST("hRecoL1405"), 3., lambda1405Cand.pt()); // Has bach pi
888+
rLambda1405.fill(HIST("hRecoL1405"), 3., lambda1405Cand.pt()); // Has bach pi
887889

888890
if (!mcTrackSigma.has_mothers() || !mcTrackPi.has_mothers()) {
889891
LOG(info) << "Skipping candidate due to missing mothers in MC: "
890892
<< "Sigma has mothers: " << mcTrackSigma.has_mothers() << ", "
891893
<< "Pi has mothers: " << mcTrackPi.has_mothers();
892894
continue; // Skip if no mothers found
893895
}
894-
rLambda1405.fill(HIST("hRecoL1405"), 4., lambda1405Cand.pt()); // Has mothers for Sigma and Pi
896+
rLambda1405.fill(HIST("hRecoL1405"), 4., lambda1405Cand.pt()); // Has mothers for Sigma and Pi
895897

896898
// check that labpi and labsigma have the same mother (a lambda1405 candidate)
897899
int lambda1405Id = -1;
@@ -908,7 +910,7 @@ struct lambda1405analysis {
908910
LOG(info) << "Skipping candidate due to Sigma and pion not sharing the same lambda1405 candidate";
909911
continue; // Skip if the Sigma and pion do not share the same lambda1405 candidate
910912
}
911-
rLambda1405.fill(HIST("hRecoL1405"), 4., lambda1405Cand.pt()); // Has same mother
913+
rLambda1405.fill(HIST("hRecoL1405"), 4., lambda1405Cand.pt()); // Has same mother
912914

913915
auto lambda1405Mother = particlesMC.rawIteratorAt(lambda1405Id);
914916
float lambda1405Mass = std::sqrt(lambda1405Mother.e() * lambda1405Mother.e() - lambda1405Mother.p() * lambda1405Mother.p());

0 commit comments

Comments
 (0)