@@ -1059,6 +1059,11 @@ class strangenessBuilderHelper
10591059 return false ;
10601060 }
10611061
1062+ // Calculate V0 mass before mass constraint
1063+ float MLambda, SigmaLambda;
1064+ KFV0 .GetMass (MLambda, SigmaLambda);
1065+ cascade.kfMLambda = MLambda;
1066+
10621067 if (kfUseV0MassConstraint) {
10631068 KFV0 .SetNonlinearMassConstraint (o2::constants::physics::MassLambda);
10641069 }
@@ -1117,9 +1122,20 @@ class strangenessBuilderHelper
11171122 cascade = {};
11181123 return false ;
11191124 }
1125+
1126+ // Calculate masses a priori before potentially applying mass constraint
1127+ // --> this is the invariant mass of the decay products, not the mass-constrained value
1128+ float MXi, SigmaXi, MOmega, SigmaOmega;
1129+ KFXi.GetMass (MXi, SigmaXi);
1130+ KFOmega.GetMass (MOmega, SigmaOmega);
1131+ cascade.massXi = MXi;
1132+ cascade.massOmega = MOmega;
1133+
11201134 if (kfUseCascadeMassConstraint) {
11211135 // set mass constraint if requested
11221136 // WARNING: this is only adequate for decay chains, i.e. XiC -> Xi or OmegaC -> Omega
1137+ // WARNING: be aware of the fact that if enabled, the stored particle momentum and covariance matrix will be mass-constrained
1138+ // while the stored mass will be the invariant mass of the decay products (i.e. not mass-constrained)
11231139 KFXi.SetNonlinearMassConstraint (o2::constants::physics::MassXiMinus);
11241140 KFOmega.SetNonlinearMassConstraint (o2::constants::physics::MassOmegaMinus);
11251141 }
@@ -1215,15 +1231,6 @@ class strangenessBuilderHelper
12151231 }
12161232 cascade.pointingAngle = TMath::ACos (cosPA);
12171233
1218- // Calculate masses a priori
1219- float MLambda, SigmaLambda, MXi, SigmaXi, MOmega, SigmaOmega;
1220- KFV0 .GetMass (MLambda, SigmaLambda);
1221- KFXi.GetMass (MXi, SigmaXi);
1222- KFOmega.GetMass (MOmega, SigmaOmega);
1223- cascade.kfMLambda = MLambda;
1224- cascade.massXi = MXi;
1225- cascade.massOmega = MOmega;
1226-
12271234 // KF Cascade covariance matrix
12281235 std::array<float , 21 > covCascKF;
12291236 for (int i = 0 ; i < 21 ; i++) { // get covariance matrix elements (lower triangle)
0 commit comments