@@ -65,6 +65,7 @@ using namespace o2;
6565using namespace o2 ::aod;
6666using namespace o2 ::framework;
6767using namespace o2 ::framework::expressions;
68+ using namespace o2 ::constants::physics;
6869using namespace o2 ::hf_centrality;
6970using namespace o2 ::hf_evsel;
7071using namespace o2 ::analysis::hf_flow_utils;
@@ -99,7 +100,7 @@ enum QvecEstimator : uint8_t {
99100};
100101
101102// / columns for table to study the Lc->PKPi background
102- DECLARE_SOA_COLUMN (MassLc, massLc , float );
103+ DECLARE_SOA_COLUMN (MassLc, MassLambdaCPlus , float );
103104DECLARE_SOA_COLUMN (PtLc, ptLc, float );
104105DECLARE_SOA_COLUMN (RapidityLc, rapidityLc, float );
105106DECLARE_SOA_COLUMN (CosThetaStar, cosThetaStar, float );
@@ -144,11 +145,6 @@ DECLARE_SOA_TABLE(HfLcPolBkg, "AOD", "HFLCPOLBKG",
144145struct HfTaskCharmPolarisation {
145146 Produces<o2::aod::HfLcPolBkg> rowCandLcBkg;
146147
147- float massPi{0 .f };
148- float massProton{0 .f };
149- float massKaon{0 .f };
150- float massDstar{0 .f };
151- float massLc{0 .f };
152148 float bkgRotationAngleStep{0 .f };
153149
154150 uint8_t nMassHypos{0u };
@@ -328,11 +324,6 @@ struct HfTaskCharmPolarisation {
328324 LOGP (fatal, " No background rotation supported for MC." );
329325 }
330326
331- massPi = o2::constants::physics::MassPiPlus;
332- massProton = o2::constants::physics::MassProton;
333- massKaon = o2::constants::physics::MassKaonCharged;
334- massDstar = o2::constants::physics::MassDStar;
335- massLc = o2::constants::physics::MassLambdaCPlus;
336327 bkgRotationAngleStep = (nBkgRotations > 1 ) ? (maxRotAngleMultByPi - minRotAngleMultByPi) * constants::math::PI / (nBkgRotations - 1 ) : 0 .;
337328
338329 const AxisSpec thnAxisInvMass{configThnAxisInvMass, " #it{M} (GeV/#it{c}^{2})" };
@@ -1438,8 +1429,8 @@ struct HfTaskCharmPolarisation {
14381429 template <charm_polarisation::DecayChannel Channel>
14391430 bool isInSignalRegion (float invMass)
14401431 {
1441- float invMassMin;
1442- float invMassMax;
1432+ float invMassMin{ 0 . f } ;
1433+ float invMassMax{ 0 . f } ;
14431434 if constexpr (Channel == charm_polarisation::DecayChannel::DstarToDzeroPi) { // D*+
14441435 invMassMin = 0 .142f ;
14451436 invMassMax = 0 .15f ;
@@ -1600,7 +1591,7 @@ struct HfTaskCharmPolarisation {
16001591 // Dstar analysis
16011592 // polarization measured from the soft-pion daughter (*)
16021593
1603- massDau = massPi ; // (*)
1594+ massDau = MassPiPlus ; // (*)
16041595 const float bkgRotAngle = (bkgRotationId > 0 ) ? minRotAngleMultByPi * constants::math::PI + bkgRotationAngleStep * (bkgRotationId - 1 ) : 0 ;
16051596
16061597 std::array<float , 3 > threeVecSoftPi{candidate.pxSoftPi () * std::cos (bkgRotAngle) - candidate.pySoftPi () * std::sin (bkgRotAngle), candidate.pxSoftPi () * std::sin (bkgRotAngle) + candidate.pySoftPi () * std::cos (bkgRotAngle), candidate.pzSoftPi ()}; // we rotate the soft pion
@@ -1615,13 +1606,13 @@ struct HfTaskCharmPolarisation {
16151606 pyCharmHad = threeVecSoftPi[1 ] + threeVecD0Prong0[1 ] + threeVecD0Prong1[1 ];
16161607 pzCharmHad = threeVecSoftPi[2 ] + threeVecD0Prong0[2 ] + threeVecD0Prong1[2 ];
16171608 if (candidate.signSoftPi () > 0 ) {
1618- invMassCharmHad = RecoDecay::m (std::array{threeVecD0Prong0, threeVecD0Prong1, threeVecSoftPi}, std::array{massPi, massKaon, massPi });
1619- invMassD0 = RecoDecay::m (std::array{threeVecD0Prong0, threeVecD0Prong1}, std::array{massPi, massKaon });
1609+ invMassCharmHad = RecoDecay::m (std::array{threeVecD0Prong0, threeVecD0Prong1, threeVecSoftPi}, std::array{MassPiPlus, MassKaonCharged, MassPiPlus });
1610+ invMassD0 = RecoDecay::m (std::array{threeVecD0Prong0, threeVecD0Prong1}, std::array{MassPiPlus, MassKaonCharged });
16201611 } else {
1621- invMassCharmHad = RecoDecay::m (std::array{threeVecD0Prong0, threeVecD0Prong1, threeVecSoftPi}, std::array{massKaon, massPi, massPi });
1622- invMassD0 = RecoDecay::m (std::array{threeVecD0Prong0, threeVecD0Prong1}, std::array{massKaon, massPi });
1612+ invMassCharmHad = RecoDecay::m (std::array{threeVecD0Prong0, threeVecD0Prong1, threeVecSoftPi}, std::array{MassKaonCharged, MassPiPlus, MassPiPlus });
1613+ invMassD0 = RecoDecay::m (std::array{threeVecD0Prong0, threeVecD0Prong1}, std::array{MassKaonCharged, MassPiPlus });
16231614 }
1624- rapidity = RecoDecay::y (std::array{pxCharmHad, pyCharmHad, pzCharmHad}, massDstar );
1615+ rapidity = RecoDecay::y (std::array{pxCharmHad, pyCharmHad, pzCharmHad}, MassDStar );
16251616 } else {
16261617 isRotatedCandidate = 0 ;
16271618 pxDau = candidate.pxSoftPi ();
@@ -1637,7 +1628,7 @@ struct HfTaskCharmPolarisation {
16371628 invMassCharmHad = candidate.invMassAntiDstar ();
16381629 invMassD0 = candidate.invMassD0Bar ();
16391630 }
1640- rapidity = candidate.y (massDstar );
1631+ rapidity = candidate.y (MassDStar );
16411632 }
16421633 invMassCharmHadForSparse = invMassCharmHad - invMassD0;
16431634
@@ -1677,8 +1668,8 @@ struct HfTaskCharmPolarisation {
16771668 pyCharmHad = candidate.py ();
16781669 pzCharmHad = candidate.pz ();
16791670 }
1680- massDau = massProton ; // (*)
1681- rapidity = RecoDecay::y (candidate.pVector (), massLc );
1671+ massDau = MassProton ; // (*)
1672+ rapidity = RecoDecay::y (candidate.pVector (), MassLambdaCPlus );
16821673
16831674 // / mass-hypothesis-dependent variables
16841675 float invMassPiKPi = 0 .f ; // bkg. from D+ -> K+pi-pi-
@@ -1691,7 +1682,7 @@ struct HfTaskCharmPolarisation {
16911682 pzDau = candidate.pzProng0 ();
16921683 if (bkgRotationId) {
16931684 // / rotational background - pt of the kaon track rotated
1694- invMassCharmHad = RecoDecay::m (std::array{threeVecLcProng0, threeVecLcRotatedProng1, threeVecLcProng2}, std::array{massProton, massKaon, massPi });
1685+ invMassCharmHad = RecoDecay::m (std::array{threeVecLcProng0, threeVecLcRotatedProng1, threeVecLcProng2}, std::array{MassProton, MassKaonCharged, MassPiPlus });
16951686 invMassCharmHadForSparse = invMassCharmHad;
16961687 } else {
16971688 // / original candidate (kaon track not rotated)
@@ -1725,7 +1716,7 @@ struct HfTaskCharmPolarisation {
17251716 pzDau = candidate.pzProng2 ();
17261717 if (bkgRotationId) {
17271718 // / rotational background - pt of the kaon track rotated
1728- invMassCharmHad = RecoDecay::m (std::array{threeVecLcProng0, threeVecLcRotatedProng1, threeVecLcProng2}, std::array{massPi, massKaon, massProton });
1719+ invMassCharmHad = RecoDecay::m (std::array{threeVecLcProng0, threeVecLcRotatedProng1, threeVecLcProng2}, std::array{MassPiPlus, MassKaonCharged, MassProton });
17291720 invMassCharmHadForSparse = invMassCharmHad;
17301721 } else {
17311722 // / original candidate (kaon track not rotated)
@@ -2107,8 +2098,8 @@ struct HfTaskCharmPolarisation {
21072098
21082099 std::array<int , 2 > const dauPdgs = {kPiPlus , o2::constants::physics::Pdg::kD0 };
21092100 RecoDecay::getDaughters (mcParticle, &listDaughters, dauPdgs, 1 );
2110- massDau = massPi ;
2111- massCharmHad = massDstar ;
2101+ massDau = MassPiPlus ;
2102+ massCharmHad = MassDStar ;
21122103 } else if constexpr (Channel == charm_polarisation::DecayChannel::LcToPKPi) {
21132104 if (std::abs (mcParticle.flagMcMatchGen ()) != hf_decay::hf_cand_3prong::DecayChannelMain::LcToPKPi) { // this particle is not signal, skip
21142105 return ;
@@ -2117,8 +2108,8 @@ struct HfTaskCharmPolarisation {
21172108 resoChannelLc = mcParticle.flagMcDecayChanGen ();
21182109 std::array<int , 3 > const dauPdgs = {kProton , -kKPlus , kPiPlus };
21192110 RecoDecay::getDaughters (mcParticle, &listDaughters, dauPdgs, 2 );
2120- massDau = massProton ;
2121- massCharmHad = massLc ;
2111+ massDau = MassProton ;
2112+ massCharmHad = MassLambdaCPlus ;
21222113
21232114 // / electric charge from PDG code
21242115 int const pdgCode = mcParticle.pdgCode ();
0 commit comments