@@ -57,7 +57,7 @@ using namespace o2::pwglf;
5757// Particles
5858static const std::vector<std::string> parameterNames{" Enable" };
5959static 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 } };
6161bool enabledParticlesArray[PIDExtended::NIDsTot];
6262
6363// Estimators
@@ -158,7 +158,7 @@ std::array<std::shared_ptr<TH2>, Estimators::nEstimators> hvertexPosZ;
158158std::array<std::array<std::shared_ptr<TH2>, PIDExtended::NIDsTot>, Estimators::nEstimators> hpt;
159159std::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)}; }
0 commit comments