@@ -239,9 +239,6 @@ struct HfCorrelatorD0Hadrons {
239239 Configurable<bool > useCentrality{" useCentrality" , false , " Flag for centrality dependent analyses" };
240240
241241 int leadingIndex = 0 ;
242- double massD0{0 .};
243- double massPi{0 .};
244- double massK{0 .};
245242 double softPiMass = 0.14543 ; // pion mass + Q-value of the D*->D0pi decay
246243
247244 SliceCache cache;
@@ -274,10 +271,6 @@ struct HfCorrelatorD0Hadrons {
274271
275272 void init (InitContext&)
276273 {
277- massD0 = MassD0;
278- massPi = MassPiPlus;
279- massK = MassKPlus;
280-
281274 AxisSpec axisMassD = {binsMassD, " inv. mass (#pi K) (GeV/#it{c}^{2})" };
282275 AxisSpec const axisEta = {binsEta, " #it{#eta}" };
283276 AxisSpec const axisPhi = {binsPhi, " #it{#varphi}" };
@@ -415,8 +408,8 @@ struct HfCorrelatorD0Hadrons {
415408 }
416409
417410 // ========================== Define parameters for soft pion removal ================================
418- auto ePiK = RecoDecay::e (candidate.pVectorProng0 (), massPi ) + RecoDecay::e (candidate.pVectorProng1 (), massK );
419- auto eKPi = RecoDecay::e (candidate.pVectorProng0 (), massK ) + RecoDecay::e (candidate.pVectorProng1 (), massPi );
411+ auto ePiK = RecoDecay::e (candidate.pVectorProng0 (), MassPiPlus ) + RecoDecay::e (candidate.pVectorProng1 (), MassKPlus );
412+ auto eKPi = RecoDecay::e (candidate.pVectorProng0 (), MassKPlus ) + RecoDecay::e (candidate.pVectorProng1 (), MassPiPlus );
420413
421414 // ========================== trigger efficiency ================================
422415 double efficiencyWeight = 1 .;
@@ -479,7 +472,7 @@ struct HfCorrelatorD0Hadrons {
479472 // ========== soft pion removal ===================================================
480473 double invMassDstar1 = 0 ., invMassDstar2 = 0 .;
481474 auto pSum2 = RecoDecay::p2 (candidate.pVector (), track.pVector ());
482- auto ePion = track.energy (massPi );
475+ auto ePion = track.energy (MassPiPlus );
483476 invMassDstar1 = std::sqrt ((ePiK + ePion) * (ePiK + ePion) - pSum2);
484477 invMassDstar2 = std::sqrt ((eKPi + ePion) * (eKPi + ePion) - pSum2);
485478
@@ -655,8 +648,8 @@ struct HfCorrelatorD0Hadrons {
655648 entryD0CandGenInfo (isD0Prompt);
656649
657650 // ===================== Define parameters for soft pion removal ========================
658- auto ePiK = RecoDecay::e (candidate.pVectorProng0 (), massPi ) + RecoDecay::e (candidate.pVectorProng1 (), massK );
659- auto eKPi = RecoDecay::e (candidate.pVectorProng0 (), massK ) + RecoDecay::e (candidate.pVectorProng1 (), massPi );
651+ auto ePiK = RecoDecay::e (candidate.pVectorProng0 (), MassPiPlus ) + RecoDecay::e (candidate.pVectorProng1 (), MassKPlus );
652+ auto eKPi = RecoDecay::e (candidate.pVectorProng0 (), MassKPlus ) + RecoDecay::e (candidate.pVectorProng1 (), MassPiPlus );
660653
661654 // ============== D-h correlation dedicated section ====================================
662655
@@ -684,7 +677,7 @@ struct HfCorrelatorD0Hadrons {
684677 double invMassDstar1 = 0 , invMassDstar2 = 0 ;
685678 bool isSoftPiD0 = false , isSoftPiD0bar = false ;
686679 auto pSum2 = RecoDecay::p2 (candidate.pVector (), track.pVector ());
687- auto ePion = track.energy (massPi );
680+ auto ePion = track.energy (MassPiPlus );
688681 invMassDstar1 = std::sqrt ((ePiK + ePion) * (ePiK + ePion) - pSum2);
689682 invMassDstar2 = std::sqrt ((eKPi + ePion) * (eKPi + ePion) - pSum2);
690683
@@ -856,7 +849,7 @@ struct HfCorrelatorD0Hadrons {
856849 poolBin,
857850 correlationStatus,
858851 cent);
859- entryD0HadronRecoInfo (massD0, massD0 , 0 ); // dummy info
852+ entryD0HadronRecoInfo (MassD0, MassD0 , 0 ); // dummy info
860853 entryD0HadronGenInfo (isD0Prompt, particleAssoc.isPhysicalPrimary (), trackOrigin);
861854 } // end inner loop (Tracks)
862855 }
@@ -897,12 +890,12 @@ struct HfCorrelatorD0Hadrons {
897890 // soft pion removal, signal status 1,3 for D0 and 2,3 for D0bar (SoftPi removed), signal status 11,13 for D0 and 12,13 for D0bar (only SoftPi)
898891 const auto invMassD0 = HfHelper::invMassD0ToPiK (candidate);
899892 const auto invMassD0bar = HfHelper::invMassD0barToKPi (candidate);
900- auto ePiK = RecoDecay::e (candidate.pVectorProng0 (), massPi ) + RecoDecay::e (candidate.pVectorProng1 (), massK );
901- auto eKPi = RecoDecay::e (candidate.pVectorProng0 (), massK ) + RecoDecay::e (candidate.pVectorProng1 (), massPi );
893+ auto ePiK = RecoDecay::e (candidate.pVectorProng0 (), MassPiPlus ) + RecoDecay::e (candidate.pVectorProng1 (), MassKPlus );
894+ auto eKPi = RecoDecay::e (candidate.pVectorProng0 (), MassKPlus ) + RecoDecay::e (candidate.pVectorProng1 (), MassPiPlus );
902895 double invMassDstar1 = 0 ., invMassDstar2 = 0 .;
903896 bool isSoftPiD0 = false , isSoftPiD0bar = false ;
904897 auto pSum2 = RecoDecay::p2 (candidate.pVector (), particleAssoc.pVector ());
905- auto ePion = particleAssoc.energy (massPi );
898+ auto ePion = particleAssoc.energy (MassPiPlus );
906899 invMassDstar1 = std::sqrt ((ePiK + ePion) * (ePiK + ePion) - pSum2);
907900 invMassDstar2 = std::sqrt ((eKPi + ePion) * (eKPi + ePion) - pSum2);
908901 std::vector<float > outputMlD0 = {-1 ., -1 ., -1 .};
@@ -1004,12 +997,12 @@ struct HfCorrelatorD0Hadrons {
1004997 // soft pion removal
1005998 const auto invMassD0 = HfHelper::invMassD0ToPiK (candidate);
1006999 const auto invMassD0bar = HfHelper::invMassD0barToKPi (candidate);
1007- auto ePiK = RecoDecay::e (candidate.pVectorProng0 (), massPi ) + RecoDecay::e (candidate.pVectorProng1 (), massK );
1008- auto eKPi = RecoDecay::e (candidate.pVectorProng0 (), massK ) + RecoDecay::e (candidate.pVectorProng1 (), massPi );
1000+ auto ePiK = RecoDecay::e (candidate.pVectorProng0 (), MassPiPlus ) + RecoDecay::e (candidate.pVectorProng1 (), MassKPlus );
1001+ auto eKPi = RecoDecay::e (candidate.pVectorProng0 (), MassKPlus ) + RecoDecay::e (candidate.pVectorProng1 (), MassPiPlus );
10091002 double invMassDstar1 = 0 ., invMassDstar2 = 0 .;
10101003 bool isSoftPiD0 = false , isSoftPiD0bar = false ;
10111004 auto pSum2 = RecoDecay::p2 (candidate.pVector (), particleAssoc.pVector ());
1012- auto ePion = particleAssoc.energy (massPi );
1005+ auto ePion = particleAssoc.energy (MassPiPlus );
10131006 invMassDstar1 = std::sqrt ((ePiK + ePion) * (ePiK + ePion) - pSum2);
10141007 invMassDstar2 = std::sqrt ((eKPi + ePion) * (eKPi + ePion) - pSum2);
10151008
@@ -1128,7 +1121,7 @@ struct HfCorrelatorD0Hadrons {
11281121 int trackOrigin = RecoDecay::getCharmHadronOrigin (mcParticles, particleAssoc, true );
11291122 bool isD0Prompt = particleTrigg.originMcGen () == RecoDecay::OriginType::Prompt;
11301123 entryD0HadronPair (getDeltaPhi (particleAssoc.phi (), particleTrigg.phi ()), particleAssoc.eta () - particleTrigg.eta (), particleTrigg.pt (), particleAssoc.pt (), poolBin, correlationStatus, cent);
1131- entryD0HadronRecoInfo (massD0, massD0 , 0 ); // dummy info
1124+ entryD0HadronRecoInfo (MassD0, MassD0 , 0 ); // dummy info
11321125 entryD0HadronGenInfo (isD0Prompt, particleAssoc.isPhysicalPrimary (), trackOrigin);
11331126 }
11341127 }
0 commit comments