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;
bool quality(const TrackQuality) const
Track quality.
void Dump(std::ostream &out=std::cout) const
double looper_eta_max() const
int numberOfLostHits(HitCategory category) const
void Dump(std::ostream &out=std::cout) const
double angle_V0Conv_max() const
ROOT::Math::LorentzVector< ROOT::Math::PxPyPzE4D< double > > XYZTLorentzVectorD
Lorentz vector with cylindrical internal representation using pseudorapidity.
unsigned short numberOfValidHits() const
number of valid hits found
PFDisplacedVertexHelper()
double px() const
x coordinate of momentum vector
double p() const
momentum vector magnitude
bool isKaonMass(const reco::PFDisplacedVertex &v) const
double py() const
y coordinate of momentum vector
static const double proton_mass2
int nOuterHits_max() const
void setPrimaryVertex(edm::Handle< reco::VertexCollection > mainVertexHandle, edm::Handle< reco::BeamSpot > beamSpotHandle)
Update the primary vertex information.
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
double x0() const
x coordinate
double mLambda_min() const
double pt() const
track transverse momentum
~PFDisplacedVertexHelper()
bool selectTracks() const
static const double pion_mass2
Masses2 taken from PDG.
double y0() const
y coordinate
bool identifyVertices() const
int lambdaCP(const reco::PFDisplacedVertex &v) const
Tools used to calculate quantities for vertex identification.
static const double muon_mass2
static TrackQuality qualityByName(const std::string &name)
const HitPattern & hitPattern() const
Access the hit pattern, indicating in which Tracker layers the track has hits.
XYZVectorD XYZVector
spatial vector with cartesian internal representation
double mLambda_max() const
XYZPointD XYZPoint
point in space with cartesian internal representation
double pz() const
z coordinate of momentum vector
double normalizedChi2() const
chi-squared divided by n.d.o.f. (or chi-squared * 1e6 if n.d.o.f. is zero)
VertexIdentifier vertexIdentifier_
double z0() const
z coordinate
std::string quality() const
math::XYZPoint pvtx_
Primary vertex information updated for each event.
TracksSelector tracksSelector_
TupleMultiplicity< TrackerTraits > const *__restrict__ uint32_t nHits
double logPrimSec_min() const
bool isTrackSelected(const reco::Track &trk, const reco::PFDisplacedVertex::VertexTrackType vertexTrackType) const
Select tracks tool.
void Dump(std::ostream &out=std::cout) const
double pt_kink_min() const
M_Hypo
Mass hypothesis enum.
reco::PFDisplacedVertex::VertexType identifyVertex(const reco::PFDisplacedVertex &v) const
Vertex identification tool.
double dxy() const
dxy parameter. (This is the transverse impact parameter w.r.t. to (0,0,0) ONLY if refPoint is close t...