@@ -84,6 +84,9 @@ struct HfTaskLc {
8484 NonPrompt
8585 };
8686
87+ constexpr static std::string_view SignalFolders[] = {" signal" , " prompt" , " nonprompt" };
88+ constexpr static std::string_view SignalSuffixes[] = {" " , " Prompt" , " NonPrompt" };
89+
8790 HfHelper hfHelper;
8891 SliceCache cache;
8992
@@ -307,8 +310,6 @@ struct HfTaskLc {
307310 template <bool fillMl, typename CollType, typename CandLcMcRec, typename CandLcMcGen>
308311 void fillHistosMcRec (CollType const & collision, CandLcMcRec const & candidates, CandLcMcGen const & mcParticles)
309312 {
310- static constexpr std::string_view SignalFolders[] = {" signal" , " prompt" , " nonprompt" };
311- static constexpr std::string_view SignalSuffixes[] = {" " , " Prompt" , " NonPrompt" };
312313
313314 auto thisCollId = collision.globalIndex ();
314315 auto groupedLcCandidates = candidates.sliceBy (candLcPerCollision, thisCollId);
@@ -344,7 +345,7 @@ struct HfTaskLc {
344345 auto numPvContributors = collision.numContrib ();
345346 auto ptRecB = candidate.ptBhadMotherPart ();
346347
347- auto fillHistogramsRec = [&, SignalFolders, SignalSuffixes ]<int signalType>() {
348+ auto fillHistogramsRec = [&]<int signalType>() {
348349 if ((candidate.isSelLcToPKPi () >= selectionFlagLc) && pdgCodeProng0 == kProton ) {
349350 registry.fill (HIST (" MC/reconstructed/" ) + HIST (SignalFolders[signalType]) + HIST (" /hMassRecSig" ) + HIST (SignalSuffixes[signalType]), hfHelper.invMassLcToPKPi (candidate));
350351 registry.fill (HIST (" MC/reconstructed/" ) + HIST (SignalFolders[signalType]) + HIST (" /hMassVsPtRecSig" ) + HIST (SignalSuffixes[signalType]), hfHelper.invMassLcToPKPi (candidate), pt);
@@ -453,8 +454,6 @@ struct HfTaskLc {
453454 template <typename CandLcMcGen, typename Coll>
454455 void fillHistosMcGen (CandLcMcGen const & mcParticles, Coll const & recoCollisions)
455456 {
456- static constexpr std::string_view SignalFolders[] = {" signal" , " prompt" , " nonprompt" };
457- static constexpr std::string_view SignalSuffixes[] = {" " , " Prompt" , " NonPrompt" };
458457 // MC gen.
459458 for (const auto & particle : mcParticles) {
460459 if (std::abs (particle.flagMcMatchGen ()) == hf_decay::hf_cand_3prong::DecayChannelMain::LcToPKPi) {
@@ -481,20 +480,7 @@ struct HfTaskLc {
481480 const float gamma = std::sqrt (1 + p2m * p2m); // mother's particle Lorentz factor
482481 const float properLifetime = mcDaughter0.vt () * NanoToPico / gamma; // from ns to ps * from lab time to proper time
483482
484- // ============================ for debug purposes only ============================
485- registry.fill (HIST (" MC/generated/" ) + HIST (SignalFolders[Signal]) + HIST (" /hPtGen" ) + HIST (SignalSuffixes[Signal]), ptGen);
486- registry.fill (HIST (" MC/generated/" ) + HIST (SignalFolders[0 ]) + HIST (" /hPtGen" ) + HIST (SignalSuffixes[0 ]), ptGen);
487- registry.fill (HIST (" MC/generated/" ) + HIST (SignalFolders[0 ]) + HIST (" /hPtGen" ), ptGen);
488- registry.fill (HIST (" MC/generated/" ) + HIST (SignalFolders[0 ]) + HIST (" /hPtGen" ) + HIST (" " ), ptGen);
489- registry.fill (HIST (" MC/generated/" ) + HIST (" signal" ) + HIST (" /hPtGen" ) + HIST (" " ), ptGen);
490- registry.fill (HIST (" MC/generated/" ) + HIST (" signal" ) + HIST (" /hPtGen" ) + HIST (SignalSuffixes[0 ]), ptGen);
491- registry.fill (HIST (" MC/generated/signal/hPtGen" ) + HIST (SignalSuffixes[0 ]), ptGen);
492- registry.fill (HIST (" MC/generated/" ) + HIST (" signal" ) + HIST (" /hPtGen" ), ptGen);
493- registry.fill (HIST (" MC/generated/signal" ) + HIST (" /hPtGen" ), ptGen);
494- registry.fill (HIST (" MC/generated/signal/hPtGen" ), ptGen);
495- // =================================================================================
496-
497- auto fillHistogramsGen = [&, SignalFolders, SignalSuffixes]<int signalType>() {
483+ auto fillHistogramsGen = [&]<int signalType>() {
498484 registry.fill (HIST (" MC/generated/" ) + HIST (SignalFolders[signalType]) + HIST (" /hPtGen" ) + HIST (SignalSuffixes[signalType]), ptGen);
499485 registry.fill (HIST (" MC/generated/" ) + HIST (SignalFolders[signalType]) + HIST (" /hEtaGen" ) + HIST (SignalSuffixes[signalType]), particle.eta ());
500486 registry.fill (HIST (" MC/generated/" ) + HIST (SignalFolders[signalType]) + HIST (" /hYGen" ) + HIST (SignalSuffixes[signalType]), yGen);
0 commit comments