@@ -162,6 +162,7 @@ struct nucleiQC {
162162 std::array<bool , nuclei::Species::kNspecies > mFillSpecies {false };
163163 Produces<aod::NucleiTableRed> mNucleiTableRed ;
164164 Produces<aod::NucleiTableExt> mNucleiTableExt ;
165+ Produces<aod::NucleiTableMat> mNucleiTableMat ;
165166
166167 std::vector<nuclei::SlimCandidate> mNucleiCandidates ;
167168 std::vector<int > mFilledMcParticleIds ;
@@ -209,6 +210,7 @@ struct nucleiQC {
209210
210211 nuclei::createHistogramRegistryNucleus<kSpeciesCt >(mHistograms );
211212 mHistograms .add (fmt::format (" {}/hTrackQuality" , nuclei::cNames[kSpeciesRt ]).c_str (), (fmt::format (" {} track quality;" , nuclei::cNames[kSpeciesRt ]) + std::string (" #it{p}_{T} / #it{Z} (GeV/#it{c}); Selection step; Counts" )).c_str (), o2::framework::HistType::kTH2D , {{400 , -10 .0f , 10 .0f }, {trackQuality::kNtrackQuality , -0 .5f , static_cast <float >(trackQuality::kNtrackQuality ) - 0 .5f }});
213+ mHistograms .add (fmt::format (" {}/h2Productionvertex" , nuclei::cNames[kSpeciesRt ]).c_str (), (fmt::format (" {} production vertex;" , nuclei::cNames[kSpeciesRt ]) + std::string (" #it{x} (cm); #it{y} (cm); Counts" )).c_str (), o2::framework::HistType::kTH2D , {{400 , -100 .0f , 100 .0f }, {400 , -100 .0f , 100 .0f }});
212214 for (size_t iSel = 0 ; iSel < trackQuality::kNtrackQuality ; iSel++) {
213215 mHistograms .get <TH2 >(HIST (nuclei::cNames[kSpeciesRt ]) + HIST (" /hTrackQuality" ))->GetYaxis ()->SetBinLabel (iSel + 1 , trackQualityLabels[iSel].c_str ());
214216 }
@@ -383,6 +385,14 @@ struct nucleiQC {
383385 candidate.flags |= nuclei::QcFlags::kQcIsSecondaryFromWeakDecay ;
384386 } else {
385387 candidate.flags |= nuclei::QcFlags::kQcIsSecondaryFromMaterial ;
388+ static_for<0 , nuclei::kNspecies - 1 >([&](auto iSpeciesCtV) {
389+ constexpr int kSpeciesCt = decltype (iSpeciesCtV)::value;
390+ if (nuclei::getSpeciesFromPdg (particle.pdgCode ()) == kSpeciesCt ) {
391+ mHistograms .fill (HIST (nuclei::cNames[kSpeciesCt ]) + HIST (" /h2Productionvertex" ), particle.vx (), particle.vy ());
392+ }
393+ candidate.vx = particle.vx ();
394+ candidate.vy = particle.vy ();
395+ });
386396 }
387397 }
388398
@@ -443,7 +453,9 @@ struct nucleiQC {
443453 .centrality = nuclei::getCentrality (collision, cfgCentralityEstimator, mHistFailCentrality ),
444454 .mcProcess = TMCProcess::kPNoProcess ,
445455 .nsigmaTpc = mPidManagers [iSpecies].getNSigmaTPC (track),
446- .nsigmaTof = mPidManagers [iSpecies].getNSigmaTOF (track)};
456+ .nsigmaTof = mPidManagers [iSpecies].getNSigmaTOF (track),
457+ .vx = -999 .f ,
458+ .vy = -999 .f };
447459
448460 fillNucleusFlagsPdgs (collision, track, candidate);
449461
@@ -527,6 +539,9 @@ struct nucleiQC {
527539 mNucleiTableExt (
528540 candidate.nsigmaTpc ,
529541 candidate.nsigmaTof );
542+ mNucleiTableMat (
543+ candidate.vx ,
544+ candidate.vy );
530545 }
531546
532547 void processMc (const Collisions& collisions, const TrackCandidatesMC& tracks, const aod::BCsWithTimestamps&, const aod::McParticles& mcParticles, const aod::McCollisions& /* mcCollisions*/ )
0 commit comments