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
29 changes: 13 additions & 16 deletions PWGLF/TableProducer/Strangeness/sigma0builder.cxx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.

Check failure on line 1 in PWGLF/TableProducer/Strangeness/sigma0builder.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/workflow-file]

Name of a workflow file must match the name of the main struct in it (without the PWG prefix). (Class implementation files should be in "Core" directories.)
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
Expand Down Expand Up @@ -182,8 +182,8 @@
// Lambda criteria:
struct : ConfigurableGroup {
std::string prefix = "lambdaSelections"; // JSON group name
Configurable<float> Lambda_MLThreshold{"Lambda_MLThreshold", 0.1, "Decision Threshold value to select lambdas"};

Check failure on line 185 in PWGLF/TableProducer/Strangeness/sigma0builder.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/configurable]

Use lowerCamelCase for names of configurables and use the same name for the struct member as for the JSON string. (Declare the type and names on the same line.)
Configurable<float> AntiLambda_MLThreshold{"AntiLambda_MLThreshold", 0.1, "Decision Threshold value to select antilambdas"};

Check failure on line 186 in PWGLF/TableProducer/Strangeness/sigma0builder.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/configurable]

Use lowerCamelCase for names of configurables and use the same name for the struct member as for the JSON string. (Declare the type and names on the same line.)
Configurable<bool> doMCAssociation{"doMCAssociation", false, "if MC, select true lambda/alambdas only"};
Configurable<float> LambdaMinDCANegToPv{"LambdaMinDCANegToPv", .05, "min DCA Neg To PV (cm)"};
Configurable<float> LambdaMinDCAPosToPv{"LambdaMinDCAPosToPv", .05, "min DCA Pos To PV (cm)"};
Expand Down Expand Up @@ -1096,7 +1096,7 @@
for (size_t i = 0; i < cluster.mcParticleIds().size(); i++) {

int mcId = cluster.mcParticleIds()[i];
auto mcPart = mcparticles.iteratorAt(mcId);
auto mcPart = mcparticles.rawIteratorAt(mcId);

// Accumulate total momentum (fallback strategy)
sumPx += mcPart.px();
Expand All @@ -1112,31 +1112,28 @@
if (daughterId < 0)
continue; // Not from Sigma0 -> try next contributor

auto mcPhoton = mcparticles.iteratorAt(daughterId);

// Sanity check: are we getting the correct particles?
auto dummy = mcparticles.rawIteratorAt(daughterId);
if (mcPhoton.globalIndex() != dummy.globalIndex())
LOGF(fatal, "The behave of rawIteratorAt != iteratorAt. Index %i != %i. Please check. Aborting.", mcPhoton.globalIndex(), dummy.globalIndex());
auto mcPhoton = mcparticles.rawIteratorAt(daughterId);

// Require true photon, please
if (mcPhoton.pdgCode() != PDG_t::kGamma)
continue;

// Get Sigma0 index from photon mother
auto mothers = mcPhoton.mothersIds();
if (mothers.empty()) // No mothers? Weird
auto const& photonMothers = mcPhoton.template mothers_as<aod::McParticles>();
if (photonMothers.empty()) // No mothers? Weird
continue;

int sigmaIndex = mothers[0];
// Assumption: first mother is the physical one
auto const& photonMother = photonMothers.front();
int photonMotherIndex = photonMother.globalIndex();

// ------------------------------------------------------------
// Check 2:
// Does this photon share the same mother as the Lambda?
// ------------------------------------------------------------
if (sigmaIndex == lambdaMotherIndex) {
if (photonMotherIndex == lambdaMotherIndex) {
matchedPhotonId = daughterId;
matchedMotherIndex = sigmaIndex;
matchedMotherIndex = photonMotherIndex;
MCinfo.EMCalClusterAmplitude = cluster.amplitudeA()[i];
break; // SUCCESS -> stop loop
}
Expand All @@ -1148,8 +1145,8 @@

if (matchedPhotonId >= 0 && matchedMotherIndex >= 0) {

auto mcPhoton = mcparticles.iteratorAt(matchedPhotonId);
auto mcSigma = mcparticles.iteratorAt(matchedMotherIndex);
auto mcPhoton = mcparticles.rawIteratorAt(matchedPhotonId);
auto mcSigma = mcparticles.rawIteratorAt(matchedMotherIndex);

// --- Pair (Sigma0) information
MCinfo.fV0PairProducedByGenerator = mcSigma.producedByGenerator();
Expand All @@ -1172,7 +1169,7 @@
MCinfo.V01PDGCode = mcPhoton.pdgCode();

if (!mcPhoton.mothersIds().empty()) {
auto mcMother = mcparticles.iteratorAt(mcPhoton.mothersIds()[0]);
auto mcMother = mcparticles.rawIteratorAt(mcPhoton.mothersIds()[0]);
MCinfo.V01PDGCodeMother = mcMother.pdgCode();
}

Expand Down Expand Up @@ -1285,7 +1282,7 @@
}
if (fillHists)
histos.fill(HIST("hEventSelection"), 16 /* INEL > 0 */);
if (eventSelections.requireINEL1 && collision.multNTracksPVeta1() < 2) {

Check failure on line 1285 in PWGLF/TableProducer/Strangeness/sigma0builder.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;
}
if (fillHists)
Expand Down Expand Up @@ -1398,7 +1395,7 @@
continue;
}

if (eventSelections.requireINEL1 && mcCollision.multMCNParticlesEta10() < 2) {

Check failure on line 1398 in PWGLF/TableProducer/Strangeness/sigma0builder.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.
continue;
}
}
Expand Down Expand Up @@ -1475,7 +1472,7 @@
continue;
}

