Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions PWGLF/DataModel/LFLambda1405Table.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@
DECLARE_SOA_COLUMN(NSigmaTOFPiKink, nSigmaTOFPiKink, float); //! Number of sigmas for the pion candidate from Sigma kink in TOF
DECLARE_SOA_COLUMN(NSigmaTPCPrKink, nSigmaTPCPrKink, float); //! Number of sigmas for the proton candidate from Sigma kink in TPC
DECLARE_SOA_COLUMN(NSigmaTOFPrKink, nSigmaTOFPrKink, float); //! Number of sigmas for the proton candidate from Sigma kink in TOF
DECLARE_SOA_COLUMN(DCAKinkDauToPV, dcaKinkDauToPV, float); //! DCA of the kink daughter to the primary vertex

Check failure on line 47 in PWGLF/DataModel/LFLambda1405Table.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-column]

Use UpperCamelCase for names of O2 columns and matching lowerCamelCase names for their getters.
DECLARE_SOA_COLUMN(NSigmaTPCPiDau, nSigmaTPCPiDau, float); //! Number of sigmas for the lambda1405 pion daughter in TPC
DECLARE_SOA_COLUMN(NSigmaTOFPiDau, nSigmaTOFPiDau, float); //! Number of sigmas for the lambda1405 pion daughter in TOF

// Flow columns
DECLARE_SOA_COLUMN(ScalarProd, scalarProd, float); //! Scalar product of the candidate
DECLARE_SOA_COLUMN(Centrality, centrality, float); //! Centrality of the candidate
DECLARE_SOA_COLUMN(ScalarProd, scalarProd, float); //! Scalar product of the candidate
DECLARE_SOA_COLUMN(Centrality, centrality, float); //! Centrality of the candidate

// MC Columns
DECLARE_SOA_COLUMN(PtMC, ptMC, float); //! pT of the candidate in MC
Expand All @@ -73,8 +73,8 @@
lambda1405::NSigmaTPCPiDau, lambda1405::NSigmaTOFPiDau);

