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
2 changes: 2 additions & 0 deletions PWGLF/DataModel/LFSlimNucleiTables.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,19 @@
DECLARE_SOA_COLUMN(Pt, pt, float);
DECLARE_SOA_COLUMN(Eta, eta, float);
DECLARE_SOA_COLUMN(Phi, phi, float);
DECLARE_SOA_COLUMN(TPCInnerParam, tpcInnerParam, float);

Check failure on line 32 in PWGLF/DataModel/LFSlimNucleiTables.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(Beta, beta, float);
DECLARE_SOA_COLUMN(Zvertex, zVertex, float);

Check failure on line 34 in PWGLF/DataModel/LFSlimNucleiTables.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(NContrib, nContrib, int);
DECLARE_SOA_COLUMN(DCAxy, dcaxy, float);

Check failure on line 36 in PWGLF/DataModel/LFSlimNucleiTables.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(DCAz, dcaz, float);

Check failure on line 37 in PWGLF/DataModel/LFSlimNucleiTables.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(TPCsignal, tpcSignal, float);

Check failure on line 38 in PWGLF/DataModel/LFSlimNucleiTables.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(ITSchi2, itsChi2, float);

Check failure on line 39 in PWGLF/DataModel/LFSlimNucleiTables.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(TPCchi2, tpcChi2, float);

Check failure on line 40 in PWGLF/DataModel/LFSlimNucleiTables.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(TOFchi2, tofChi2, float);

Check failure on line 41 in PWGLF/DataModel/LFSlimNucleiTables.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(Flags, flags, uint16_t);
DECLARE_SOA_COLUMN(TPCfindableCls, tpcFindableCls, uint8_t);

Check failure on line 43 in PWGLF/DataModel/LFSlimNucleiTables.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(TPCcrossedRows, tpcCrossedRows, uint8_t);

Check failure on line 44 in PWGLF/DataModel/LFSlimNucleiTables.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(ITSclsMap, itsClsMap, uint8_t);
DECLARE_SOA_COLUMN(TPCnCls, tpcNCls, uint8_t);
DECLARE_SOA_COLUMN(TPCnClsShared, tpcNClsShared, uint8_t);
Expand All @@ -54,6 +54,7 @@
DECLARE_SOA_COLUMN(MotherPDGcode, MotherpdgCode, int);
DECLARE_SOA_COLUMN(MotherDecRad, motherDecRad, float);
DECLARE_SOA_COLUMN(AbsoDecL, absoDecL, float);
DECLARE_SOA_COLUMN(McProcess, mcProcess, uint64_t);

} // namespace NucleiTableNS

Expand Down Expand Up @@ -197,6 +198,7 @@
NucleiTableNS::DCAxy,
NucleiTableNS::DCAz,
NucleiTableNS::Flags,
NucleiTableNS::McProcess,
NucleiTableNS::PDGcode,
NucleiTableNS::MotherPDGcode);

Expand Down
41 changes: 24 additions & 17 deletions PWGLF/TableProducer/QC/nucleiQC.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
#include "ReconstructionDataFormats/Track.h"

#include "Math/Vector4D.h"
#include "TMCProcess.h"
#include "TRandom3.h"

#include <algorithm>
Expand Down Expand Up @@ -222,27 +223,31 @@ struct nucleiQC {
void fillNucleusFlagsPdgsMc(const Tparticle& particle, nuclei::SlimCandidate& candidate)
{
candidate.pdgCode = particle.pdgCode();
candidate.mcProcess = particle.getProcess();

if (particle.isPhysicalPrimary()) {
candidate.flags |= nuclei::Flags::kIsPhysicalPrimary;

// heavy flavour mother
// if (particle.has_mothers()) {
// for (const auto& motherparticle : particle.mothers_as<aod::McParticles>()) {
// if (std::find(nuclei::hfMothCodes.begin(), nuclei::hfMothCodes.end(), std::abs(motherparticle.pdgCode())) != nuclei::hfMothCodes.end()) {
// flags |= kIsSecondaryFromWeakDecay;
// motherPdgCode = motherparticle.pdgCode();
// break;
// }
// }
//}

} else if (particle.has_mothers()) {
candidate.flags |= nuclei::Flags::kIsSecondaryFromWeakDecay;
if (particle.has_mothers()) {
for (const auto& motherparticle : particle.template mothers_as<aod::McParticles>()) {
candidate.motherPdgCode = motherparticle.pdgCode();
}
}

if (particle.isPhysicalPrimary()) {
candidate.flags |= nuclei::Flags::kIsPhysicalPrimary;

///< heavy flavour mother
/*if (particle.has_mothers()) {
for (const auto& motherparticle : particle.mothers_as<aod::McParticles>()) {
if (std::find(nuclei::hfMothCodes.begin(), nuclei::hfMothCodes.end(), std::abs(motherparticle.pdgCode())) != nuclei::hfMothCodes.end()) {
flags |= kIsSecondaryFromWeakDecay;
motherPdgCode = motherparticle.pdgCode();
break;
}
}
}*/

} else if (particle.getProcess() == TMCProcess::kPDecay) {
///< assuming that strong decays are included in the previous step
candidate.flags |= nuclei::Flags::kIsSecondaryFromWeakDecay;
} else {
candidate.flags |= nuclei::Flags::kIsSecondaryFromMaterial;
}
Expand Down Expand Up @@ -329,7 +334,8 @@ struct nucleiQC {
.ptGenerated = 0.f, // to be filled for mc
.etaGenerated = 0.f,
.phiGenerated = 0.f,
.centrality = nuclei::getCentrality(collision, cfgCentralityEstimator)};
.centrality = nuclei::getCentrality(collision, cfgCentralityEstimator),
.mcProcess = TMCProcess::kPNoProcess};

fillDcaInformation(collision, track, candidate);
fillNucleusFlagsPdgs(iSpecies, collision, track, candidate);
Expand Down Expand Up @@ -486,6 +492,7 @@ struct nucleiQC {
candidate.DCAxy,
candidate.DCAz,
candidate.flags,
candidate.mcProcess,
candidate.pdgCode,
candidate.motherPdgCode);
}
Expand Down
3 changes: 3 additions & 0 deletions PWGLF/Utils/nucleiUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
#include "Framework/HistogramRegistry.h"
#include "Framework/HistogramSpec.h"

#include "TMCProcess.h"

#include <algorithm>
#include <string>
#include <vector>
Expand Down Expand Up @@ -103,6 +105,7 @@ struct SlimCandidate {
float etaGenerated = -999.f;
float phiGenerated = -999.f;
float centrality = -1.f;
uint64_t mcProcess = TMCProcess::kPNoProcess;
};

enum Species {
Expand Down
Loading