@@ -994,6 +994,7 @@ struct HfCandidateCreatorXic0Omegac0Qa {
994994 kfCasc.Construct (cascDaughters, 2 );
995995 } catch (std::runtime_error& e) {
996996 LOG (debug) << " Failed to construct Cascade: " << e.what ();
997+ continue ;
997998 }
998999
9991000 float massCasc, sigMassCasc, massCascRej, sigMassCascRej;
@@ -1002,7 +1003,7 @@ struct HfCandidateCreatorXic0Omegac0Qa {
10021003 if (sigMassCasc <= 0 ) {
10031004 continue ;
10041005 }
1005- if (std::abs (massCasc - massCasc ) > configs.massToleranceCascade ) {
1006+ if (std::abs (massCasc - massOfCascade ) > configs.massToleranceCascade ) {
10061007 continue ;
10071008 }
10081009 if (kfCasc.GetNDF () <= 0 || kfCasc.GetChi2 () <= 0 ) {
@@ -1016,6 +1017,7 @@ struct HfCandidateCreatorXic0Omegac0Qa {
10161017 kfCascRej.Construct (cascDaughtersRej, 2 );
10171018 } catch (std::runtime_error& e) {
10181019 LOG (debug) << " Failed to construct Cascade_rej: " << e.what ();
1020+ continue ;
10191021 }
10201022
10211023 kfCascRej.GetMass (massCascRej, sigMassCascRej);
@@ -1041,6 +1043,7 @@ struct HfCandidateCreatorXic0Omegac0Qa {
10411043 kfCharmBaryon.Construct (charmBaryonDaughters, 2 );
10421044 } catch (std::runtime_error& e) {
10431045 LOG (debug) << " Failed to construct Charm baryon: " << e.what ();
1046+ continue ;
10441047 }
10451048
10461049 float massCharmBaryon, sigMassCharmBaryon;
@@ -1071,7 +1074,7 @@ struct HfCandidateCreatorXic0Omegac0Qa {
10711074 // To Casc
10721075 KFParticle kfBachToCasc = kfBach;
10731076 KFParticle kfV0ToCasc = kfV0;
1074- kfBach .SetProductionVertex (kfCasc);
1077+ kfBachToCasc .SetProductionVertex (kfCasc);
10751078 kfV0ToCasc.SetProductionVertex (kfCasc);
10761079
10771080 // To Charm baryon
@@ -1099,7 +1102,7 @@ struct HfCandidateCreatorXic0Omegac0Qa {
10991102 std::array<float , 3 > pVecV0 = {kfV0.GetPx (), kfV0.GetPy (), kfV0.GetPz ()};
11001103 std::array<float , 3 > pVecBach = {kfBachToCasc.GetPx (), kfBachToCasc.GetPy (), kfBachToCasc.GetPz ()};
11011104 std::array<float , 3 > pVecCharmBachelorAsD = {kfCharmBachToCharmBaryon.GetPx (), kfCharmBachToCharmBaryon.GetPy (), kfCharmBachToCharmBaryon.GetPz ()};
1102- std::array<float , 3 > pVecCharmBaryon = {kfCharmBaryon.GetPx (), kfCharmBaryon.GetPy (), kfCharmBaryon.GetPy ()};
1105+ std::array<float , 3 > pVecCharmBaryon = {kfCharmBaryon.GetPx (), kfCharmBaryon.GetPy (), kfCharmBaryon.GetPz ()};
11031106
11041107 auto * covVtxCharmBaryon = kfCharmBaryon.CovarianceMatrix ();
11051108 float covMatrixPv[6 ];
@@ -1146,8 +1149,8 @@ struct HfCandidateCreatorXic0Omegac0Qa {
11461149 float chi2NdfTopoCharmBaryonToPv = kfCharmBaryonToPv.GetChi2 () / kfCharmBaryonToPv.GetNDF ();
11471150 float chi2NdfTopoBachToCasc = kfBachToCasc.GetChi2 () / kfBachToCasc.GetNDF ();
11481151 float chi2NdfTopoV0ToCasc = kfV0ToCasc.GetChi2 () / kfV0ToCasc.GetNDF ();
1149- float chi2NdfTopoCharmBachToCharmBaryon = kfCharmBachToCharmBaryon.GetChi2 () / kfCharmBachToCharmBaryon.GetChi2 ();
1150- float chi2NdfTopoCascToCharmBaryon = kfCascToCharmBaryon.GetChi2 () / kfCascToCharmBaryon.GetChi2 ();
1152+ float chi2NdfTopoCharmBachToCharmBaryon = kfCharmBachToCharmBaryon.GetChi2 () / kfCharmBachToCharmBaryon.GetNDF ();
1153+ float chi2NdfTopoCascToCharmBaryon = kfCascToCharmBaryon.GetChi2 () / kfCascToCharmBaryon.GetNDF ();
11511154
11521155 // get ldl
11531156 float ldlV0 = ldlFromKF (kfV0, kfPv);
@@ -1177,7 +1180,7 @@ struct HfCandidateCreatorXic0Omegac0Qa {
11771180 float decayLCharmBaryon = RecoDecay::distance (std::array<float , 3 >{collision.posX (), collision.posY (), collision.posZ ()}, std::array<float , 3 >{kfCharmBaryon.GetX (), kfCharmBaryon.GetY (), kfCharmBaryon.GetZ ()});
11781181
11791182 double phiCharmBaryon, thetaCharmBaryon;
1180- getPointDirection (std::array<float , 3 >{kfV0. GetX (), kfV0. GetY (), kfV0. GetZ ()}, std::array<float , 3 >{kfCharmBaryon.GetX (), kfCharmBaryon.GetY (), kfCharmBaryon.GetZ ()}, phiCharmBaryon, thetaCharmBaryon);
1183+ getPointDirection (std::array<float , 3 >{primaryVertex. getX (), primaryVertex. getY (), primaryVertex. getZ ()}, std::array<float , 3 >{kfCharmBaryon.GetX (), kfCharmBaryon.GetY (), kfCharmBaryon.GetZ ()}, phiCharmBaryon, thetaCharmBaryon);
11811184 float errDecayLCharmBaryon = std::sqrt (getRotatedCovMatrixXX (covMatrixPv, phiCharmBaryon, thetaCharmBaryon) + getRotatedCovMatrixXX (covVtxCharmBaryon, phiCharmBaryon, thetaCharmBaryon));
11821185
11831186 // get cosine of pointing angle
0 commit comments