19 : tracksSelector_(), vertexIdentifier_(), pvtx_(
math::
XYZPoint(0, 0, 0)) {}
34 mainVertexHandle->begin()->x(), mainVertexHandle->begin()->y(), mainVertexHandle->begin()->z())
43 bool isGoodTrack =
false;
84 double ang =
v.angle_io();
85 double pt_ee = mom_ee.Pt();
86 double eta_vtx =
v.position().eta();
94 bool isFake = bDirectionFake || (bLowPt && !bLooperEta);
95 bool isLooper = !bDirectionFake && bLowPt && bLooperEta;
100 return PFDisplacedVertex::LOOPER;
104 int c1 =
v.originalTrack(
v.refittedTracks()[0])->
charge();
105 int c2 =
v.originalTrack(
v.refittedTracks()[1])->
charge();
106 double mass_ee = mom_ee.M();
109 int nSecondaryTracks =
v.nSecondaryTracks();
110 bool bPrimaryTracks =
v.isTherePrimaryTracks();
111 bool bMergedTracks =
v.isThereMergedTracks();
114 bool bOpposite = (
c1 * c2 < -0.1);
118 bool bV0Conv = bPair && bOpposite && bDirection;
126 bool isConv = bConvMass;
129 return PFDisplacedVertex::CONVERSION_LOOSE;
133 double mass_pipi = mom_pipi.M();
140 return PFDisplacedVertex::K0_DECAY;
146 bool isLambda = (lambdaKind == 1);
147 bool isLambdaBar = (lambdaKind == -1);
150 return PFDisplacedVertex::LAMBDA_DECAY;
152 return PFDisplacedVertex::LAMBDABAR_DECAY;
156 bool bK = (nSecondaryTracks == 1) && bPrimaryTracks && !bMergedTracks && !bOpposite;
161 bool isKPlus = bKMass &&
c1 > 0;
162 bool isKMinus = bKMass &&
c1 < 0;
165 return PFDisplacedVertex::KMINUS_DECAY_LOOSE;
167 return PFDisplacedVertex::KPLUS_DECAY_LOOSE;
174 double p_prim = mom_prim.P();
175 double p_sec = mom_pipi.P();
176 double pt_prim = mom_prim.Pt();
179 if (p_prim > 0.05 && p_sec > 0.05)
196 bool isNuclearKink = (nSecondaryTracks == 1) && bPrimaryTracks && !bMergedTracks && bLog && bPtMin;
199 bool isFakeKink = ((nSecondaryTracks == 1) && bMergedTracks && !bPrimaryTracks) ||
200 ((nSecondaryTracks == 1) && bPrimaryTracks && !bMergedTracks && (!bLog || !bPtMin));
202 if (isNuclearHighPurity)
203 return PFDisplacedVertex::NUCL;
204 if (isNuclearLowPurity)
205 return PFDisplacedVertex::NUCL_LOOSE;
206 if (isFakeKink || isFakeNucl || isFakeHighPurity)
209 return PFDisplacedVertex::NUCL_KINK;
225 double mass2_0 = 0, mass2_1 = 0;
227 int c1 =
v.originalTrack(
v.refittedTracks()[1])->
charge();
236 double E =
sqrt(tMomentumDcaRefit_0.
p() * tMomentumDcaRefit_0.
p() + mass2_0);
239 tMomentumDcaRefit_0.
px(), tMomentumDcaRefit_0.
py(), tMomentumDcaRefit_0.
pz(), E);
241 E =
sqrt(tMomentumDcaRefit_1.
p() * tMomentumDcaRefit_1.
p() + mass2_1);
244 tMomentumDcaRefit_1.
px(), tMomentumDcaRefit_1.
py(), tMomentumDcaRefit_1.
pz(), E);
246 totalMomentumDcaRefit_lambda = momentumDcaRefit_0 + momentumDcaRefit_1;
255 E =
sqrt(tMomentumDcaRefit_0.
p() * tMomentumDcaRefit_0.
p() + mass2_0);
258 tMomentumDcaRefit_0.
px(), tMomentumDcaRefit_0.
py(), tMomentumDcaRefit_0.
pz(), E);
260 E =
sqrt(tMomentumDcaRefit_1.
p() * tMomentumDcaRefit_1.
p() + mass2_1);
263 tMomentumDcaRefit_1.
px(), tMomentumDcaRefit_1.
py(), tMomentumDcaRefit_1.
pz(), E);
265 totalMomentumDcaRefit_lambdabar = momentumDcaRefit_01 + momentumDcaRefit_11;
267 double mass_l = totalMomentumDcaRefit_lambda.M();
268 double mass_lbar = totalMomentumDcaRefit_lambdabar.M();
289 if (
v.trackTypes()[0] == PFDisplacedVertex::T_TO_VERTEX) {
290 trkInit =
v.refittedTracks()[0].momentum();
291 trkFinal =
v.refittedTracks()[1].momentum();
294 math::XYZVector trkNeutre(trkInit.x() - trkFinal.x(), trkInit.y() - trkFinal.y(), trkInit.z() - trkFinal.z());
297 double En =
sqrt(0 * 0 + trkNeutre.Mag2());
300 double massMuNu = trkMuNu.M();
310 out <<
" pvtx_ = " <<
pvtx_ << std::endl;