8 PFDisplacedVertex::PFDisplacedVertex() :
Vertex(), vertexType_(
ANY), primaryDirection_(0, 0, 0) {}
13 const Track& refTrack,
43 for (
size_t i = 0;
i < refitTrks.size();
i++) {
79 return "CONVERSION_LOOSE";
81 return "CONVERTED_BREMM";
85 return "LAMBDA_DECAY";
87 return "LAMBDABAR_DECAY";
91 return "KMINUS_DECAY";
93 return "KPLUS_DECAY_LOOSE";
95 return "KMINUS_DECAY_LOOSE";
110 if (massHypo.find(
"PI") != string::npos)
112 else if (massHypo.find(
"KAON") != string::npos)
114 else if (massHypo.find(
"LAMBDA") != string::npos)
116 else if (massHypo.find(
"MASSLESS") != string::npos)
118 else if (massHypo.find(
"CUSTOM") != string::npos)
179 if (p_in.Mag2() < 1
e-10)
181 return acos(p_in.Dot(p_out) /
sqrt(p_in.Mag2() * p_out.Mag2())) /
TMath::Pi() * 180.0;
191 p_in = momentumPrim.Vect() /
sqrt(momentumPrim.Vect().Mag2() + 1
e-10);
201 double pion_mass2 = 0.0194;
203 double kaon_mass2 = 0.2476;
205 double lambda_mass2 = 1.267;
209 else if (massHypo ==
M_KAON)
218 cout <<
"Warning: undefined mass hypothesis" << endl;
227 out <<
"==================== This is a Displaced Vertex type " <<
nameVertexType() <<
" ===============" << endl;
231 out <<
" The vertex Fitted Position is: x = " <<
position().x() <<
" y = " <<
position().y()
234 out <<
"\t--- Structure --- " << endl;
240 for (
unsigned i = 0;
i <
pattern.size();
i++) {
242 <<
" AfterVtx = " <<
pattern[
i].second.first <<
" MissHit BeforeVtx = " <<
pattern[
i].first.second
243 <<
" AfterVtx = " <<
pattern[
i].second.second << endl;
250 out <<
"Primary P:\t E " << mom_prim.E() <<
"\tPt = " << mom_prim.Pt() <<
"\tPz = " << mom_prim.Pz()
251 <<
"\tM = " << mom_prim.M() <<
"\tEta = " << mom_prim.Eta() <<
"\tPhi = " << mom_prim.Phi() << endl;
253 out <<
"Secondary P:\t E " << mom_sec.E() <<
"\tPt = " << mom_sec.Pt() <<
"\tPz = " << mom_sec.Pz()
254 <<
"\tM = " << mom_sec.M() <<
"\tEta = " << mom_sec.Eta() <<
"\tPhi = " << mom_sec.Phi() << endl;
260 out <<
" Angle_io = " <<
angle_io() <<
" deg" << endl << endl;
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.
double z() const
z coordinate
std::string nameVertexType() const
void setPrimaryDirection(const math::XYZPoint &pvtx)
const int nMergedTracks() const
Number of merged tracks was identified.
void Dump(std::ostream &out=std::cout) const
cout function
const Point & position() const
position
const int nPrimaryTracks() const
Number of primary tracks was identified.
void add(Ref const &r, float w=1.0)
add a reference to a Track
const int nSecondaryTracks() const
Number of secondary tracks was identified.
Track refittedTrack(const TrackBaseRef &track) const
ALPAKA_FN_HOST_ACC ALPAKA_FN_INLINE constexpr float charge(ConstView const &tracks, int32_t i)
const std::vector< VertexTrackType > trackTypes() const
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
const math::XYZVector primaryDirection() const
Primary Direction.
const int nTracks() const
Number of tracks.
const math::XYZTLorentzVector secondaryMomentum(std::string massHypo="PI", bool useRefitted=true, double mass=0.0) const
size_t tracksSize() const
number of tracks
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
double pt() const
track transverse momentum
void addElement(const TrackBaseRef &r, const Track &refTrack, const PFTrackHitFullInfo &hitInfo, VertexTrackType trackType=T_NOT_FROM_VERTEX, float w=1.0)
Add a new track to the vertex.
std::vector< PFTrackHitFullInfo > trackHitFullInfos_
Information on the distance between track's hits and the Vertex.
double x() const
x coordinate
const int totalCharge() const
Total Charge.
const std::vector< PFTrackHitFullInfo > trackHitFullInfos() const
const size_t trackPosition(const reco::TrackBaseRef &originalTrack) const
double y() const
y coordinate
VertexType vertexType_
--—— MEMBERS --—— ///
double normalizedChi2() const
chi-squared divided by n.d.o.f.
PFDisplacedVertex()
Default constructor.
std::pair< PFTrackHitInfo, PFTrackHitInfo > PFTrackHitFullInfo
XYZVectorD XYZVector
spatial vector with cartesian internal representation
const std::vector< Track > & refittedTracks() const
Returns the container of refitted tracks.
XYZPointD XYZPoint
point in space with cartesian internal representation
std::vector< VertexTrackType > trackTypes_
Types of the tracks associated to the vertex.
const int nKindTracks(VertexTrackType) const
Common tool used to get the number of tracks of a given Kind.
const double getMass2(M_Hypo, double) const
Get the mass with a given hypothesis.
std::pair< OmniClusterRef, TrackingParticleRef > P
const Vector & momentum() const
track momentum vector
math::XYZVector primaryDirection_
const math::XYZTLorentzVector momentum(std::string, VertexTrackType, bool, double mass) const
Common tool to calculate the momentum vector of tracks with a given Kind.
double chi2() const
chi-squares
const bool isThereKindTracks(VertexTrackType) const
---—— TOOLS --------—— ///
void cleanTracks()
Clean the tracks collection and all the associated collections.
const double angle_io() const
M_Hypo
Mass hypothesis enum.
TrackBaseRef originalTrack(const Track &refTrack) const