19 : tracksSelector_(), vertexIdentifier_(), pvtx_(
math::
XYZPoint(0, 0, 0)) {}
34 mainVertexHandle->begin()->x(), mainVertexHandle->begin()->y(), mainVertexHandle->begin()->z())
43 bool isGoodTrack =
false;
85 double pt_ee = mom_ee.Pt();
94 bool isFake = bDirectionFake || (bLowPt && !bLooperEta);
95 bool isLooper = !bDirectionFake && bLowPt && bLooperEta;
100 return PFDisplacedVertex::LOOPER;
106 double mass_ee = mom_ee.M();
113 bool bPair = (nTracks == nSecondaryTracks) && (nTracks == 2);
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;
222 reco::Track tMomentumDcaRefit_0 = refittedTracks[0];
223 reco::Track tMomentumDcaRefit_1 = refittedTracks[1];
225 double mass2_0 = 0, mass2_1 = 0;
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) {
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;
double p() const
momentum vector magnitude
double z0() const
z coordinate
double mLambda_min() const
const unsigned int nTracks(const reco::Vertex &sv)
double pt_kink_min() const
int nOuterHits_max() const
ROOT::Math::LorentzVector< ROOT::Math::PxPyPzE4D< double > > XYZTLorentzVectorD
Lorentz vector with cylindrical internal representation using pseudorapidity.
const double angle_io() const
const bool isTherePrimaryTracks() const
--—— Provide useful information --—— ///
PFDisplacedVertexHelper()
double normalizedChi2() const
chi-squared divided by n.d.o.f. (or chi-squared * 1e6 if n.d.o.f. is zero)
TrackBaseRef originalTrack(const Track &refTrack) const
const math::XYZTLorentzVector secondaryMomentum(std::string massHypo="PI", bool useRefitted=true, double mass=0.0) const
void Dump(std::ostream &out=std::cout) const
static const double proton_mass2
void Dump(std::ostream &out=std::cout) const
double px() const
x coordinate of momentum vector
void setPrimaryVertex(edm::Handle< reco::VertexCollection > mainVertexHandle, edm::Handle< reco::BeamSpot > beamSpotHandle)
Update the primary vertex information.
const std::vector< Track > & refittedTracks() const
Returns the container of refitted tracks.
const Point & position() const
position
bool isKaonMass(const reco::PFDisplacedVertex &v) const
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
double looper_eta_max() const
bool isTrackSelected(const reco::Track &trk, const reco::PFDisplacedVertex::VertexTrackType vertexTrackType) const
Select tracks tool.
~PFDisplacedVertexHelper()
reco::PFDisplacedVertex::VertexType identifyVertex(const reco::PFDisplacedVertex &v) const
Vertex identification tool.
double pt() const
track transverse momentum
static const double pion_mass2
Masses2 taken from PDG.
int lambdaCP(const reco::PFDisplacedVertex &v) const
Tools used to calculate quantities for vertex identification.
const std::vector< VertexTrackType > trackTypes() const
unsigned short numberOfValidHits() const
number of valid hits found
std::string quality() const
double pz() const
z coordinate of momentum vector
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
XYZPointD XYZPoint
point in space with cartesian internal representation
const math::XYZTLorentzVector primaryMomentum(std::string massHypo="PI", bool useRefitted=true, double mass=0.0) const
Momentum of primary or merged track calculated with a mass hypothesis.
VertexIdentifier vertexIdentifier_
bool identifyVertices() const
bool quality(const TrackQuality) const
Track quality.
int numberOfLostHits(HitCategory category) const
void Dump(std::ostream &out=std::cout) const
double angle_V0Conv_max() const
math::XYZPoint pvtx_
Primary vertex information updated for each event.
double y0() const
y coordinate
TracksSelector tracksSelector_
double mLambda_max() const
const bool isThereMergedTracks() const
If a merged track was identified.
double dxy() const
dxy parameter. (This is the transverse impact parameter w.r.t. to (0,0,0) ONLY if refPoint is close t...
const int nSecondaryTracks() const
Number of secondary tracks was identified.
bool selectTracks() const
M_Hypo
Mass hypothesis enum.
double logPrimSec_min() const
double py() const
y coordinate of momentum vector
const int nTracks() const
Number of tracks.
double x0() const
x coordinate