Skip to content
Open
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
12 changes: 6 additions & 6 deletions PWGCF/Femto/Core/cascadeHistManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -618,16 +618,16 @@ class CascadeHistManager
mHistogramRegistry->fill(HIST(cascadePrefix) + HIST(McDir) + HIST(getHistName(kPdg, HistTable)), mcParticle.pdgCode());

// get mother
if (cascadeCandidate.has_fMcMother()) {
auto mother = cascadeCandidate.template fMcMother_as<T3>();
if (mcParticle.has_fMcMother()) {
auto mother = mcParticle.template fMcMother_as<T3>();
mHistogramRegistry->fill(HIST(cascadePrefix) + HIST(McDir) + HIST(getHistName(kPdgMother, HistTable)), mother.pdgCode());
} else {
mHistogramRegistry->fill(HIST(cascadePrefix) + HIST(McDir) + HIST(getHistName(kPdgMother, HistTable)), 0);
}

// get partonic mother
if (cascadeCandidate.has_fMcPartMoth()) {
auto partonicMother = cascadeCandidate.template fMcPartMoth_as<T4>();
if (mcParticle.has_fMcPartMoth()) {
auto partonicMother = mcParticle.template fMcPartMoth_as<T4>();
mHistogramRegistry->fill(HIST(cascadePrefix) + HIST(McDir) + HIST(getHistName(kPdgPartonicMother, HistTable)), partonicMother.pdgCode());
} else {
mHistogramRegistry->fill(HIST(cascadePrefix) + HIST(McDir) + HIST(getHistName(kPdgPartonicMother, HistTable)), 0);
Expand All @@ -652,8 +652,8 @@ class CascadeHistManager
mHistogramRegistry->fill(HIST(cascadePrefix) + HIST(McDir) + HIST(getHistName(kFromMaterial, HistTable)), cascadeCandidate.pt(), cascadeCandidate.cascadeCosPa());
break;
case modes::McOrigin::kFromSecondaryDecay:
if (cascadeCandidate.has_fMcMother()) {
auto mother = cascadeCandidate.template fMcMother_as<T3>();
if (mcParticle.has_fMcMother()) {
auto mother = mcParticle.template fMcMother_as<T3>();
int motherPdgCode = std::abs(mother.pdgCode());
// Switch on PDG of the mother
if (mPlotNSecondaries >= histmanager::kSecondaryPlotLevel1 && motherPdgCode == mPdgCodesSecondaryMother[0]) {
Expand Down
15 changes: 10 additions & 5 deletions PWGCF/Femto/Core/collisionHistManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ enum ColHist {
kCentVsSphericity,
kMultVsSphericity,
// mc
kTruePosZVsPosZ,
kTrueCentVsCent,
kTrueMultVsMult,
kColHistLast
Expand Down Expand Up @@ -80,6 +81,7 @@ constexpr std::array<histmanager::HistInfo<ColHist>, kColHistLast> HistTable = {
{kMultVsSphericity, o2::framework::HistType::kTH2F, "hMultVsSphericity", "Multiplicity vs Sphericity; Multiplicity; Sphericity"},
{kCentVsSphericity, o2::framework::HistType::kTH2F, "hCentVsSphericity", "Centrality vs Sphericity; Centrality (%); Sphericity"},
// mc
{kTruePosZVsPosZ, o2::framework::HistType::kTH2F, "hTruePosZVsPosZ", "True Vertex Z vs Vertex Z; V_{Z,True} (cm); V_{Z} (cm)"},
{kTrueCentVsCent, o2::framework::HistType::kTH2F, "hTrueCentVsCent", "True centrality vs centrality; Centrality_{True} (%); Centrality (%)"},
{kTrueMultVsMult, o2::framework::HistType::kTH2F, "hTrueMultVsMult", "True multiplicity vs multiplicity; Multiplicity_{True}; Multiplicity"},
}};
Expand All @@ -102,9 +104,10 @@ constexpr std::array<histmanager::HistInfo<ColHist>, kColHistLast> HistTable = {
{kMultVsSphericity, {confAnalysis.mult, confQa.sphericity}}, \
{kCentVsSphericity, {confBinningAnalysis.cent, confQa.sphericity}},

#define COL_HIST_MC_MAP(conf) \
{kTrueMultVsMult, {conf.mult, conf.mult}}, \
{kTrueCentVsCent, {conf.cent, conf.cent}},
#define COL_HIST_MC_MAP(conf) \
{kTruePosZVsPosZ, {conf.vtxZ, conf.vtxZ}}, \
{kTrueCentVsCent, {conf.cent, conf.cent}}, \
{kTrueMultVsMult, {conf.mult, conf.mult}},

template <typename T>
auto makeColHistSpecMap(const T& confBinningAnalysis)
Expand Down Expand Up @@ -253,8 +256,9 @@ class CollisionHistManager
void initMc(std::map<ColHist, std::vector<o2::framework::AxisSpec>> const& Specs)
{
std::string mcDir = std::string(McDir);
mHistogramRegistry->add(mcDir + getHistNameV2(kTrueMultVsMult, HistTable), getHistDesc(kTrueMultVsMult, HistTable), getHistType(kTrueMultVsMult, HistTable), {Specs.at(kTrueMultVsMult)});
mHistogramRegistry->add(mcDir + getHistNameV2(kTruePosZVsPosZ, HistTable), getHistDesc(kTruePosZVsPosZ, HistTable), getHistType(kTruePosZVsPosZ, HistTable), {Specs.at(kTruePosZVsPosZ)});
mHistogramRegistry->add(mcDir + getHistNameV2(kTrueCentVsCent, HistTable), getHistDesc(kTrueCentVsCent, HistTable), getHistType(kTrueCentVsCent, HistTable), {Specs.at(kTrueCentVsCent)});
mHistogramRegistry->add(mcDir + getHistNameV2(kTrueMultVsMult, HistTable), getHistDesc(kTrueMultVsMult, HistTable), getHistType(kTrueMultVsMult, HistTable), {Specs.at(kTrueMultVsMult)});
}

template <typename T>
Expand Down Expand Up @@ -290,8 +294,9 @@ class CollisionHistManager
return;
}
auto mcCol = col.template fMcCol_as<T2>();
mHistogramRegistry->fill(HIST(McDir) + HIST(getHistName(kTrueMultVsMult, HistTable)), mcCol.mult(), col.mult());
mHistogramRegistry->fill(HIST(McDir) + HIST(getHistName(kTruePosZVsPosZ, HistTable)), mcCol.posZ(), col.posZ());
mHistogramRegistry->fill(HIST(McDir) + HIST(getHistName(kTrueCentVsCent, HistTable)), mcCol.cent(), col.cent());
mHistogramRegistry->fill(HIST(McDir) + HIST(getHistName(kTrueMultVsMult, HistTable)), mcCol.mult(), col.mult());
}

o2::framework::HistogramRegistry* mHistogramRegistry = nullptr;
Expand Down
12 changes: 6 additions & 6 deletions PWGCF/Femto/Core/kinkHistManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -559,16 +559,16 @@ class KinkHistManager
mHistogramRegistry->fill(HIST(kinkPrefix) + HIST(McDir) + HIST(getHistName(kPdg, HistTable)), mcParticle.pdgCode());

// get mother
if (kinkCandidate.has_fMcMother()) {
auto mother = kinkCandidate.template fMcMother_as<T3>();
if (mcParticle.has_fMcMother()) {
auto mother = mcParticle.template fMcMother_as<T3>();
mHistogramRegistry->fill(HIST(kinkPrefix) + HIST(McDir) + HIST(getHistName(kPdgMother, HistTable)), mother.pdgCode());
} else {
mHistogramRegistry->fill(HIST(kinkPrefix) + HIST(McDir) + HIST(getHistName(kPdgMother, HistTable)), 0);
}

// get partonic mother
if (kinkCandidate.has_fMcPartMoth()) {
auto partonicMother = kinkCandidate.template fMcPartMoth_as<T4>();
if (mcParticle.has_fMcPartMoth()) {
auto partonicMother = mcParticle.template fMcPartMoth_as<T4>();
mHistogramRegistry->fill(HIST(kinkPrefix) + HIST(McDir) + HIST(getHistName(kPdgPartonicMother, HistTable)), partonicMother.pdgCode());
} else {
mHistogramRegistry->fill(HIST(kinkPrefix) + HIST(McDir) + HIST(getHistName(kPdgPartonicMother, HistTable)), 0);
Expand All @@ -593,8 +593,8 @@ class KinkHistManager
mHistogramRegistry->fill(HIST(kinkPrefix) + HIST(McDir) + HIST(getHistName(kFromMaterial, HistTable)), kinkCandidate.pt(), kinkCandidate.kinkAngle());
break;
case modes::McOrigin::kFromSecondaryDecay:
if (kinkCandidate.has_fMcMother()) {
auto mother = kinkCandidate.template fMcMother_as<T3>();
if (mcParticle.has_fMcMother()) {
auto mother = mcParticle.template fMcMother_as<T3>();
int motherPdgCode = std::abs(mother.pdgCode());
// Switch on PDG of the mother
if (mPlotNSecondaries >= histmanager::kSecondaryPlotLevel1 && motherPdgCode == mPdgCodesSecondaryMother[0]) {
Expand Down
Loading
Loading