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
1 change: 1 addition & 0 deletions PWGLF/DataModel/LFSlimNucleiTables.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,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 31 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 33 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 35 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 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(TPCsignal, tpcSignal, 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(ITSchi2, itsChi2, 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(TPCchi2, tpcChi2, 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(TOFchi2, tofChi2, 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(Flags, flags, uint16_t);
DECLARE_SOA_COLUMN(TPCfindableCls, tpcFindableCls, uint8_t);

Check failure on line 42 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 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(ITSclsMap, itsClsMap, uint8_t);
DECLARE_SOA_COLUMN(TPCnCls, tpcNCls, uint8_t);
DECLARE_SOA_COLUMN(TPCnClsShared, tpcNClsShared, uint8_t);
Expand Down Expand Up @@ -201,6 +201,7 @@
NucleiTableNS::DCAxy,
NucleiTableNS::DCAz,
NucleiTableNS::Flags,
NucleiFlowTableNS::CentFT0C,
NucleiTableNS::gPt,
NucleiTableNS::McProcess,
NucleiTableNS::PDGcode,
Expand Down
11 changes: 8 additions & 3 deletions PWGLF/TableProducer/QC/nucleiQC.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
#include <cmath>
#include <cstddef>
#include <cstdint>
#include <map>
#include <memory>
#include <stdexcept>
#include <string>
Expand Down Expand Up @@ -517,6 +518,7 @@ struct nucleiQC {
candidate.DCAxy,
candidate.DCAz,
candidate.flags,
candidate.centrality,
candidate.ptGenerated,
candidate.mcProcess,
candidate.pdgCode,
Expand All @@ -531,6 +533,7 @@ struct nucleiQC {
gRandom->SetSeed(67);
std::unordered_set<int> reconstructedMcParticles;
std::unordered_set<int> reconstructedCollisions;
std::map<int, float> mcCollisionIdToCentrality;

for (const auto& collision : collisions) {

Expand All @@ -539,8 +542,10 @@ struct nucleiQC {

if (!nuclei::eventSelection(collision, mHistograms, cfgEventSelections, cfgCutVertex))
continue;
mHistograms.fill(HIST("hCentrality"), nuclei::getCentrality(collision, cfgCentralityEstimator, mHistFailCentrality));
const float centrality = nuclei::getCentrality(collision, cfgCentralityEstimator, mHistFailCentrality);
mHistograms.fill(HIST("hCentrality"), centrality);
reconstructedCollisions.insert(collision.mcCollisionId());
mcCollisionIdToCentrality[collision.mcCollisionId()] = centrality;
mVtx.setPos({collision.posX(), collision.posY(), collision.posZ()});
mVtx.setCov(collision.covXX(), collision.covXY(), collision.covYY(), collision.covXZ(), collision.covYZ(), collision.covZZ());

Expand Down Expand Up @@ -635,8 +640,8 @@ struct nucleiQC {
}

nuclei::SlimCandidate candidate;
// candidate.centrality = nuclei::getCentrality(collision, cfgCentralityEstimator, mHistFailCentrality);
candidate.centrality = -1.f; // centrality is not well defined for non-reconstructed particles, set to -1 for now
const auto& centralityIt = mcCollisionIdToCentrality.find(particle.mcCollisionId());
candidate.centrality = centralityIt != mcCollisionIdToCentrality.end() ? centralityIt->second : -1.f;
fillCollisionFlag(particle, candidate, reconstructedCollisions);
fillNucleusFlagsPdgsMc(particle, candidate);
fillNucleusGeneratedVariables(particle, candidate);
Expand Down
Loading