if (eventSelections.requireINEL1 && mcCollision.multMCNParticlesEta10() < 2) {

Check failure on line 1475 in PWGLF/TableProducer/Strangeness/sigma0builder.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.
continue;
}
}
Expand Down Expand Up @@ -1606,7 +1603,7 @@
for (auto const& daughter : daughters) {
histos.fill(HIST("GenQA/h2dSigma0NDaughtersVsPDG"), daughters.size(), daughter.pdgCode());

if (GenInfo.NDaughters == 2) {

Check failure on line 1606 in PWGLF/TableProducer/Strangeness/sigma0builder.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 (daughter.pdgCode() == PDG_t::kGamma)
GenInfo.MCDau1Pt = daughter.pt();

Expand Down Expand Up @@ -2405,7 +2402,7 @@
// Momentum components
float gammapx = gammapT * std::cos(gamma.phi());
float gammapy = gammapT * std::sin(gamma.phi());
float gammapz = gammapT * std::sinh(gamma.phi());
float gammapz = gammapT * std::sinh(gamma.eta());

//_______________________________________________
// Sigma0 pre-selections
Expand Down Expand Up @@ -2957,7 +2954,7 @@
auto v0MC = v0.template v0MCCore_as<soa::Join<aod::V0MCCores, aod::V0MCCollRefs>>();
auto mcv0Photon = mcparticles.rawIteratorAt(v0MC.particleIdMC());

if (mcv0Photon.pdgCode() != PDG_t::kGamma || !mcv0Photon.isPhysicalPrimary() || TMath::Abs(mcv0Photon.y()) > 0.5)

Check failure on line 2957 in PWGLF/TableProducer/Strangeness/sigma0builder.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.
continue;

// MC pT histo
Expand Down Expand Up @@ -3047,7 +3044,7 @@
// Select TRUE + PRIMARY photons
// ============================================================

if (mcPhoton.pdgCode() != PDG_t::kGamma || !mcPhoton.isPhysicalPrimary() || TMath::Abs(mcPhoton.y()) > 0.5)

Check failure on line 3047 in PWGLF/TableProducer/Strangeness/sigma0builder.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.
continue;

// ============================================================
Expand Down Expand Up @@ -3104,7 +3101,7 @@

// Process MC generated photons
for (const auto& mcpart : mcparticles) {
if (mcpart.pdgCode() != PDG_t::kGamma || !mcpart.isPhysicalPrimary() || TMath::Abs(mcpart.y()) > 0.5)

Check failure on line 3104 in PWGLF/TableProducer/Strangeness/sigma0builder.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.
continue;

histos.fill(HIST("PhotonMCQA/hGenPhoton"), mcpart.pt());
Expand Down
64 changes: 32 additions & 32 deletions PWGLF/Tasks/Strangeness/sigmaanalysis.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,8 @@
#include "ReconstructionDataFormats/Track.h"

#include <Math/Vector4D.h>
#include <TDatabasePDG.h>
#include <TFile.h>
#include <TH2F.h>
#include <TLorentzVector.h>
#include <TPDGCode.h>
#include <TProfile.h>

Expand Down Expand Up @@ -258,6 +256,7 @@ struct sigmaanalysis {
ConfigurableAxis axisPt{"axisPt", {VARIABLE_WIDTH, 0.0f, 0.1f, 0.2f, 0.3f, 0.4f, 0.5f, 0.6f, 0.7f, 0.8f, 0.9f, 1.0f, 1.1f, 1.2f, 1.3f, 1.4f, 1.5f, 1.6f, 1.7f, 1.8f, 1.9f, 2.0f, 2.2f, 2.4f, 2.6f, 2.8f, 3.0f, 3.2f, 3.4f, 3.6f, 3.8f, 4.0f, 4.4f, 4.8f, 5.2f, 5.6f, 6.0f, 6.5f, 7.0f, 7.5f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 17.0f, 19.0f, 21.0f, 23.0f, 25.0f, 30.0f, 35.0f, 40.0f, 50.0f}, "p_{T} (GeV/c)"};
ConfigurableAxis axisInvPt{"axisInvPt", {VARIABLE_WIDTH, 0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 2.0, 5.0, 10.0, 20.0, 50.0}, ""};
ConfigurableAxis axisDeltaPt{"axisDeltaPt", {400, -50.0, 50.0}, ""};
ConfigurableAxis axisReso{"axisReso", {400, -2.0, 2.0}, ""};
ConfigurableAxis axisRapidity{"axisRapidity", {100, -2.0f, 2.0f}, "Rapidity"};
ConfigurableAxis axisIRBinning{"axisIRBinning", {150, 0, 1500}, "Binning for the interaction rate (kHz)"};
ConfigurableAxis axisNch{"axisNch", {300, 0.0f, 3000.0f}, "N_{ch}"};
Expand Down Expand Up @@ -502,18 +501,16 @@ struct sigmaanalysis {
histos.add(histodir + "/MC/ASigma0/h3dMCProcess", "h3dMCProcess", kTH3D, {{50, -0.5f, 49.5f}, axisPt, axisSigmaMass});

// pT Resolution:
if (fillResoQAhistos && histodir == "BeforeSel") {
histos.add(histodir + "/MC/Reso/h2dGammaInvPtResolution", "h2dGammaPtResolution", kTH2D, {axisInvPt, axisDeltaPt});
if (fillResoQAhistos) {
histos.add(histodir + "/MC/Reso/h2dGammaPtResolution", "h2dGammaPtResolution", kTH2D, {axisInvPt, axisReso});
histos.add(histodir + "/MC/Reso/h2dGammaInvPtResolution", "h2dGammaInvPtResolution", kTH2D, {axisInvPt, axisDeltaPt});
histos.add(histodir + "/MC/Reso/h2dLambdaPtResolution", "h2dLambdaPtResolution", kTH2D, {axisInvPt, axisDeltaPt});
histos.add(histodir + "/MC/Reso/h3dLambdaPtResoVsTPCCR", "h3dLambdaPtResoVsTPCCR", kTH3D, {axisInvPt, axisDeltaPt, axisTPCrows});
histos.add(histodir + "/MC/Reso/h3dLambdaPtResoVsTPCCR", "h3dLambdaPtResoVsTPCCR", kTH3D, {axisInvPt, axisDeltaPt, axisTPCrows});
histos.add(histodir + "/MC/Reso/h2dAntiLambdaPtResolution", "h2dAntiLambdaPtResolution", kTH2D, {axisInvPt, axisDeltaPt});
histos.add(histodir + "/MC/Reso/h3dAntiLambdaPtResoVsTPCCR", "h3dAntiLambdaPtResoVsTPCCR", kTH3D, {axisInvPt, axisDeltaPt, axisTPCrows});
histos.add(histodir + "/MC/Reso/h3dAntiLambdaPtResoVsTPCCR", "h3dAntiLambdaPtResoVsTPCCR", kTH3D, {axisInvPt, axisDeltaPt, axisTPCrows});
histos.add(histodir + "/MC/Reso/h2dSigma0PtResolution", "h2dSigma0PtResolution", kTH2D, {axisInvPt, axisDeltaPt});
histos.add(histodir + "/MC/Reso/h2dSigma0PtResolution", "h2dSigma0PtResolution", kTH2D, {axisInvPt, axisReso});
histos.add(histodir + "/MC/Reso/h2dSigma0InvPtResolution", "h2dSigma0InvPtResolution", kTH2D, {axisInvPt, axisDeltaPt});
histos.add(histodir + "/MC/Reso/h2dAntiSigma0PtResolution", "h2dAntiSigma0PtResolution", kTH2D, {axisInvPt, axisDeltaPt});
histos.add(histodir + "/MC/Reso/h2dAntiSigma0PtResolution", "h2dAntiSigma0PtResolution", kTH2D, {axisInvPt, axisReso});
histos.add(histodir + "/MC/Reso/h2dSigma0RadiusResolution", "h2dSigma0RadiusResolution", kTH2D, {axisPt, axisDeltaPt});
histos.add(histodir + "/MC/Reso/h2dASigma0RadiusResolution", "h2dASigma0RadiusResolution", kTH2D, {axisPt, axisDeltaPt});
}
Expand Down Expand Up @@ -1003,52 +1000,55 @@ struct sigmaanalysis {
return TrkCode;
}

template <typename TSigma0Object>
template <int mode, typename TSigma0Object>
void getResolution(TSigma0Object const& sigma)
{

// Check whether it is before or after selections
static constexpr std::string_view MainDir[] = {"BeforeSel", "AfterSel"};

//_______________________________________
// Gamma MC association
if (sigma.photonPDGCode() == 22) {
if (sigma.photonPDGCode() == PDG_t::kGamma) {
if (sigma.photonmcpt() > 0) {
histos.fill(HIST("BeforeSel/MC/Reso/h2dGammaPtResolution"), sigma.photonmcpt(), sigma.photonPt() - sigma.photonmcpt()); // pT resolution
histos.fill(HIST("BeforeSel/MC/Reso/h2dGammaInvPtResolution"), 1.f / sigma.photonmcpt(), 1.f / sigma.photonPt() - 1.f / sigma.photonmcpt()); // pT resolution
histos.fill(HIST(MainDir[mode]) + HIST("/MC/Reso/h2dGammaPtResolution"), sigma.photonmcpt(), (sigma.photonPt() / sigma.photonmcpt()) - 1.f); // pT resolution
histos.fill(HIST(MainDir[mode]) + HIST("/MC/Reso/h2dGammaInvPtResolution"), 1.f / sigma.photonmcpt(), 1.f / sigma.photonPt() - 1.f / sigma.photonmcpt()); // pT resolution
}
}

//_______________________________________
// Lambda MC association
if (sigma.lambdaPDGCode() == 3122) {
if (sigma.lambdaPDGCode() == PDG_t::kLambda0) {
if (sigma.lambdamcpt() > 0) {
histos.fill(HIST("BeforeSel/MC/Reso/h2dLambdaPtResolution"), 1.f / sigma.lambdamcpt(), 1.f / sigma.lambdaPt() - 1.f / sigma.lambdamcpt()); // 1/pT resolution
histos.fill(HIST("BeforeSel/MC/Reso/h3dLambdaPtResoVsTPCCR"), 1.f / sigma.lambdamcpt(), 1.f / sigma.lambdaPt() - 1.f / sigma.lambdamcpt(), -1 * sigma.lambdaNegTPCCrossedRows()); // 1/pT resolution
histos.fill(HIST("BeforeSel/MC/Reso/h3dLambdaPtResoVsTPCCR"), 1.f / sigma.lambdamcpt(), 1.f / sigma.lambdaPt() - 1.f / sigma.lambdamcpt(), sigma.lambdaPosTPCCrossedRows()); // 1/pT resolution
histos.fill(HIST(MainDir[mode]) + HIST("/MC/Reso/h2dLambdaPtResolution"), 1.f / sigma.lambdamcpt(), 1.f / sigma.lambdaPt() - 1.f / sigma.lambdamcpt()); // 1/pT resolution
histos.fill(HIST(MainDir[mode]) + HIST("/MC/Reso/h3dLambdaPtResoVsTPCCR"), 1.f / sigma.lambdamcpt(), 1.f / sigma.lambdaPt() - 1.f / sigma.lambdamcpt(), -1 * sigma.lambdaNegTPCCrossedRows()); // 1/pT resolution
histos.fill(HIST(MainDir[mode]) + HIST("/MC/Reso/h3dLambdaPtResoVsTPCCR"), 1.f / sigma.lambdamcpt(), 1.f / sigma.lambdaPt() - 1.f / sigma.lambdamcpt(), sigma.lambdaPosTPCCrossedRows()); // 1/pT resolution
}
}

//_______________________________________
// AntiLambda MC association
if (sigma.lambdaPDGCode() == -3122) {
if (sigma.lambdaPDGCode() == PDG_t::kLambda0Bar) {
if (sigma.lambdamcpt() > 0) {
histos.fill(HIST("BeforeSel/MC/Reso/h2dAntiLambdaPtResolution"), 1.f / sigma.lambdamcpt(), 1.f / sigma.lambdaPt() - 1.f / sigma.lambdamcpt()); // pT resolution
histos.fill(HIST("BeforeSel/MC/Reso/h3dAntiLambdaPtResoVsTPCCR"), 1.f / sigma.lambdamcpt(), 1.f / sigma.lambdaPt() - 1.f / sigma.lambdamcpt(), -1 * sigma.lambdaNegTPCCrossedRows()); // 1/pT resolution
histos.fill(HIST("BeforeSel/MC/Reso/h3dAntiLambdaPtResoVsTPCCR"), 1.f / sigma.lambdamcpt(), 1.f / sigma.lambdaPt() - 1.f / sigma.lambdamcpt(), sigma.lambdaPosTPCCrossedRows()); // 1/pT resolution
histos.fill(HIST(MainDir[mode]) + HIST("/MC/Reso/h2dAntiLambdaPtResolution"), 1.f / sigma.lambdamcpt(), 1.f / sigma.lambdaPt() - 1.f / sigma.lambdamcpt()); // pT resolution
histos.fill(HIST(MainDir[mode]) + HIST("/MC/Reso/h3dAntiLambdaPtResoVsTPCCR"), 1.f / sigma.lambdamcpt(), 1.f / sigma.lambdaPt() - 1.f / sigma.lambdamcpt(), -1 * sigma.lambdaNegTPCCrossedRows()); // 1/pT resolution
histos.fill(HIST(MainDir[mode]) + HIST("/MC/Reso/h3dAntiLambdaPtResoVsTPCCR"), 1.f / sigma.lambdamcpt(), 1.f / sigma.lambdaPt() - 1.f / sigma.lambdamcpt(), sigma.lambdaPosTPCCrossedRows()); // 1/pT resolution
}
}

//_______________________________________
// Sigma and AntiSigma MC association
if (sigma.isSigma0()) {
histos.fill(HIST("BeforeSel/MC/Reso/h2dSigma0RadiusResolution"), sigma.mcpt(), sigma.radius() - sigma.mcradius()); // pT resolution
histos.fill(HIST(MainDir[mode]) + HIST("/MC/Reso/h2dSigma0RadiusResolution"), sigma.mcpt(), sigma.radius() - sigma.mcradius()); // pT resolution
if (sigma.mcpt() > 0) {
histos.fill(HIST("BeforeSel/MC/Reso/h2dSigma0PtResolution"), sigma.mcpt(), sigma.pt() - sigma.mcpt()); // pT resolution
histos.fill(HIST("BeforeSel/MC/Reso/h2dSigma0InvPtResolution"), 1.f / sigma.mcpt(), 1.f / sigma.pt() - 1.f / sigma.mcpt()); // pT resolution
histos.fill(HIST(MainDir[mode]) + HIST("/MC/Reso/h2dSigma0PtResolution"), sigma.mcpt(), (sigma.pt() / sigma.mcpt()) - 1.f); // pT resolution
histos.fill(HIST(MainDir[mode]) + HIST("/MC/Reso/h2dSigma0InvPtResolution"), 1.f / sigma.mcpt(), 1.f / sigma.pt() - 1.f / sigma.mcpt()); // pT resolution
}
}
if (sigma.isAntiSigma0()) {
histos.fill(HIST("BeforeSel/MC/Reso/h2dASigma0RadiusResolution"), sigma.mcpt(), sigma.radius() - sigma.mcradius()); // pT resolution
histos.fill(HIST(MainDir[mode]) + HIST("/MC/Reso/h2dASigma0RadiusResolution"), sigma.mcpt(), sigma.radius() - sigma.mcradius()); // pT resolution
if (sigma.mcpt() > 0)
histos.fill(HIST("BeforeSel/MC/Reso/h2dAntiSigma0PtResolution"), 1.f / sigma.mcpt(), 1.f / sigma.pt() - 1.f / sigma.mcpt()); // pT resolution
histos.fill(HIST(MainDir[mode]) + HIST("/MC/Reso/h2dAntiSigma0PtResolution"), 1.f / sigma.mcpt(), 1.f / sigma.pt() - 1.f / sigma.mcpt()); // pT resolution
}
}

Expand All @@ -1072,24 +1072,24 @@ struct sigmaanalysis {

//_______________________________________
// Real Gamma x Real Lambda - but not from the same sigma0/antisigma0!
if ((PhotonPDGCode == 22) && ((LambdaPDGCode == 3122) || (LambdaPDGCode == -3122)) && (!fIsSigma && !fIsAntiSigma)) {
if ((PhotonPDGCode == PDG_t::kGamma) && ((LambdaPDGCode == PDG_t::kLambda0) || (LambdaPDGCode == PDG_t::kLambda0Bar)) && (!fIsSigma && !fIsAntiSigma)) {
histos.fill(HIST(MainDir[mode]) + HIST("/MC/BkgStudy/h2dPtVsMassSigma_TrueDaughters"), sigmapT, sigmaMass);
histos.fill(HIST(MainDir[mode]) + HIST("/MC/BkgStudy/h2dTrueDaughtersMatrix"), LambdaPDGCodeMother, PhotonPDGCodeMother);
}

//_______________________________________
// Real Gamma x fake Lambda
if ((PhotonPDGCode == 22) && (LambdaPDGCode != 3122) && (LambdaPDGCode != -3122))
if ((PhotonPDGCode == PDG_t::kGamma) && (LambdaPDGCode != PDG_t::kLambda0) && (LambdaPDGCode != PDG_t::kLambda0Bar))
histos.fill(HIST(MainDir[mode]) + HIST("/MC/BkgStudy/h2dPtVsMassSigma_TrueGammaFakeLambda"), sigmapT, sigmaMass);

//_______________________________________
// Fake Gamma x Real Lambda
if ((PhotonPDGCode != 22) && ((LambdaPDGCode == 3122) || (LambdaPDGCode == -3122)))
if ((PhotonPDGCode != PDG_t::kGamma) && ((LambdaPDGCode == PDG_t::kLambda0) || (LambdaPDGCode == PDG_t::kLambda0Bar)))
histos.fill(HIST(MainDir[mode]) + HIST("/MC/BkgStudy/h2dPtVsMassSigma_FakeGammaTrueLambda"), sigmapT, sigmaMass);

//_______________________________________
// Fake Gamma x Fake Lambda
if ((PhotonPDGCode != 22) && (LambdaPDGCode != 3122) && (LambdaPDGCode != -3122))
if ((PhotonPDGCode != PDG_t::kGamma) && (LambdaPDGCode != PDG_t::kLambda0) && (LambdaPDGCode != PDG_t::kLambda0Bar))
histos.fill(HIST(MainDir[mode]) + HIST("/MC/BkgStudy/h2dPtVsMassSigma_FakeDaughters"), sigmapT, sigmaMass);
}

Expand Down Expand Up @@ -1220,7 +1220,7 @@ struct sigmaanalysis {

//_______________________________________
// MC specific
if (doprocessMonteCarlo) {
if (doprocessMonteCarlo || doprocessMonteCarloWithEMCal) {
if constexpr (requires { sigma.lambdaPDGCode(); sigma.photonPDGCode(); }) {

if (fillSelhistos) {
Expand Down Expand Up @@ -1302,8 +1302,8 @@ struct sigmaanalysis {

//_______________________________________
// pT resolution histos
if ((mode == 0) && fillResoQAhistos)
getResolution(sigma);
if (fillResoQAhistos)
getResolution<mode>(sigma);
}
}
}
Expand Down
Loading