Skip to content

Commit f37ec1b

Browse files
committed
get rid of unneeded template typenames
1 parent f51b030 commit f37ec1b

1 file changed

Lines changed: 12 additions & 14 deletions

File tree

PWGHF/D2H/Tasks/taskLc.cxx

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,6 @@ struct HfTaskLc {
123123

124124
// Factors for conversion between units
125125
constexpr static float CtToProperDecayTimePs = 1.f / o2::constants::physics::LightSpeedCm2PS;
126-
constexpr static float NanoToPico = 1000.f;
127126
// Names of folders and suffixes for MC signal histograms
128127
constexpr static std::string_view SignalFolders[] = {"signal", "prompt", "nonprompt"};
129128
constexpr static std::string_view SignalSuffixes[] = {"", "Prompt", "NonPrompt"};
@@ -339,8 +338,7 @@ struct HfTaskLc {
339338
return o2::hf_centrality::getCentralityColl<Coll>(collision);
340339
}
341340

342-
template <typename McDaughter, typename CandLcMcGen>
343-
float evaluateMcGenDecayTime(const McDaughter& mcParticleProng0, const CandLcMcGen& motherParticle)
341+
float evaluateMcGenDecayTime(const McParticles3ProngMatched::iterator& mcParticleProng0, const McParticles3ProngMatched::iterator& motherParticle)
344342
{
345343
const auto mcCollision = motherParticle.template mcCollision_as<aod::McCollisions>();
346344
const float pMother = motherParticle.p();
@@ -363,7 +361,7 @@ struct HfTaskLc {
363361
template <int SignalType, typename CandidateType>
364362
void fillHistogramsRecSig(CandidateType const& candidate)
365363
{
366-
const auto& mcParticleProng0 = candidate.template prong0_as<aod::TracksWMc>().template mcParticle_as<soa::Join<aod::McParticles, aod::HfCand3ProngMcGen>>();
364+
const auto& mcParticleProng0 = candidate.template prong0_as<aod::TracksWMc>().template mcParticle_as<McParticles3ProngMatched>();
367365
const auto pdgCodeProng0 = std::abs(mcParticleProng0.pdgCode());
368366
if ((candidate.isSelLcToPKPi() >= selectionFlagLc) && pdgCodeProng0 == kProton) {
369367
registry.fill(HIST("MC/reconstructed/") + HIST(SignalFolders[SignalType]) + HIST("/hMassRecSig") + HIST(SignalSuffixes[SignalType]), HfHelper::invMassLcToPKPi(candidate));
@@ -408,8 +406,8 @@ struct HfTaskLc {
408406

409407
/// Fill MC histograms at reconstruction level
410408
/// \tparam FillMl switch to fill ML histograms
411-
template <bool FillMl, typename CollType, typename CandLcMcRec, typename CandLcMcGen>
412-
void fillHistosMcRec(CollType const& collision, CandLcMcRec const& candidates, CandLcMcGen const& mcParticles)
409+
template <bool FillMl, typename CollType, typename CandLcMcRec>
410+
void fillHistosMcRec(CollType const& collision, CandLcMcRec const& candidates, McParticles3ProngMatched const& mcParticles)
413411
{
414412
const auto thisCollId = collision.globalIndex();
415413
const auto& groupedLcCandidates = candidates.sliceBy(candLcPerCollision, thisCollId);
@@ -426,7 +424,7 @@ struct HfTaskLc {
426424

427425
if (std::abs(candidate.flagMcMatchRec()) == hf_decay::hf_cand_3prong::DecayChannelMain::LcToPKPi) {
428426
// Get the corresponding MC particle.
429-
const auto& mcParticleProng0 = candidate.template prong0_as<aod::TracksWMc>().template mcParticle_as<soa::Join<aod::McParticles, aod::HfCand3ProngMcGen>>();
427+
const auto& mcParticleProng0 = candidate.template prong0_as<aod::TracksWMc>().template mcParticle_as<McParticles3ProngMatched>();
430428
const auto pdgCodeProng0 = std::abs(mcParticleProng0.pdgCode());
431429
const auto indexMother = RecoDecay::getMother(mcParticles, mcParticleProng0, o2::constants::physics::Pdg::kLambdaCPlus, true);
432430
const auto particleMother = mcParticles.rawIteratorAt(indexMother);
@@ -511,8 +509,8 @@ struct HfTaskLc {
511509
/// Helper function for filling MC generated histograms for prompt, nonpromt and common (signal)
512510
/// \param particle is a generated particle
513511
/// \tparam SignalType is an enum defining which histogram in which folder (signal, prompt or nonpromt) to fill
514-
template <int SignalType, typename ParticleType>
515-
void fillHistogramsGen(ParticleType const& particle)
512+
template <int SignalType>
513+
void fillHistogramsGen(McParticles3ProngMatched::iterator const& particle)
516514
{
517515
registry.fill(HIST("MC/generated/") + HIST(SignalFolders[SignalType]) + HIST("/hPtGen") + HIST(SignalSuffixes[SignalType]), particle.pt());
518516
registry.fill(HIST("MC/generated/") + HIST(SignalFolders[SignalType]) + HIST("/hEtaGen") + HIST(SignalSuffixes[SignalType]), particle.eta());
@@ -524,8 +522,8 @@ struct HfTaskLc {
524522
}
525523

526524
/// Fill MC histograms at generated level
527-
template <typename CandLcMcGen, typename Coll>
528-
void fillHistosMcGen(CandLcMcGen const& mcParticles, Coll const& recoCollisions)
525+
template <typename Coll>
526+
void fillHistosMcGen(McParticles3ProngMatched const& mcParticles, Coll const& recoCollisions)
529527
{
530528
// MC gen.
531529
for (const auto& particle : mcParticles) {
@@ -548,7 +546,7 @@ struct HfTaskLc {
548546
occ = o2::hf_occupancy::getOccupancyGenColl(recoCollsPerMcColl, occEstimator);
549547
}
550548

551-
const auto mcDaughter0 = particle.template daughters_as<soa::Join<aod::McParticles, aod::HfCand3ProngMcGen>>().begin();
549+
const auto mcDaughter0 = particle.template daughters_as<McParticles3ProngMatched>().begin();
552550

553551
const float properDecayTime = evaluateMcGenDecayTime(mcDaughter0, particle);
554552

@@ -712,10 +710,10 @@ struct HfTaskLc {
712710

713711
/// Run the analysis on MC data
714712
/// \tparam FillMl switch to fill ML histograms
715-
template <bool FillMl, typename CollType, typename CandType, typename CandLcMcGen>
713+
template <bool FillMl, typename CollType, typename CandType>
716714
void runAnalysisPerCollisionMc(CollType const& collisions,
717715
CandType const& candidates,
718-
CandLcMcGen const& mcParticles)
716+
McParticles3ProngMatched const& mcParticles)
719717
{
720718
for (const auto& collision : collisions) {
721719
// MC Rec.

0 commit comments

Comments
 (0)