@@ -53,6 +53,7 @@ struct ConfKinkFilters : o2::framework::ConfigurableGroup {
5353 o2::framework::Configurable<float > etaMax{" etaMax" , 10 .f , " Maximum eta" };
5454 o2::framework::Configurable<float > phiMin{" phiMin" , 0 .f , " Minimum phi" };
5555 o2::framework::Configurable<float > phiMax{" phiMax" , 1 .f * o2::constants::math::TwoPI, " Maximum phi" };
56+ o2::framework::Configurable<bool > kinkPhiAtPv{" kinkPhiAtPv" , true , " Kinks and PCM SigmaPlus: store the azimuth of the Sigma momentum at the primary vertex" };
5657 o2::framework::Configurable<float > massMinSigma{" massMinSigma" , 1 .1f , " Minimum mass for Sigma hypothesis" };
5758 o2::framework::Configurable<float > massMaxSigma{" massMaxSigma" , 1 .3f , " Maximum mass for Sigma hypothesis" };
5859 o2::framework::Configurable<float > massMinSigmaPlus{" massMinSigmaPlus" , 1 .1f , " Minimum mass for SigmaPlus hypothesis" };
@@ -272,6 +273,7 @@ class KinkSelection : public baseselection::BaseSelection<float, o2::analysis::f
272273 mEtaMax = filter.etaMax .value ;
273274 mPhiMin = filter.phiMin .value ;
274275 mPhiMax = filter.phiMax .value ;
276+ mKinkPhiAtPv = filter.kinkPhiAtPv .value ;
275277
276278 if constexpr (modes::isEqual (kinkType, modes::Kink::kSigma )) {
277279 mMassSigmaLowerLimit = filter.massMinSigma .value ;
@@ -421,6 +423,9 @@ class KinkSelection : public baseselection::BaseSelection<float, o2::analysis::f
421423
422424 mKinkMotherEta = RecoDecay::eta (momMother);
423425 mKinkMotherPhi = RecoDecay::phi (momMother);
426+ if (mKinkPhiAtPv ) {
427+ mKinkMotherPhi = utils::phiAtPrimaryVertex (mKinkMotherPhi , kinkCand.xDecVtx (), kinkCand.yDecVtx ());
428+ }
424429
425430 // Recalculate pT using kinematic constraints of the decay channel
426431 float ptRecalc = -999 .f ;
@@ -517,6 +522,7 @@ class KinkSelection : public baseselection::BaseSelection<float, o2::analysis::f
517522 float mEtaMax = 1 .f;
518523 float mPhiMin = 0 .f;
519524 float mPhiMax = o2::constants::math::TwoPI;
525+ bool mKinkPhiAtPv = true ;
520526
521527 // mother kinematic
522528 float mKinkMotherPt = 0 .f; // recalculated pT (falls back to the original pT if the recalculation fails)
@@ -827,6 +833,7 @@ class SigmaPlusPcmSelection : public baseselection::BaseSelection<float, o2::ana
827833 mEtaMax = filter.etaMax .value ;
828834 mPhiMin = filter.phiMin .value ;
829835 mPhiMax = filter.phiMax .value ;
836+ mPhiAtPv = filter.kinkPhiAtPv .value ;
830837 mMassLowerLimit = filter.massMinSigmaPlusPcm .value ;
831838 mMassUpperLimit = filter.massMaxSigmaPlusPcm .value ;
832839 mMlScoreMin = filter.mlScoreMinSigmaPlusPcm .value ;
@@ -856,13 +863,16 @@ class SigmaPlusPcmSelection : public baseselection::BaseSelection<float, o2::ana
856863 });
857864 };
858865
859- template <typename T >
860- void computeKinematics (T const & sigmaPlusPcmCand)
866+ template <typename T1 , typename T2 >
867+ void computeKinematics (T1 const & sigmaPlusPcmCand, T2 const & col )
861868 {
862869 std::array<float , 3 > momMother = {sigmaPlusPcmCand.pxSigmaPlus (), sigmaPlusPcmCand.pySigmaPlus (), sigmaPlusPcmCand.pzSigmaPlus ()};
863870 mPt = RecoDecay::pt (momMother);
864871 mEta = RecoDecay::eta (momMother);
865872 mPhi = RecoDecay::phi (momMother);
873+ if (mPhiAtPv ) {
874+ mPhi = utils::phiAtPrimaryVertex (mPhi , sigmaPlusPcmCand.xDecVtx () - col.posX (), sigmaPlusPcmCand.yDecVtx () - col.posY ());
875+ }
866876 mMass = sigmaPlusPcmCand.massSigmaPlus ();
867877 mMlScore = sigmaPlusPcmCand.mlScore ();
868878 }
@@ -951,6 +961,7 @@ class SigmaPlusPcmSelection : public baseselection::BaseSelection<float, o2::ana
951961 float mEtaMin = -1 .f;
952962 float mEtaMax = 1 .f;
953963 float mPhiMin = 0 .f;
964+ bool mPhiAtPv = true ;
954965 float mPhiMax = o2::constants::math::TwoPI;
955966
956967 // mother kinematic
@@ -1015,7 +1026,7 @@ class SigmaPlusPcmBuilder
10151026 int64_t daughterIndex = 0 ;
10161027
10171028 for (const auto & sigmaPlusPcm : sigmaPlusPcms) {
1018- mSigmaPlusPcmSelection .computeKinematics (sigmaPlusPcm);
1029+ mSigmaPlusPcmSelection .computeKinematics (sigmaPlusPcm, col );
10191030 if (!mSigmaPlusPcmSelection .checkFilters (sigmaPlusPcm)) {
10201031 continue ;
10211032 }
@@ -1041,7 +1052,7 @@ class SigmaPlusPcmBuilder
10411052 int64_t daughterIndex = 0 ;
10421053
10431054 for (const auto & sigmaPlusPcm : sigmaPlusPcms) {
1044- mSigmaPlusPcmSelection .computeKinematics (sigmaPlusPcm);
1055+ mSigmaPlusPcmSelection .computeKinematics (sigmaPlusPcm, col );
10451056 if (!mSigmaPlusPcmSelection .checkFilters (sigmaPlusPcm)) {
10461057 continue ;
10471058 }
0 commit comments