Skip to content

Commit aeec919

Browse files
authored
[PWGLF] Added Lambda1520 for MC prediction (#16181)
1 parent 3d9ceef commit aeec919

2 files changed

Lines changed: 13 additions & 7 deletions

File tree

PWGLF/Tasks/QC/mcParticlePrediction.cxx

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ using namespace o2::pwglf;
5757
// Particles
5858
static const std::vector<std::string> parameterNames{"Enable"};
5959
static constexpr int nParameters = 1;
60-
static const int defaultParticles[PIDExtended::NIDsTot][nParameters]{{0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {1}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}};
60+
static const int defaultParticles[PIDExtended::NIDsTot][nParameters]{{0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {1}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}};
6161
bool enabledParticlesArray[PIDExtended::NIDsTot];
6262

6363
// Estimators
@@ -158,7 +158,7 @@ std::array<std::shared_ptr<TH2>, Estimators::nEstimators> hvertexPosZ;
158158
std::array<std::array<std::shared_ptr<TH2>, PIDExtended::NIDsTot>, Estimators::nEstimators> hpt;
159159
std::array<std::array<std::shared_ptr<TH1>, PIDExtended::NIDsTot>, Estimators::nEstimators> hyield;
160160

161-
struct mcParticlePrediction {
161+
struct McParticlePrediction {
162162

163163
// Histograms
164164
HistogramRegistry histos{"Histos", {}, OutputObjHandlingPolicy::AnalysisObject};
@@ -195,6 +195,8 @@ struct mcParticlePrediction {
195195
Configurable<bool> enableVsEta05Histograms{"enableVsEta05Histograms", true, "Enables the correlation between ETA05 and other estimators"};
196196
Configurable<bool> enableVsEta08Histograms{"enableVsEta08Histograms", true, "Enables the correlation between ETA08 and other estimators"};
197197
Configurable<bool> enableVsImpactParameterHistograms{"enableVsImpactParameterHistograms", true, "Enables the correlation between impact parameter and other estimators"};
198+
Configurable<float> cfgEvtZvtxCut{"cfgEvtZvtxCut", 10.0f, "Evt sel: Max. z-Vertex (cm)"};
199+
Configurable<float> chargetolerance{"chargetolerance", 1e-3, "Tolerance to consider a particle as charged based on its charge"};
198200

199201
Service<o2::framework::O2DatabasePDG> pdgDB;
200202
o2::pwglf::ParticleCounter<o2::framework::O2DatabasePDG> mCounter;
@@ -456,7 +458,7 @@ struct mcParticlePrediction {
456458
}
457459

458460
histos.fill(HIST("collisions/generated"), 1);
459-
if (std::abs(mcCollision.posZ()) > 10.f) {
461+
if (std::abs(mcCollision.posZ()) > cfgEvtZvtxCut) {
460462
return;
461463
}
462464
histos.fill(HIST("collisions/generated"), 2);
@@ -500,7 +502,7 @@ struct mcParticlePrediction {
500502

501503
TParticlePDG* p = pdgDB->GetParticle(particle.pdgCode());
502504
if (p) {
503-
if (std::abs(p->Charge()) > 1e-3) {
505+
if (std::abs(p->Charge()) > chargetolerance) {
504506
histos.fill(HIST("particles/eta/charged"), particle.eta());
505507
} else {
506508
histos.fill(HIST("particles/eta/neutral"), particle.eta());
@@ -721,7 +723,7 @@ struct mcParticlePrediction {
721723
hestimatorsRecoEvVsBCId[i]->Fill(foundBCid, nMultReco[i]);
722724
}
723725
}
724-
PROCESS_SWITCH(mcParticlePrediction, processReco, "Process the reco info", true);
726+
PROCESS_SWITCH(McParticlePrediction, processReco, "Process the reco info", true);
725727
};
726728

727-
WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) { return WorkflowSpec{adaptAnalysisTask<mcParticlePrediction>(cfgc)}; }
729+
WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) { return WorkflowSpec{adaptAnalysisTask<McParticlePrediction>(cfgc)}; }

PWGLF/Utils/mcParticle.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,8 @@ class PIDExtended
134134
static constexpr ID KstarPM = PIDCounts + 40;
135135
static constexpr ID Kshort = PIDCounts + 41;
136136
static constexpr ID Xi1530 = PIDCounts + 42;
137-
static constexpr ID NIDsTot = PIDCounts + 43;
137+
static constexpr ID Lambda1520 = PIDCounts + 43;
138+
static constexpr ID NIDsTot = PIDCounts + 44;
138139

139140
static constexpr const char* sNames[NIDsTot + 1] = {
140141
o2::track::pid_constants::sNames[Electron], // Electron
@@ -199,6 +200,7 @@ class PIDExtended
199200
"KstarPM", // KstarPM
200201
"Kshort", // Kshort
201202
"Xi1530", // Xi1530
203+
"Lambda1520", // Lambda1520
202204
nullptr};
203205

204206
static std::vector<std::string> arrayNames()
@@ -341,6 +343,8 @@ class PIDExtended
341343
return Kshort;
342344
case 3324:
343345
return Xi1530;
346+
case 3124:
347+
return Lambda1520;
344348
default:
345349
LOG(debug) << "Cannot identify particle with PDG code " << particle.pdgCode();
346350
break;

0 commit comments

Comments
 (0)