39 mainVertexHandle->begin()->y(),
40 mainVertexHandle->begin()->z()) :
51 bool isGoodTrack =
false;
107 double pt_ee = mom_ee.Pt();
108 double eta_vtx = v.
position().eta();
116 bool isFake = bDirectionFake ||(bLowPt && !bLooperEta);
117 bool isLooper = !bDirectionFake && bLowPt && bLooperEta;
120 if (isLooper)
return PFDisplacedVertex::LOOPER;
126 double mass_ee = mom_ee.M();
133 bool bPair = (nTracks == nSecondaryTracks) && (nTracks == 2);
134 bool bOpposite = (c1*c2 < -0.1);
138 bool bV0Conv = bPair && bOpposite && bDirection;
147 bool isConv = bConvMass;
149 if (isConv)
return PFDisplacedVertex::CONVERSION_LOOSE;
153 double mass_pipi = mom_pipi.M();
161 if (isK0)
return PFDisplacedVertex::K0_DECAY;
168 bool isLambda = (lambdaKind == 1);
169 bool isLambdaBar = (lambdaKind == -1);
171 if (isLambda)
return PFDisplacedVertex::LAMBDA_DECAY;
172 if (isLambdaBar)
return PFDisplacedVertex::LAMBDABAR_DECAY;
178 (nSecondaryTracks == 1) && bPrimaryTracks && !bMergedTracks
185 bool isKPlus = bKMass && c1 > 0;
186 bool isKMinus = bKMass && c1 < 0;
188 if(isKMinus)
return PFDisplacedVertex::KMINUS_DECAY_LOOSE;
189 if(isKPlus)
return PFDisplacedVertex::KPLUS_DECAY_LOOSE;
197 double p_prim = mom_prim.P();
198 double p_sec = mom_pipi.P();
199 double pt_prim = mom_prim.Pt();
211 bool isNuclearLowPurity =
212 (nTracks == nSecondaryTracks)
217 (nTracks == nSecondaryTracks)
225 (nSecondaryTracks == 1) && bPrimaryTracks && !bMergedTracks
230 ( (nSecondaryTracks == 1) && bMergedTracks && !bPrimaryTracks )
232 ( (nSecondaryTracks == 1) && bPrimaryTracks && !bMergedTracks
233 && (!bLog || !bPtMin) );
235 if (isNuclearHighPurity)
return PFDisplacedVertex::NUCL;
236 if (isNuclearLowPurity)
return PFDisplacedVertex::NUCL_LOOSE;
238 if (isNuclearKink)
return PFDisplacedVertex::NUCL_KINK;
256 reco::Track tMomentumDcaRefit_0 = refittedTracks[0];
257 reco::Track tMomentumDcaRefit_1 = refittedTracks[1];
259 double mass2_0 = 0, mass2_1 = 0;
269 double E =
sqrt(tMomentumDcaRefit_0.
p()*tMomentumDcaRefit_0.
p() + mass2_0);
272 tMomentumDcaRefit_0.
pz(), E);
276 E =
sqrt(tMomentumDcaRefit_1.
p()*tMomentumDcaRefit_1.
p() + mass2_1);
279 tMomentumDcaRefit_1.
pz(), E);
282 totalMomentumDcaRefit_lambda = momentumDcaRefit_0 + momentumDcaRefit_1;
292 E =
sqrt(tMomentumDcaRefit_0.
p()*tMomentumDcaRefit_0.
p() + mass2_0);
295 tMomentumDcaRefit_0.
pz(), E);
299 E =
sqrt(tMomentumDcaRefit_1.
p()*tMomentumDcaRefit_1.
p() + mass2_1);
302 tMomentumDcaRefit_1.
pz(), E);
305 totalMomentumDcaRefit_lambdabar = momentumDcaRefit_01 + momentumDcaRefit_11;
307 double mass_l = totalMomentumDcaRefit_lambda.M();
308 double mass_lbar = totalMomentumDcaRefit_lambdabar.M();
318 else if (mass_lbar < mass_l
338 if (v.
trackTypes()[0] == PFDisplacedVertex::T_TO_VERTEX) {
344 math::XYZVector trkNeutre(trkInit.x()-trkFinal.x(), trkInit.y()-trkFinal.y(),
345 trkInit.z()-trkFinal.z());
348 double En =
sqrt(0*0 + trkNeutre.Mag2());
353 double massMuNu = trkMuNu.M();
368 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.
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
int numberOfHits(HitCategory category) const
const int nTracks() const
Number of tracks.
double x0() const
x coordinate