DECLARE_SOA_TABLE(Lambda1405Flow, "AOD", "LAMBDA1405FLOW",
o2::soa::Index<>,
lambda1405::Pt,
o2::soa::Index<>,
lambda1405::Pt,
lambda1405::Mass, lambda1405::SigmaMinusMass, lambda1405::SigmaPlusMass,
lambda1405::AlphaAPSigma, lambda1405::QtAPSigma,
lambda1405::NSigmaTPCPiKink, lambda1405::NSigmaTOFPiKink,
Expand Down
30 changes: 16 additions & 14 deletions PWGLF/TableProducer/Common/kinkBuilder.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@
hSelKinkedTrackQA->GetXaxis()->SetBinLabel(11, "MothLastLayerRadiusCheck");
hMothDaughSignsInit = qaRegistry.add<TH2>("hMothDaughSignsInit", "; Sign Mother; Sign Daughter", {HistType::kTH2F, {{3, -1.5, 1.5}, {3, -1.5, 1.5}}});
hMothDaughSignsFinal = qaRegistry.add<TH2>("hMothDaughSignsFinal", "; Sign Mother; Sign Daughter", {HistType::kTH2F, {{3, -1.5, 1.5}, {3, -1.5, 1.5}}});
hZDiff = qaRegistry.add<TH2>("hZDiff", "; #Delta z (#mu m);(Q_{Mother}, Q_{Daughter})", HistType::kTH2F, {zDiffBins, {4, -0.5, 3.5}});
hZDiff = qaRegistry.add<TH2>("hZDiff", "; #Delta z (#mu m);(Q_{Mother}, Q_{Daughter})", HistType::kTH2F, {zDiffBins, {4, -0.5, 3.5}});
hZDiff->GetYaxis()->SetBinLabel(1, "(+,+)");
hZDiff->GetYaxis()->SetBinLabel(2, "(-,-)");
hZDiff->GetYaxis()->SetBinLabel(3, "(+,-)");
Expand All @@ -337,19 +337,19 @@
hMothDecRad2->GetYaxis()->SetBinLabel(3, "(+,-)");
hMothDecRad2->GetYaxis()->SetBinLabel(4, "(-,+)");

for (int i = 0; i < 5; i++) {

Check failure on line 340 in PWGLF/TableProducer/Common/kinkBuilder.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
mBBparamsDaug[i] = cfgBetheBlochParams->get("Daughter", Form("p%i", i));
}
mBBparamsDaug[5] = cfgBetheBlochParams->get("Daughter", "resolution");

if (doprocessMc) {
if (skipBkgCands) {
hRecCandidates = qaRegistry.add<TH2>("hRecCandidates", ";Counts;", {HistType::kTH2F, {{kNMatchedDecays, -0.5, kNMatchedDecays-0.5}, absPtAxis}});
hRecCandidates = qaRegistry.add<TH2>("hRecCandidates", ";Counts;", {HistType::kTH2F, {{kNMatchedDecays, -0.5, kNMatchedDecays - 0.5}, absPtAxis}});
hRecCandidates->GetXaxis()->SetBinLabel(1, "#Sigma^{-} #rightarrow n#pi^{-}");
hRecCandidates->GetXaxis()->SetBinLabel(2, "#Sigma^{+} #rightarrow n#pi^{+}");
hRecCandidates->GetXaxis()->SetBinLabel(3, "#Sigma^{+} #rightarrow p#pi^{0}");
}
hGenCandidates = qaRegistry.add<TH2>("hGenCandidates", ";Counts;", {HistType::kTH2F, {{kNMatchedDecays, -0.5, kNMatchedDecays-0.5}, absPtAxis}});
hGenCandidates = qaRegistry.add<TH2>("hGenCandidates", ";Counts;", {HistType::kTH2F, {{kNMatchedDecays, -0.5, kNMatchedDecays - 0.5}, absPtAxis}});
hGenCandidates->GetXaxis()->SetBinLabel(1, "#Sigma^{-} #rightarrow n#pi^{-}");
hGenCandidates->GetXaxis()->SetBinLabel(2, "#Sigma^{+} #rightarrow n#pi^{+}");
hGenCandidates->GetXaxis()->SetBinLabel(3, "#Sigma^{+} #rightarrow p#pi^{0}");
Expand Down Expand Up @@ -385,15 +385,15 @@
hSelMotherQA->Fill(4.f, isPositive);

h2ItsClsMothBeforeSel->Fill(candidate.itsNCls(), candidate.itsNClsInnerBarrel());
if (candidate.itsNCls() >= 6)

Check failure on line 388 in PWGLF/TableProducer/Common/kinkBuilder.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
return false;
hSelMotherQA->Fill(5.f, isPositive);

if (candidate.itsNClsInnerBarrel() != 3)

Check failure on line 392 in PWGLF/TableProducer/Common/kinkBuilder.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
return false;
hSelMotherQA->Fill(6.f, isPositive);

if (candidate.itsChi2NCl() >= 36)

Check failure on line 396 in PWGLF/TableProducer/Common/kinkBuilder.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
return false;
hSelMotherQA->Fill(7.f, isPositive);

Expand Down Expand Up @@ -426,15 +426,15 @@
if (candidate.itsNClsInnerBarrel() != 0)
return false;
hSelDaugQA->Fill(4.f, isPositive);

if (candidate.itsNCls() >= 4)

Check failure on line 430 in PWGLF/TableProducer/Common/kinkBuilder.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
return false;
hSelDaugQA->Fill(5.f, isPositive);

if (candidate.tpcNClsCrossedRows() <= 0.8 * candidate.tpcNClsFindable())

Check failure on line 434 in PWGLF/TableProducer/Common/kinkBuilder.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
return false;
hSelDaugQA->Fill(6.f, isPositive);

if (candidate.tpcNClsFound() <= nTPCClusMinDaug)
return false;
hSelDaugQA->Fill(7.f, isPositive);
Expand All @@ -452,7 +452,7 @@
auto trackDaug = tracks.rawIteratorAt(svCand.tr1Idx);

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

Expand Down Expand Up @@ -542,13 +542,13 @@

// get last layer hitted by the mother and the first layer hitted by the daughter
int lastLayerMoth = 0, firstLayerDaug = 0;
for (int i = 0; i < 7; i++) {

Check failure on line 545 in PWGLF/TableProducer/Common/kinkBuilder.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
if (trackMoth.itsClusterMap() & (1 << i)) {
lastLayerMoth = i;
}
}

for (int i = 0; i < 7; i++) {

Check failure on line 551 in PWGLF/TableProducer/Common/kinkBuilder.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
if (trackDaug.itsClusterMap() & (1 << i)) {
firstLayerDaug = i;
break;
Expand All @@ -565,7 +565,7 @@
}
hSelKinkedTrackQA->Fill(10.f, chargeCombSvCand); // MothLastLayerRadiusCheck cut bin

for (int i = 0; i < 3; i++) {

Check failure on line 568 in PWGLF/TableProducer/Common/kinkBuilder.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
kinkCand.decVtx[i] -= kinkCand.primVtx[i];
}

Expand Down Expand Up @@ -630,8 +630,9 @@
LOG(info) << "Task initialized for run " << mRunNumber << " with magnetic field " << mBz << " kZG";
}

template<typename TColls, typename TTracks, typename TAmbiTracks>
void buildSvPool(const TColls& collisions, const TTracks& tracks, const TAmbiTracks& ambiguousTracks, const aod::BCs& bcs) {
template <typename TColls, typename TTracks, typename TAmbiTracks>
void buildSvPool(const TColls& collisions, const TTracks& tracks, const TAmbiTracks& ambiguousTracks, const aod::BCs& bcs)
{
svCreator.clearPools();
svCreator.fillBC2Coll(collisions, bcs);

Expand Down Expand Up @@ -685,15 +686,16 @@
}
PROCESS_SWITCH(kinkBuilder, processData, "Data processing", false);

template<bool checkKinkDaugPdg, typename TMother>
int matchKinkDecay(const TMother& motherPart, const aod::McParticles& mcParticles) {
template <bool checkKinkDaugPdg, typename TMother>
int matchKinkDecay(const TMother& motherPart, const aod::McParticles& mcParticles)
{
int pdgMother = motherPart.pdgCode();
int8_t sign = 0;
int pdgCodeNeutralDaug{-1}, pdgCodeChargedDaug{-1};
std::array<int, 2> finState = {-1, -1};
switch (std::abs(pdgMother)) {
case PDG_t::kSigmaMinus: {
// Swap the sign of the neutral decay products in case of anti-particles
// Swap the sign of the neutral decay products in case of anti-particles
pdgCodeNeutralDaug = (pdgMother > 0) ? +PDG_t::kNeutron : -PDG_t::kNeutron;
pdgCodeChargedDaug = (pdgMother > 0) ? +PDG_t::kPiMinus : +PDG_t::kPiPlus;
finState = {pdgCodeChargedDaug, pdgCodeNeutralDaug}; // Both decay channels have the same neutral daughter
Expand All @@ -711,7 +713,7 @@
case PDG_t::kSigmaPlus: {
// Swap the sign of the neutral decay products in case of anti-particles
pdgCodeNeutralDaug = (pdgMother > 0) ? +PDG_t::kNeutron : -PDG_t::kNeutron;
pdgCodeChargedDaug = (pdgMother > 0) ? +PDG_t::kPiPlus : +PDG_t::kPiMinus;
pdgCodeChargedDaug = (pdgMother > 0) ? +PDG_t::kPiPlus : +PDG_t::kPiMinus;
finState = {pdgCodeChargedDaug, pdgCodeNeutralDaug};
// if constexpr (checkKinkDaugPdg) {
// LOG(info) << "[kink] Matching Sigma+ decay with daughter PDG " << pdgDaug << " and neutral daughter PDG " << pdgCodeNeutralDaug;
Expand Down Expand Up @@ -750,7 +752,7 @@
McRecoCollisionsCent const& mcRecoCollisions,
aod::McParticles const& mcParticles,
TracksFullMc const& tracksMc,
aod::AmbiguousTracks const& ambiTracksMc,
aod::AmbiguousTracks const& ambiTracksMc,
aod::BCs const& bcs)
{
kinkCandidates.clear();
Expand Down
68 changes: 35 additions & 33 deletions PWGLF/Tasks/Resonances/lambda1405analysis.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -75,21 +75,21 @@ struct lambda1405candidate {
float sigmaAlphaAP = -1; // Alpha of the Sigma
float sigmaQtAP = -1; // qT of the Sigma
float kinkPt = -1; // pT of the kink daughter
float kinkPiNSigTpc = -1; // Number of sigmas for the pion candidate from Sigma kink in Tpc
float kinkPiNSigTof = -1; // Number of sigmas for the pion candidate from Sigma kink in Tof
float kinkPrNSigTpc = -1; // Number of sigmas for the proton candidate from Sigma kink in Tpc
float kinkPrNSigTof = -1; // Number of sigmas for the proton candidate from Sigma kink in Tof
float kinkPiNSigTpc = -1; // Number of sigmas for the pion candidate from Sigma kink in Tpc
float kinkPiNSigTof = -1; // Number of sigmas for the pion candidate from Sigma kink in Tof
float kinkPrNSigTpc = -1; // Number of sigmas for the proton candidate from Sigma kink in Tpc
float kinkPrNSigTof = -1; // Number of sigmas for the proton candidate from Sigma kink in Tof
float kinkDcaDauToPv = -1; // DCA of the kink daughter to the primary vertex
float sigmaRadius = -1; // Radius of the Sigma decay vertex

float piPt = -1; // pT of the pion daughter
float bachPiNSigTpc = -1; // Number of sigmas for the pion candidate
float bachPiNSigTof = -1; // Number of sigmas for the pion candidate using Tof
int kinkDauId = 0; // Id of the pion from Sigma decay in MC
int sigmaId = 0; // Id of the Sigma candidate in MC
int piId = 0; // Id of the pion candidate in MC
int kinkDauId = 0; // Id of the pion from Sigma decay in MC
int sigmaId = 0; // Id of the Sigma candidate in MC
int piId = 0; // Id of the pion candidate in MC

float scalarProd = -1; // Scalar product for flow analysis
float scalarProd = -1; // Scalar product for flow analysis
};

struct lambda1405analysis {
Expand Down Expand Up @@ -430,7 +430,8 @@ struct lambda1405analysis {
}

template <typename TCand, typename TTrack>
void fillHistosSigma(const lambda1405candidate& lambda1405Cand, const TCand& sigmaCand, const TTrack& kinkDauTrack) {
void fillHistosSigma(const lambda1405candidate& lambda1405Cand, const TCand& sigmaCand, const TTrack& kinkDauTrack)
{

if (sigmaCand.mothSign() > 0) {
rSigmaPlus.fill(HIST("hSigmaPlusMass"), sigmaCand.mSigmaPlus());
Expand Down Expand Up @@ -566,15 +567,15 @@ struct lambda1405analysis {
auto kinkDauMom = std::array{sigmaCand.pxDaug(), sigmaCand.pyDaug(), sigmaCand.pzDaug()};
auto sigmaMom = std::array{sigmaCand.pxMoth(), sigmaCand.pyMoth(), sigmaCand.pzMoth()};
// Sigma properties
lambda1405Cand.sigmaId = sigmaCand.globalIndex();
lambda1405Cand.sigmaId = sigmaCand.globalIndex();
lambda1405Cand.sigmaMinusMass = sigmaCand.mSigmaMinus();
lambda1405Cand.sigmaPlusMass = sigmaCand.mSigmaPlus();
lambda1405Cand.xiMinusMass = sigmaCand.mXiMinus();
lambda1405Cand.sigmaSign = sigmaCand.mothSign();
lambda1405Cand.sigmaAlphaAP = alphaAP(sigmaMom, kinkDauMom);
lambda1405Cand.sigmaQtAP = qtAP(sigmaMom, kinkDauMom);
lambda1405Cand.sigmaPt = sigmaCand.ptMoth();
lambda1405Cand.sigmaRadius = sigmaRad;
lambda1405Cand.sigmaPlusMass = sigmaCand.mSigmaPlus();
lambda1405Cand.xiMinusMass = sigmaCand.mXiMinus();
lambda1405Cand.sigmaSign = sigmaCand.mothSign();
lambda1405Cand.sigmaAlphaAP = alphaAP(sigmaMom, kinkDauMom);
lambda1405Cand.sigmaQtAP = qtAP(sigmaMom, kinkDauMom);
lambda1405Cand.sigmaPt = sigmaCand.ptMoth();
lambda1405Cand.sigmaRadius = sigmaRad;
lambda1405Cand.kinkDcaDauToPv = sigmaCand.dcaDaugPv();

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

// Kink daughter properties
lambda1405Cand.kinkDauId = kinkDauTrack.globalIndex();
lambda1405Cand.kinkPt = kinkDauTrack.pt();
lambda1405Cand.kinkDauId = kinkDauTrack.globalIndex();
lambda1405Cand.kinkPt = kinkDauTrack.pt();
lambda1405Cand.kinkPiNSigTpc = kinkDauTrack.tpcNSigmaPi();
lambda1405Cand.kinkPiNSigTof = kinkDauTrack.tofNSigmaPi();
lambda1405Cand.kinkPrNSigTpc = kinkDauTrack.tpcNSigmaPr();
Expand All @@ -620,8 +621,8 @@ struct lambda1405analysis {
continue;
}
rSelections.fill(HIST("hSelectionsBachPi"), 5); // PID sel
rSelections.fill(HIST("hSelectionsL1405"), 2); // Bach Pi selection
rSelections.fill(HIST("hSelectionsL1405"), 2); // Bach Pi selection

auto piMom = std::array{piTrack.px(), piTrack.py(), piTrack.pz()};
float invMass{-1.f};
if (lambda1405Cand.isSigmaMinus) {
Expand All @@ -632,7 +633,7 @@ struct lambda1405analysis {
if (invMass > cutUpperMass) {
continue;
}
rSelections.fill(HIST("hSelectionsL1405"), 3); // Upper mass selection
rSelections.fill(HIST("hSelectionsL1405"), 3); // Upper mass selection

// Daughter Pi properties
lambda1405Cand.piId = piTrack.globalIndex();
Expand All @@ -653,7 +654,7 @@ struct lambda1405analysis {
lambda1405Cand.phi = std::atan2(lambda1405Cand.py, lambda1405Cand.px);
lambda1405Cand.scalarProd = -1;
fillHistosLambda1405(lambda1405Cand, piTrack);
rSelections.fill(HIST("hSelectionsL1405"), 4); // Accepted
rSelections.fill(HIST("hSelectionsL1405"), 4); // Accepted
selectedCandidates.push_back(lambda1405Cand);
}
}
Expand Down Expand Up @@ -785,8 +786,9 @@ struct lambda1405analysis {
}
PROCESS_SWITCH(lambda1405analysis, processDataWCentQVecs, "Data processing with centrality and Q vectors info", false);

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

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

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

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

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

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

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

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

auto lambda1405Mother = particlesMC.rawIteratorAt(lambda1405Id);
float lambda1405Mass = std::sqrt(lambda1405Mother.e() * lambda1405Mother.e() - lambda1405Mother.p() * lambda1405Mother.p());
Expand Down
Loading