CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Member Functions | Private Attributes
reco::PFDisplacedVertex Class Reference

Block of elements. More...

#include <PFDisplacedVertex.h>

Inheritance diagram for reco::PFDisplacedVertex:
reco::Vertex

Public Types

enum  M_Hypo {
  M_CUSTOM, M_MASSLESS, M_PION, M_KAON,
  M_LAMBDA
}
 Mass hypothesis enum. More...
 
typedef std::pair< PFTrackHitInfo, PFTrackHitInfoPFTrackHitFullInfo
 
typedef std::pair< unsigned int, unsigned int > PFTrackHitInfo
 Information on the distance between track's hits and the Vertex. More...
 
enum  VertexTrackType { T_NOT_FROM_VERTEX, T_TO_VERTEX, T_FROM_VERTEX, T_MERGED }
 
enum  VertexType {
  ANY = 0, FAKE = 1, LOOPER = 2, NUCL = 10,
  NUCL_LOOSE = 11, NUCL_KINK = 12, CONVERSION = 20, CONVERSION_LOOSE = 21,
  CONVERTED_BREMM = 22, K0_DECAY = 30, LAMBDA_DECAY = 31, LAMBDABAR_DECAY = 32,
  KPLUS_DECAY = 40, KMINUS_DECAY = 41, KPLUS_DECAY_LOOSE = 42, KMINUS_DECAY_LOOSE = 43,
  BSM_VERTEX = 100
}
 
- Public Types inherited from reco::Vertex
enum  { dimension = 3, dimension4D = 4 }
 error matrix dimension More...
 
enum  { size = dimension * (dimension + 1) / 2, size4D = (dimension4D) * (dimension4D + 1) / 2 }
 matix size More...
 
typedef math::Error< dimension >::type CovarianceMatrix
 covariance error matrix (3x3) More...
 
typedef math::Error< dimension4D >::type CovarianceMatrix4D
 covariance error matrix (4x4) More...
 
typedef math::Error< dimension >::type Error
 covariance error matrix (3x3) More...
 
typedef math::Error< dimension4D >::type Error4D
 covariance error matrix (4x4) More...
 
typedef unsigned int index
 index type More...
 
typedef math::XYZPoint Point
 point in the space More...
 
typedef std::vector< TrackBaseRef >::const_iterator trackRef_iterator
 The iteratator for the vector<TrackRef> More...
 

Public Member Functions

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. More...
 
const double angle_io () const
 
void calcKinematics ()
 
void cleanTracks ()
 Clean the tracks collection and all the associated collections. More...
 
void Dump (std::ostream &out=std::cout) const
 cout function More...
 
bool isBSM () const
 
bool isConv () const
 
bool isConv_Loose () const
 
bool isConvertedBremm () const
 
bool isFake () const
 
const bool isIncomingTrack (const reco::TrackBaseRef &originalTrack) const
 Is primary or merged track. More...
 
bool isK0 () const
 
bool isKminus () const
 
bool isKminus_Loose () const
 
bool isKplus () const
 
bool isKplus_Loose () const
 
bool isLambda () const
 
bool isLambdaBar () const
 
bool isLooper () const
 
const bool isMergedTrack (const reco::TrackBaseRef &originalTrack) const
 Is a secondary track was identified. More...
 
bool isNucl () const
 
bool isNucl_Kink () const
 
bool isNucl_Loose () const
 
const bool isOutgoingTrack (const reco::TrackBaseRef &originalTrack) const
 Is secondary track. More...
 
const bool isPrimaryTrack (const reco::TrackBaseRef &originalTrack) const
 Is a primary track was identified. More...
 
const bool isSecondaryTrack (const reco::TrackBaseRef &originalTrack) const
 Is a secondary track was identified. More...
 
const bool isThereMergedTracks () const
 If a merged track was identified. More...
 
const bool isThereNotFromVertexTracks () const
 If there is a track which was not identified. More...
 
const bool isTherePrimaryTracks () const
 --—— Provide useful information --—— /// More...
 
const bool isThereSecondaryTracks () const
 If a secondary track was identified. More...
 
std::string nameVertexType () const
 
const int nMergedTracks () const
 Number of merged tracks was identified. More...
 
const int nNotFromVertexTracks () const
 Number of tracks which was not identified. More...
 
const int nPrimaryTracks () const
 Number of primary tracks was identified. More...
 
const int nSecondaryTracks () const
 Number of secondary tracks was identified. More...
 
const int nTracks () const
 Number of tracks. More...
 
 PFDisplacedVertex ()
 Default constructor. More...
 
 PFDisplacedVertex (reco::Vertex &)
 Constructor from the reco::Vertex. More...
 
const math::XYZVector primaryDirection () const
 Primary Direction. More...
 
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. More...
 
const math::XYZTLorentzVector primaryMomentum (M_Hypo massHypo, bool useRefitted=true, double mass=0.0) const
 Momentum of primary or merged track calculated with a mass hypothesis. More...
 
const double primaryPt () const
 Momentum of primary or merged track calculated with a mass hypothesis. More...
 
const math::XYZTLorentzVector secondaryMomentum (std::string massHypo="PI", bool useRefitted=true, double mass=0.0) const
 
const math::XYZTLorentzVector secondaryMomentum (M_Hypo massHypo, bool useRefitted=true, double mass=0.0) const
 
const double secondaryPt () const
 
void setPrimaryDirection (const math::XYZPoint &pvtx)
 
void setVertexType (VertexType vertexType)
 Set the type of this vertex. More...
 
const int totalCharge () const
 Total Charge. More...
 
const PFTrackHitFullInfo trackHitFullInfo (const reco::TrackBaseRef &originalTrack) const
 
const std::vector< PFTrackHitFullInfotrackHitFullInfos () const
 
const std::vector< VertexTrackTypetrackTypes () const
 
VertexType vertexType ()
 Get the type of this vertex. More...
 
- Public Member Functions inherited from reco::Vertex
template<typename Ref >
void add (Ref const &r, float w=1.0)
 add a reference to a Track More...
 
void add (const TrackBaseRef &r, const Track &refTrack, float w=1.0)
 add the original a Track(reference) and the smoothed Track More...
 
double chi2 () const
 chi-squares More...
 
double covariance (int i, int j) const
 (i, j)-th element of error matrix, i, j = 0, ... 2 More...
 
CovarianceMatrix covariance () const
 return SMatrix More...
 
CovarianceMatrix4D covariance4D () const
 return SMatrix 4D More...
 
Error error () const
 return SMatrix More...
 
Error4D error4D () const
 return SMatrix More...
 
void fill (CovarianceMatrix &v) const
 fill SMatrix More...
 
void fill (CovarianceMatrix4D &v) const
 4D version More...
 
bool hasRefittedTracks () const
 Checks whether refitted tracks are stored. More...
 
bool isFake () const
 
bool isValid () const
 Tells whether the vertex is valid. More...
 
double ndof () const
 
double normalizedChi2 () const
 chi-squared divided by n.d.o.f. More...
 
unsigned int nTracks (float minWeight=0.5) const
 Returns the number of tracks in the vertex with weight above minWeight. More...
 
TrackBaseRef originalTrack (const Track &refTrack) const
 
math::XYZTLorentzVectorD p4 (float mass=0.13957018, float minWeight=0.5) const
 Returns the four momentum of the sum of the tracks, assuming the given mass for the decay products. More...
 
const Pointposition () const
 position More...
 
Track refittedTrack (const TrackBaseRef &track) const
 
Track refittedTrack (const TrackRef &track) const
 
const std::vector< Track > & refittedTracks () const
 Returns the container of refitted tracks. More...
 
void removeTracks ()
 
void reserve (int size, bool refitAsWell=false)
 reserve space for the tracks More...
 
double t () const
 t coordinate More...
 
double tError () const
 error on t More...
 
const TrackBaseReftrackRefAt (size_t idx) const
 python friendly track getting More...
 
auto const & tracks () const
 
trackRef_iterator tracks_begin () const
 first iterator over tracks More...
 
trackRef_iterator tracks_end () const
 last iterator over tracks More...
 
size_t tracksSize () const
 number of tracks More...
 
template<typename TREF >
float trackWeight (const TREF &r) const
 returns the weight with which a Track has contributed to the vertex-fit. More...
 
 Vertex ()
 
 Vertex (const Point &, const Error &)
 Constructor for a fake vertex. More...
 
 Vertex (const Point &, const Error4D &, double)
 Constructor for a fake vertex. 4D. More...
 
 Vertex (const Point &, const Error &, double chi2, double ndof, size_t size)
 constructor for a valid vertex, with all data More...
 
 Vertex (const Point &, const Error4D &, double time, double chi2, double ndof, size_t size)
 constructor for a valid vertex, with all data 4D More...
 
double x () const
 x coordinate More...
 
double xError () const
 error on x More...
 
double y () const
 y coordinate More...
 
double yError () const
 error on y More...
 
double z () const
 z coordinate More...
 
double zError () const
 error on z More...
 

Private Member Functions

const double getMass2 (M_Hypo, double) const
 Get the mass with a given hypothesis. More...
 
const bool isThereKindTracks (VertexTrackType) const
 ---—— TOOLS --------—— /// More...
 
const bool isTrack (size_t itrk, VertexTrackType T) const
 
const math::XYZTLorentzVector momentum (std::string, VertexTrackType, bool, double mass) const
 Common tool to calculate the momentum vector of tracks with a given Kind. More...
 
const math::XYZTLorentzVector momentum (M_Hypo massHypo, VertexTrackType, bool, double mass) const
 Common tool to calculate the momentum vector of tracks with a given Kind. More...
 
const int nKindTracks (VertexTrackType) const
 Common tool used to get the number of tracks of a given Kind. More...
 
const size_t trackPosition (const reco::TrackBaseRef &originalTrack) const
 

Private Attributes

math::XYZTLorentzVector defaultPrimaryMomentum_
 
math::XYZTLorentzVector defaultSecondaryMomentum_
 
math::XYZVector primaryDirection_
 
std::vector< PFTrackHitFullInfotrackHitFullInfos_
 Information on the distance between track's hits and the Vertex. More...
 
std::vector< VertexTrackTypetrackTypes_
 Types of the tracks associated to the vertex. More...
 
VertexType vertexType_
 --—— MEMBERS --—— /// More...
 

Detailed Description

Block of elements.

Author
Maxime Gouzevitch
Date
November 2009

A DisplacedVertex is an extension of Vector with some additionnal informations tracks's hit-vertex distances, tracks types and the expected vertex type.

Definition at line 23 of file PFDisplacedVertex.h.

Member Typedef Documentation

◆ PFTrackHitFullInfo

Definition at line 27 of file PFDisplacedVertex.h.

◆ PFTrackHitInfo

typedef std::pair<unsigned int, unsigned int> reco::PFDisplacedVertex::PFTrackHitInfo

Information on the distance between track's hits and the Vertex.

Definition at line 26 of file PFDisplacedVertex.h.

Member Enumeration Documentation

◆ M_Hypo

◆ VertexTrackType

Classification of tracks according to the position with respect to the Vertex. A Merged track is a track which has at least two hits before and two hits after the vertex. It may come from a primary track merged with a low quality secondary track.

Enumerator
T_NOT_FROM_VERTEX 
T_TO_VERTEX 
T_FROM_VERTEX 
T_MERGED 

Definition at line 36 of file PFDisplacedVertex.h.

◆ VertexType

Classification of vertex according to different parameters such as the Number of tracks, the invariant mass etc...

Enumerator
ANY 
FAKE 
LOOPER 
NUCL 
NUCL_LOOSE 
NUCL_KINK 
CONVERSION 
CONVERSION_LOOSE 
CONVERTED_BREMM 
K0_DECAY 
LAMBDA_DECAY 
LAMBDABAR_DECAY 
KPLUS_DECAY 
KMINUS_DECAY 
KPLUS_DECAY_LOOSE 
KMINUS_DECAY_LOOSE 
BSM_VERTEX 

Definition at line 40 of file PFDisplacedVertex.h.

40  {
41  ANY = 0,
42  FAKE = 1,
43  LOOPER = 2,
44  NUCL = 10,
45  NUCL_LOOSE = 11,
46  NUCL_KINK = 12,
47  CONVERSION = 20,
48  CONVERSION_LOOSE = 21,
49  CONVERTED_BREMM = 22,
50  K0_DECAY = 30,
51  LAMBDA_DECAY = 31,
52  LAMBDABAR_DECAY = 32,
53  KPLUS_DECAY = 40,
54  KMINUS_DECAY = 41,
55  KPLUS_DECAY_LOOSE = 42,
56  KMINUS_DECAY_LOOSE = 43,
57  BSM_VERTEX = 100
58  };

Constructor & Destructor Documentation

◆ PFDisplacedVertex() [1/2]

PFDisplacedVertex::PFDisplacedVertex ( )

Default constructor.

Definition at line 8 of file PFDisplacedVertex.cc.

8 : Vertex(), vertexType_(ANY), primaryDirection_(0, 0, 0) {}
VertexType vertexType_
--—— MEMBERS --—— ///
math::XYZVector primaryDirection_

◆ PFDisplacedVertex() [2/2]

PFDisplacedVertex::PFDisplacedVertex ( reco::Vertex v)

Constructor from the reco::Vertex.

Definition at line 10 of file PFDisplacedVertex.cc.

Member Function Documentation

◆ addElement()

void PFDisplacedVertex::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.

Definition at line 12 of file PFDisplacedVertex.cc.

References reco::Vertex::add(), alignCSCRings::r, trackHitFullInfos_, PbPb_ZMuSkimMuonDPG_cff::trackType, trackTypes_, and w().

Referenced by PFDisplacedVertexFinder::fitVertexFromSeed().

16  {
17  add(r, refTrack, w);
18  trackTypes_.push_back(trackType);
19  trackHitFullInfos_.push_back(hitInfo);
20 }
T w() const
void add(Ref const &r, float w=1.0)
add a reference to a Track
Definition: Vertex.h:86
std::vector< PFTrackHitFullInfo > trackHitFullInfos_
Information on the distance between track&#39;s hits and the Vertex.
std::vector< VertexTrackType > trackTypes_
Types of the tracks associated to the vertex.

◆ angle_io()

const double PFDisplacedVertex::angle_io ( ) const

Angle PrimaryVertex-DisplacedVertex (or primary track if there is) And secondary momentum

Definition at line 172 of file PFDisplacedVertex.cc.

References MillePedeFileConverter_cfg::e, Pi, primaryDirection(), secondaryMomentum(), and mathSSE::sqrt().

Referenced by Dump().

172  {
173  math::XYZTLorentzVector momentumSec = secondaryMomentum((string) "PI", true);
174 
175  math::XYZVector p_out = momentumSec.Vect();
176 
178 
179  if (p_in.Mag2() < 1e-10)
180  return -1;
181  return acos(p_in.Dot(p_out) / sqrt(p_in.Mag2() * p_out.Mag2())) / TMath::Pi() * 180.0;
182 }
const double Pi
const math::XYZVector primaryDirection() const
Primary Direction.
const math::XYZTLorentzVector secondaryMomentum(std::string massHypo="PI", bool useRefitted=true, double mass=0.0) const
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
T sqrt(T t)
Definition: SSEVec.h:19
XYZVectorD XYZVector
spatial vector with cartesian internal representation
Definition: Vector3D.h:31

◆ calcKinematics()

void reco::PFDisplacedVertex::calcKinematics ( )
inline

Definition at line 184 of file PFDisplacedVertex.h.

References defaultPrimaryMomentum_, defaultSecondaryMomentum_, momentum(), T_FROM_VERTEX, and T_TO_VERTEX.

Referenced by PFDisplacedVertexFinder::fitVertexFromSeed().

184  {
185  defaultPrimaryMomentum_ = momentum("PI", T_TO_VERTEX, false, 0.0);
187  }
const math::XYZTLorentzVector momentum(std::string, VertexTrackType, bool, double mass) const
Common tool to calculate the momentum vector of tracks with a given Kind.
math::XYZTLorentzVector defaultPrimaryMomentum_
math::XYZTLorentzVector defaultSecondaryMomentum_

◆ cleanTracks()

void PFDisplacedVertex::cleanTracks ( )

Clean the tracks collection and all the associated collections.

Definition at line 22 of file PFDisplacedVertex.cc.

References reco::Vertex::removeTracks(), trackHitFullInfos_, and trackTypes_.

22  {
23  removeTracks();
24  trackTypes_.clear();
25  trackHitFullInfos_.clear();
26 }
std::vector< PFTrackHitFullInfo > trackHitFullInfos_
Information on the distance between track&#39;s hits and the Vertex.
std::vector< VertexTrackType > trackTypes_
Types of the tracks associated to the vertex.
void removeTracks()
Definition: Vertex.cc:75

◆ Dump()

void PFDisplacedVertex::Dump ( std::ostream &  out = std::cout) const

cout function

Definition at line 222 of file PFDisplacedVertex.cc.

References angle_io(), reco::Vertex::chi2(), mps_fire::i, nameVertexType(), reco::Vertex::ndof(), nMergedTracks(), reco::Vertex::normalizedChi2(), nPrimaryTracks(), nSecondaryTracks(), nTracks(), MillePedeFileConverter_cfg::out, topSingleLeptonDQM_PU_cfi::pattern, reco::Vertex::position(), primaryDirection(), primaryMomentum(), secondaryMomentum(), trackHitFullInfos(), PbPb_ZMuSkimMuonDPG_cff::trackType, and trackTypes().

222  {
223  if (!out)
224  return;
225 
226  out << "" << endl;
227  out << "==================== This is a Displaced Vertex type " << nameVertexType() << " ===============" << endl;
228 
229  out << " Vertex chi2 = " << chi2() << " ndf = " << ndof() << " normalised chi2 = " << normalizedChi2() << endl;
230 
231  out << " The vertex Fitted Position is: x = " << position().x() << " y = " << position().y()
232  << " rho = " << position().rho() << " z = " << position().z() << endl;
233 
234  out << "\t--- Structure --- " << endl;
235  out << "Number of tracks: " << nTracks() << " nPrimary " << nPrimaryTracks() << " nMerged " << nMergedTracks()
236  << " nSecondary " << nSecondaryTracks() << endl;
237 
238  vector<PFDisplacedVertex::PFTrackHitFullInfo> pattern = trackHitFullInfos();
239  vector<PFDisplacedVertex::VertexTrackType> trackType = trackTypes();
240  for (unsigned i = 0; i < pattern.size(); i++) {
241  out << "track " << i << " type = " << trackType[i] << " nHit BeforeVtx = " << pattern[i].first.first
242  << " AfterVtx = " << pattern[i].second.first << " MissHit BeforeVtx = " << pattern[i].first.second
243  << " AfterVtx = " << pattern[i].second.second << endl;
244  }
245 
246  math::XYZTLorentzVector mom_prim = primaryMomentum((string) "PI", true);
247  math::XYZTLorentzVector mom_sec = secondaryMomentum((string) "PI", true);
248 
249  // out << "Primary P:\t E " << setprecision(3) << setw(5) << mom_prim.E()
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;
252 
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;
255 
256  out << " The vertex Direction is x = " << primaryDirection().x() << " y = " << primaryDirection().y()
257  << " z = " << primaryDirection().z() << " eta = " << primaryDirection().eta()
258  << " phi = " << primaryDirection().phi() << endl;
259 
260  out << " Angle_io = " << angle_io() << " deg" << endl << endl;
261 }
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.
std::string nameVertexType() const
const int nMergedTracks() const
Number of merged tracks was identified.
const Point & position() const
position
Definition: Vertex.h:127
const int nPrimaryTracks() const
Number of primary tracks was identified.
const int nSecondaryTracks() const
Number of secondary tracks was identified.
const std::vector< VertexTrackType > trackTypes() const
double ndof() const
Definition: Vertex.h:123
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
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
const std::vector< PFTrackHitFullInfo > trackHitFullInfos() const
double normalizedChi2() const
chi-squared divided by n.d.o.f.
Definition: Vertex.h:125
double chi2() const
chi-squares
Definition: Vertex.h:116
const double angle_io() const

◆ getMass2()

const double PFDisplacedVertex::getMass2 ( M_Hypo  massHypo,
double  mass 
) const
private

Get the mass with a given hypothesis.

Definition at line 199 of file PFDisplacedVertex.cc.

References gather_cfg::cout, M_CUSTOM, M_KAON, M_LAMBDA, M_MASSLESS, M_PION, and EgHLTOffHistBins_cfi::mass.

Referenced by momentum().

199  {
200  // pion_mass = 0.1396 GeV
201  double pion_mass2 = 0.0194;
202  // k0_mass = 0.4976 GeV
203  double kaon_mass2 = 0.2476;
204  // lambda0_mass = 1.116 GeV
205  double lambda_mass2 = 1.267;
206 
207  if (massHypo == M_PION)
208  return pion_mass2;
209  else if (massHypo == M_KAON)
210  return kaon_mass2;
211  else if (massHypo == M_LAMBDA)
212  return lambda_mass2;
213  else if (massHypo == M_MASSLESS)
214  return 0;
215  else if (massHypo == M_CUSTOM)
216  return mass * mass;
217 
218  cout << "Warning: undefined mass hypothesis" << endl;
219  return 0;
220 }

◆ isBSM()

bool reco::PFDisplacedVertex::isBSM ( ) const
inline

Definition at line 219 of file PFDisplacedVertex.h.

References BSM_VERTEX, and vertexType_.

219 { return vertexType_ == BSM_VERTEX; }
VertexType vertexType_
--—— MEMBERS --—— ///

◆ isConv()

bool reco::PFDisplacedVertex::isConv ( ) const
inline

Definition at line 209 of file PFDisplacedVertex.h.

References CONVERSION, and vertexType_.

209 { return vertexType_ == CONVERSION; }
VertexType vertexType_
--—— MEMBERS --—— ///

◆ isConv_Loose()

bool reco::PFDisplacedVertex::isConv_Loose ( ) const
inline

Definition at line 210 of file PFDisplacedVertex.h.

References CONVERSION_LOOSE, and vertexType_.

210 { return vertexType_ == CONVERSION_LOOSE; }
VertexType vertexType_
--—— MEMBERS --—— ///

◆ isConvertedBremm()

bool reco::PFDisplacedVertex::isConvertedBremm ( ) const
inline

Definition at line 211 of file PFDisplacedVertex.h.

References CONVERTED_BREMM, and vertexType_.

211 { return vertexType_ == CONVERTED_BREMM; }
VertexType vertexType_
--—— MEMBERS --—— ///

◆ isFake()

bool reco::PFDisplacedVertex::isFake ( ) const
inline

Definition at line 204 of file PFDisplacedVertex.h.

References FAKE, and vertexType_.

Referenced by PFDisplacedVertexFinder::rejectAndLabelVertex().

204 { return vertexType_ == FAKE; }
VertexType vertexType_
--—— MEMBERS --—— ///

◆ isIncomingTrack()

const bool reco::PFDisplacedVertex::isIncomingTrack ( const reco::TrackBaseRef originalTrack) const
inline

Is primary or merged track.

Definition at line 128 of file PFDisplacedVertex.h.

References isTrack(), reco::Vertex::originalTrack(), T_MERGED, T_TO_VERTEX, and trackPosition().

Referenced by PF_PU_AssoMapAlgos::FindNIVertex().

128  {
129  size_t itrk = trackPosition(originalTrack);
130  return isTrack(itrk, T_MERGED) || isTrack(itrk, T_TO_VERTEX);
131  }
const size_t trackPosition(const reco::TrackBaseRef &originalTrack) const
TrackBaseRef originalTrack(const Track &refTrack) const
Definition: Vertex.cc:81
const bool isTrack(size_t itrk, VertexTrackType T) const

◆ isK0()

bool reco::PFDisplacedVertex::isK0 ( ) const
inline

Definition at line 212 of file PFDisplacedVertex.h.

References K0_DECAY, and vertexType_.

212 { return vertexType_ == K0_DECAY; }
VertexType vertexType_
--—— MEMBERS --—— ///

◆ isKminus()

bool reco::PFDisplacedVertex::isKminus ( ) const
inline

Definition at line 216 of file PFDisplacedVertex.h.

References KMINUS_DECAY, and vertexType_.

216 { return vertexType_ == KMINUS_DECAY; }
VertexType vertexType_
--—— MEMBERS --—— ///

◆ isKminus_Loose()

bool reco::PFDisplacedVertex::isKminus_Loose ( ) const
inline

Definition at line 218 of file PFDisplacedVertex.h.

References KMINUS_DECAY_LOOSE, and vertexType_.

◆ isKplus()

bool reco::PFDisplacedVertex::isKplus ( ) const
inline

Definition at line 215 of file PFDisplacedVertex.h.

References KPLUS_DECAY, and vertexType_.

215 { return vertexType_ == KPLUS_DECAY; }
VertexType vertexType_
--—— MEMBERS --—— ///

◆ isKplus_Loose()

bool reco::PFDisplacedVertex::isKplus_Loose ( ) const
inline

Definition at line 217 of file PFDisplacedVertex.h.

References KPLUS_DECAY_LOOSE, and vertexType_.

◆ isLambda()

bool reco::PFDisplacedVertex::isLambda ( ) const
inline

Definition at line 213 of file PFDisplacedVertex.h.

References LAMBDA_DECAY, and vertexType_.

213 { return vertexType_ == LAMBDA_DECAY; }
VertexType vertexType_
--—— MEMBERS --—— ///

◆ isLambdaBar()

bool reco::PFDisplacedVertex::isLambdaBar ( ) const
inline

Definition at line 214 of file PFDisplacedVertex.h.

References LAMBDABAR_DECAY, and vertexType_.

214 { return vertexType_ == LAMBDABAR_DECAY; }
VertexType vertexType_
--—— MEMBERS --—— ///

◆ isLooper()

bool reco::PFDisplacedVertex::isLooper ( ) const
inline

Definition at line 205 of file PFDisplacedVertex.h.

References LOOPER, and vertexType_.

205 { return vertexType_ == LOOPER; }
VertexType vertexType_
--—— MEMBERS --—— ///

◆ isMergedTrack()

const bool reco::PFDisplacedVertex::isMergedTrack ( const reco::TrackBaseRef originalTrack) const
inline

Is a secondary track was identified.

Definition at line 117 of file PFDisplacedVertex.h.

References isTrack(), reco::Vertex::originalTrack(), T_MERGED, and trackPosition().

117  {
118  size_t itrk = trackPosition(originalTrack);
119  return isTrack(itrk, T_MERGED);
120  }
const size_t trackPosition(const reco::TrackBaseRef &originalTrack) const
TrackBaseRef originalTrack(const Track &refTrack) const
Definition: Vertex.cc:81
const bool isTrack(size_t itrk, VertexTrackType T) const

◆ isNucl()

bool reco::PFDisplacedVertex::isNucl ( ) const
inline

Definition at line 206 of file PFDisplacedVertex.h.

References NUCL, and vertexType_.

206 { return vertexType_ == NUCL; }
VertexType vertexType_
--—— MEMBERS --—— ///

◆ isNucl_Kink()

bool reco::PFDisplacedVertex::isNucl_Kink ( ) const
inline

Definition at line 208 of file PFDisplacedVertex.h.

References NUCL_KINK, and vertexType_.

208 { return vertexType_ == NUCL_KINK; }
VertexType vertexType_
--—— MEMBERS --—— ///

◆ isNucl_Loose()

bool reco::PFDisplacedVertex::isNucl_Loose ( ) const
inline

Definition at line 207 of file PFDisplacedVertex.h.

References NUCL_LOOSE, and vertexType_.

207 { return vertexType_ == NUCL_LOOSE; }
VertexType vertexType_
--—— MEMBERS --—— ///

◆ isOutgoingTrack()

const bool reco::PFDisplacedVertex::isOutgoingTrack ( const reco::TrackBaseRef originalTrack) const
inline

Is secondary track.

Definition at line 134 of file PFDisplacedVertex.h.

References isTrack(), reco::Vertex::originalTrack(), T_FROM_VERTEX, and trackPosition().

134  {
135  size_t itrk = trackPosition(originalTrack);
136  return isTrack(itrk, T_FROM_VERTEX);
137  }
const size_t trackPosition(const reco::TrackBaseRef &originalTrack) const
TrackBaseRef originalTrack(const Track &refTrack) const
Definition: Vertex.cc:81
const bool isTrack(size_t itrk, VertexTrackType T) const

◆ isPrimaryTrack()

const bool reco::PFDisplacedVertex::isPrimaryTrack ( const reco::TrackBaseRef originalTrack) const
inline

Is a primary track was identified.

Definition at line 105 of file PFDisplacedVertex.h.

References isTrack(), reco::Vertex::originalTrack(), T_TO_VERTEX, and trackPosition().

105  {
106  size_t itrk = trackPosition(originalTrack);
107  return isTrack(itrk, T_TO_VERTEX);
108  }
const size_t trackPosition(const reco::TrackBaseRef &originalTrack) const
TrackBaseRef originalTrack(const Track &refTrack) const
Definition: Vertex.cc:81
const bool isTrack(size_t itrk, VertexTrackType T) const

◆ isSecondaryTrack()

const bool reco::PFDisplacedVertex::isSecondaryTrack ( const reco::TrackBaseRef originalTrack) const
inline

Is a secondary track was identified.

Definition at line 111 of file PFDisplacedVertex.h.

References isTrack(), reco::Vertex::originalTrack(), T_FROM_VERTEX, and trackPosition().

111  {
112  size_t itrk = trackPosition(originalTrack);
113  return isTrack(itrk, T_FROM_VERTEX);
114  }
const size_t trackPosition(const reco::TrackBaseRef &originalTrack) const
TrackBaseRef originalTrack(const Track &refTrack) const
Definition: Vertex.cc:81
const bool isTrack(size_t itrk, VertexTrackType T) const

◆ isThereKindTracks()

const bool PFDisplacedVertex::isThereKindTracks ( VertexTrackType  T) const
private

---—— TOOLS --------—— ///

Common tool used to know if there are tracks of a given Kind

Definition at line 28 of file PFDisplacedVertex.cc.

References spr::find(), and trackTypes_.

Referenced by isThereMergedTracks(), isThereNotFromVertexTracks(), isTherePrimaryTracks(), isThereSecondaryTracks(), and primaryDirection().

28  {
29  vector<VertexTrackType>::const_iterator iter = find(trackTypes_.begin(), trackTypes_.end(), T);
30  return (iter != trackTypes_.end());
31 }
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
std::vector< VertexTrackType > trackTypes_
Types of the tracks associated to the vertex.
long double T

◆ isThereMergedTracks()

const bool reco::PFDisplacedVertex::isThereMergedTracks ( ) const
inline

If a merged track was identified.

Definition at line 96 of file PFDisplacedVertex.h.

References isThereKindTracks(), and T_MERGED.

Referenced by PF_PU_AssoMapAlgos::FindNIVertex().

96 { return isThereKindTracks(T_MERGED); }
const bool isThereKindTracks(VertexTrackType) const
---—— TOOLS --------—— ///

◆ isThereNotFromVertexTracks()

const bool reco::PFDisplacedVertex::isThereNotFromVertexTracks ( ) const
inline

If there is a track which was not identified.

Definition at line 102 of file PFDisplacedVertex.h.

References isThereKindTracks(), and T_NOT_FROM_VERTEX.

const bool isThereKindTracks(VertexTrackType) const
---—— TOOLS --------—— ///

◆ isTherePrimaryTracks()

const bool reco::PFDisplacedVertex::isTherePrimaryTracks ( ) const
inline

--—— Provide useful information --—— ///

If a primary track was identified

Definition at line 93 of file PFDisplacedVertex.h.

References isThereKindTracks(), and T_TO_VERTEX.

Referenced by PF_PU_AssoMapAlgos::FindNIVertex().

93 { return isThereKindTracks(T_TO_VERTEX); }
const bool isThereKindTracks(VertexTrackType) const
---—— TOOLS --------—— ///

◆ isThereSecondaryTracks()

const bool reco::PFDisplacedVertex::isThereSecondaryTracks ( ) const
inline

If a secondary track was identified.

Definition at line 99 of file PFDisplacedVertex.h.

References isThereKindTracks(), and T_FROM_VERTEX.

const bool isThereKindTracks(VertexTrackType) const
---—— TOOLS --------—— ///

◆ isTrack()

const bool reco::PFDisplacedVertex::isTrack ( size_t  itrk,
VertexTrackType  T 
) const
inlineprivate

Definition at line 246 of file PFDisplacedVertex.h.

References trackTypes_.

Referenced by isIncomingTrack(), isMergedTrack(), isOutgoingTrack(), isPrimaryTrack(), and isSecondaryTrack().

246 { return trackTypes_[itrk] == T; }
std::vector< VertexTrackType > trackTypes_
Types of the tracks associated to the vertex.
long double T

◆ momentum() [1/2]

const math::XYZTLorentzVector reco::PFDisplacedVertex::momentum ( std::string  ,
VertexTrackType  ,
bool  ,
double  mass 
) const
private

Common tool to calculate the momentum vector of tracks with a given Kind.

Referenced by calcKinematics(), momentum(), primaryMomentum(), and secondaryMomentum().

◆ momentum() [2/2]

const math::XYZTLorentzVector PFDisplacedVertex::momentum ( M_Hypo  massHypo,
VertexTrackType  T,
bool  useRefitted,
double  mass 
) const
private

Common tool to calculate the momentum vector of tracks with a given Kind.

Definition at line 124 of file PFDisplacedVertex.cc.

References getMass2(), mps_fire::i, callgraph::m2, EgHLTOffHistBins_cfi::mass, momentum(), reco::TrackBase::momentum(), reco::Vertex::originalTrack(), SiStripOfflineCRack_cfg::p2, reco::Vertex::refittedTracks(), mathSSE::sqrt(), T_MERGED, T_TO_VERTEX, reco::Vertex::tracksSize(), trackTypes_, reco::Vertex::x(), reco::Vertex::y(), and reco::Vertex::z().

127  {
128  const double m2 = getMass2(massHypo, mass);
129 
131 
132  for (size_t i = 0; i < tracksSize(); i++) {
133  bool bType = (trackTypes_[i] == T);
134  if (T == T_TO_VERTEX || T == T_MERGED)
135  bType = (trackTypes_[i] == T_TO_VERTEX || trackTypes_[i] == T_MERGED);
136 
137  if (bType) {
138  if (!useRefitted) {
140 
141  double p2 = trackRef->momentum().Mag2();
143  trackRef->momentum().x(), trackRef->momentum().y(), trackRef->momentum().z(), sqrt(m2 + p2));
144  } else {
145  // cout << "m2 " << m2 << endl;
146 
147  double p2 = refittedTracks()[i].momentum().Mag2();
149  refittedTracks()[i].momentum().y(),
150  refittedTracks()[i].momentum().z(),
151  sqrt(m2 + p2));
152  }
153  }
154  }
155 
156  return P;
157 }
double z() const
z coordinate
Definition: Vertex.h:133
size_t tracksSize() const
number of tracks
Definition: Vertex.h:112
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
T sqrt(T t)
Definition: SSEVec.h:19
double x() const
x coordinate
Definition: Vertex.h:129
double y() const
y coordinate
Definition: Vertex.h:131
const std::vector< Track > & refittedTracks() const
Returns the container of refitted tracks.
Definition: Vertex.h:196
std::vector< VertexTrackType > trackTypes_
Types of the tracks associated to the vertex.
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
Definition: TrackBase.h:664
const math::XYZTLorentzVector momentum(std::string, VertexTrackType, bool, double mass) const
Common tool to calculate the momentum vector of tracks with a given Kind.
long double T
TrackBaseRef originalTrack(const Track &refTrack) const
Definition: Vertex.cc:81

◆ nameVertexType()

std::string PFDisplacedVertex::nameVertexType ( ) const

Definition at line 62 of file PFDisplacedVertex.cc.

References ANY, BSM_VERTEX, CONVERSION, CONVERSION_LOOSE, CONVERTED_BREMM, FAKE, K0_DECAY, KMINUS_DECAY, KMINUS_DECAY_LOOSE, KPLUS_DECAY, KPLUS_DECAY_LOOSE, LAMBDA_DECAY, LAMBDABAR_DECAY, LOOPER, NUCL, NUCL_KINK, NUCL_LOOSE, and vertexType_.

Referenced by Dump().

62  {
63  switch (vertexType_) {
64  case ANY:
65  return "ANY";
66  case FAKE:
67  return "FAKE";
68  case LOOPER:
69  return "LOOPER";
70  case NUCL:
71  return "NUCL";
72  case NUCL_LOOSE:
73  return "NUCL_LOOSE";
74  case NUCL_KINK:
75  return "NUCL_KINK";
76  case CONVERSION:
77  return "CONVERSION";
78  case CONVERSION_LOOSE:
79  return "CONVERSION_LOOSE";
80  case CONVERTED_BREMM:
81  return "CONVERTED_BREMM";
82  case K0_DECAY:
83  return "K0_DECAY";
84  case LAMBDA_DECAY:
85  return "LAMBDA_DECAY";
86  case LAMBDABAR_DECAY:
87  return "LAMBDABAR_DECAY";
88  case KPLUS_DECAY:
89  return "KPLUS_DECAY";
90  case KMINUS_DECAY:
91  return "KMINUS_DECAY";
92  case KPLUS_DECAY_LOOSE:
93  return "KPLUS_DECAY_LOOSE";
94  case KMINUS_DECAY_LOOSE:
95  return "KMINUS_DECAY_LOOSE";
96  case BSM_VERTEX:
97  return "BSM_VERTEX";
98  default:
99  return "?";
100  }
101  return "?";
102 }
VertexType vertexType_
--—— MEMBERS --—— ///

◆ nKindTracks()

const int PFDisplacedVertex::nKindTracks ( VertexTrackType  T) const
private

Common tool used to get the number of tracks of a given Kind.

Definition at line 33 of file PFDisplacedVertex.cc.

References submitPVResolutionJobs::count, and trackTypes_.

Referenced by nMergedTracks(), nNotFromVertexTracks(), nPrimaryTracks(), and nSecondaryTracks().

33  {
34  return count(trackTypes_.begin(), trackTypes_.end(), T);
35 }
std::vector< VertexTrackType > trackTypes_
Types of the tracks associated to the vertex.
long double T

◆ nMergedTracks()

const int reco::PFDisplacedVertex::nMergedTracks ( ) const
inline

Number of merged tracks was identified.

Definition at line 143 of file PFDisplacedVertex.h.

References nKindTracks(), and T_MERGED.

Referenced by Dump().

143 { return nKindTracks(T_MERGED); }
const int nKindTracks(VertexTrackType) const
Common tool used to get the number of tracks of a given Kind.

◆ nNotFromVertexTracks()

const int reco::PFDisplacedVertex::nNotFromVertexTracks ( ) const
inline

Number of tracks which was not identified.

Definition at line 149 of file PFDisplacedVertex.h.

References nKindTracks(), and T_NOT_FROM_VERTEX.

149 { return nKindTracks(T_NOT_FROM_VERTEX); }
const int nKindTracks(VertexTrackType) const
Common tool used to get the number of tracks of a given Kind.

◆ nPrimaryTracks()

const int reco::PFDisplacedVertex::nPrimaryTracks ( ) const
inline

Number of primary tracks was identified.

Definition at line 140 of file PFDisplacedVertex.h.

References nKindTracks(), and T_TO_VERTEX.

Referenced by Dump().

140 { return nKindTracks(T_TO_VERTEX); }
const int nKindTracks(VertexTrackType) const
Common tool used to get the number of tracks of a given Kind.

◆ nSecondaryTracks()

const int reco::PFDisplacedVertex::nSecondaryTracks ( ) const
inline

Number of secondary tracks was identified.

Definition at line 146 of file PFDisplacedVertex.h.

References nKindTracks(), and T_FROM_VERTEX.

Referenced by Dump().

146 { return nKindTracks(T_FROM_VERTEX); }
const int nKindTracks(VertexTrackType) const
Common tool used to get the number of tracks of a given Kind.

◆ nTracks()

const int reco::PFDisplacedVertex::nTracks ( ) const
inline

Number of tracks.

Definition at line 152 of file PFDisplacedVertex.h.

References trackTypes_.

Referenced by Dump().

152 { return trackTypes_.size(); }
std::vector< VertexTrackType > trackTypes_
Types of the tracks associated to the vertex.

◆ primaryDirection()

const math::XYZVector PFDisplacedVertex::primaryDirection ( ) const

Primary Direction.

Definition at line 184 of file PFDisplacedVertex.cc.

References MillePedeFileConverter_cfg::e, isThereKindTracks(), primaryDirection_, primaryMomentum(), secondaryMomentum(), mathSSE::sqrt(), T_MERGED, and T_TO_VERTEX.

Referenced by angle_io(), and Dump().

184  {
185  math::XYZTLorentzVector momentumPrim = primaryMomentum((string) "PI", true);
186  math::XYZTLorentzVector momentumSec = secondaryMomentum((string) "PI", true);
187 
188  math::XYZVector p_in;
189 
190  if ((isThereKindTracks(T_TO_VERTEX) || isThereKindTracks(T_MERGED)) && momentumPrim.E() > momentumSec.E()) {
191  p_in = momentumPrim.Vect() / sqrt(momentumPrim.Vect().Mag2() + 1e-10);
192  } else {
193  p_in = primaryDirection_;
194  }
195 
196  return p_in;
197 }
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.
const math::XYZTLorentzVector secondaryMomentum(std::string massHypo="PI", bool useRefitted=true, double mass=0.0) const
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
T sqrt(T t)
Definition: SSEVec.h:19
XYZVectorD XYZVector
spatial vector with cartesian internal representation
Definition: Vector3D.h:31
math::XYZVector primaryDirection_
const bool isThereKindTracks(VertexTrackType) const
---—— TOOLS --------—— ///

◆ primaryMomentum() [1/2]

const math::XYZTLorentzVector reco::PFDisplacedVertex::primaryMomentum ( std::string  massHypo = "PI",
bool  useRefitted = true,
double  mass = 0.0 
) const
inline

Momentum of primary or merged track calculated with a mass hypothesis.

Definition at line 166 of file PFDisplacedVertex.h.

References EgHLTOffHistBins_cfi::mass, momentum(), and T_TO_VERTEX.

Referenced by Dump(), PF_PU_AssoMapAlgos::FindNIVertex(), and primaryDirection().

168  {
169  return momentum(massHypo, T_TO_VERTEX, useRefitted, mass);
170  }
const math::XYZTLorentzVector momentum(std::string, VertexTrackType, bool, double mass) const
Common tool to calculate the momentum vector of tracks with a given Kind.

◆ primaryMomentum() [2/2]

const math::XYZTLorentzVector reco::PFDisplacedVertex::primaryMomentum ( M_Hypo  massHypo,
bool  useRefitted = true,
double  mass = 0.0 
) const
inline

Momentum of primary or merged track calculated with a mass hypothesis.

Definition at line 180 of file PFDisplacedVertex.h.

References EgHLTOffHistBins_cfi::mass, momentum(), and T_TO_VERTEX.

180  {
181  return momentum(massHypo, T_TO_VERTEX, useRefitted, mass);
182  }
const math::XYZTLorentzVector momentum(std::string, VertexTrackType, bool, double mass) const
Common tool to calculate the momentum vector of tracks with a given Kind.

◆ primaryPt()

const double reco::PFDisplacedVertex::primaryPt ( ) const
inline

Momentum of primary or merged track calculated with a mass hypothesis.

Definition at line 192 of file PFDisplacedVertex.h.

References defaultSecondaryMomentum_.

192 { return defaultSecondaryMomentum_.Pt(); }
math::XYZTLorentzVector defaultSecondaryMomentum_

◆ secondaryMomentum() [1/2]

const math::XYZTLorentzVector reco::PFDisplacedVertex::secondaryMomentum ( std::string  massHypo = "PI",
bool  useRefitted = true,
double  mass = 0.0 
) const
inline

Momentum of secondary tracks calculated with a mass hypothesis. Some of those hypothesis are default: "PI" , "KAON", "LAMBDA", "MASSLESS", "CUSTOM" the value of custom shall be then provided in mass variable

Definition at line 159 of file PFDisplacedVertex.h.

References EgHLTOffHistBins_cfi::mass, momentum(), and T_FROM_VERTEX.

Referenced by angle_io(), Dump(), and primaryDirection().

161  {
162  return momentum(massHypo, T_FROM_VERTEX, useRefitted, mass);
163  }
const math::XYZTLorentzVector momentum(std::string, VertexTrackType, bool, double mass) const
Common tool to calculate the momentum vector of tracks with a given Kind.

◆ secondaryMomentum() [2/2]

const math::XYZTLorentzVector reco::PFDisplacedVertex::secondaryMomentum ( M_Hypo  massHypo,
bool  useRefitted = true,
double  mass = 0.0 
) const
inline

Momentum of secondary tracks calculated with a mass hypothesis. Some of those hypothesis are default: "PI" , "KAON", "LAMBDA", "MASSLESS", "CUSTOM" the value of custom shall be then provided in mass variable

Definition at line 175 of file PFDisplacedVertex.h.

References EgHLTOffHistBins_cfi::mass, momentum(), and T_FROM_VERTEX.

175  {
176  return momentum(massHypo, T_FROM_VERTEX, useRefitted, mass);
177  }
const math::XYZTLorentzVector momentum(std::string, VertexTrackType, bool, double mass) const
Common tool to calculate the momentum vector of tracks with a given Kind.

◆ secondaryPt()

const double reco::PFDisplacedVertex::secondaryPt ( ) const
inline

Definition at line 189 of file PFDisplacedVertex.h.

References defaultPrimaryMomentum_.

189 { return defaultPrimaryMomentum_.Pt(); }
math::XYZTLorentzVector defaultPrimaryMomentum_

◆ setPrimaryDirection()

void PFDisplacedVertex::setPrimaryDirection ( const math::XYZPoint pvtx)

Estimate the direction of the vertex. This function produced a unitary vector. It is calculated the axis linking the primary vertex of the event pvtx to this vertex

Definition at line 54 of file PFDisplacedVertex.cc.

References MillePedeFileConverter_cfg::e, reco::Vertex::position(), primaryDirection_, mathSSE::sqrt(), extraflags_cff::vtx, reco::Vertex::x(), reco::Vertex::y(), and reco::Vertex::z().

Referenced by PFDisplacedVertexFinder::fitVertexFromSeed().

54  {
56  math::XYZVector vtx(pvtx.x(), pvtx.y(), pvtx.z());
57 
59  primaryDirection_ /= (sqrt(primaryDirection_.Mag2()) + 1e-10);
60 }
double z() const
z coordinate
Definition: Vertex.h:133
const Point & position() const
position
Definition: Vertex.h:127
T sqrt(T t)
Definition: SSEVec.h:19
double x() const
x coordinate
Definition: Vertex.h:129
double y() const
y coordinate
Definition: Vertex.h:131
XYZVectorD XYZVector
spatial vector with cartesian internal representation
Definition: Vector3D.h:31
math::XYZVector primaryDirection_

◆ setVertexType()

void reco::PFDisplacedVertex::setVertexType ( VertexType  vertexType)
inline

Set the type of this vertex.

Definition at line 77 of file PFDisplacedVertex.h.

References vertexType(), and vertexType_.

Referenced by PFDisplacedVertexFinder::rejectAndLabelVertex().

VertexType vertexType_
--—— MEMBERS --—— ///
VertexType vertexType()
Get the type of this vertex.

◆ totalCharge()

const int PFDisplacedVertex::totalCharge ( ) const

Total Charge.

Definition at line 159 of file PFDisplacedVertex.cc.

References ALCARECOTkAlJpsiMuMu_cff::charge, mps_fire::i, reco::Vertex::refittedTracks(), T_FROM_VERTEX, T_TO_VERTEX, reco::Vertex::tracksSize(), and trackTypes_.

159  {
160  int charge = 0;
161 
162  for (size_t i = 0; i < tracksSize(); i++) {
163  if (trackTypes_[i] == T_TO_VERTEX)
164  charge += refittedTracks()[i].charge();
165  else if (trackTypes_[i] == T_FROM_VERTEX)
166  charge -= refittedTracks()[i].charge();
167  }
168 
169  return charge;
170 }
size_t tracksSize() const
number of tracks
Definition: Vertex.h:112
const std::vector< Track > & refittedTracks() const
Returns the container of refitted tracks.
Definition: Vertex.h:196
std::vector< VertexTrackType > trackTypes_
Types of the tracks associated to the vertex.

◆ trackHitFullInfo()

const PFTrackHitFullInfo reco::PFDisplacedVertex::trackHitFullInfo ( const reco::TrackBaseRef originalTrack) const
inline

Definition at line 122 of file PFDisplacedVertex.h.

References reco::Vertex::originalTrack(), trackHitFullInfos_, and trackPosition().

122  {
123  size_t itrk = trackPosition(originalTrack);
124  return trackHitFullInfos_[itrk];
125  }
std::vector< PFTrackHitFullInfo > trackHitFullInfos_
Information on the distance between track&#39;s hits and the Vertex.
const size_t trackPosition(const reco::TrackBaseRef &originalTrack) const
TrackBaseRef originalTrack(const Track &refTrack) const
Definition: Vertex.cc:81

◆ trackHitFullInfos()

const std::vector<PFTrackHitFullInfo> reco::PFDisplacedVertex::trackHitFullInfos ( ) const
inline

Definition at line 86 of file PFDisplacedVertex.h.

References trackHitFullInfos_.

Referenced by Dump().

86 { return trackHitFullInfos_; }
std::vector< PFTrackHitFullInfo > trackHitFullInfos_
Information on the distance between track&#39;s hits and the Vertex.

◆ trackPosition()

const size_t PFDisplacedVertex::trackPosition ( const reco::TrackBaseRef originalTrack) const
private

Definition at line 37 of file PFDisplacedVertex.cc.

References MillePedeFileConverter_cfg::e, mps_fire::i, reco::Vertex::originalTrack(), DiDispStaMuonMonitor_cfi::pt, reco::TrackBase::pt(), reco::Vertex::refittedTrack(), and reco::Vertex::refittedTracks().

Referenced by isIncomingTrack(), isMergedTrack(), isOutgoingTrack(), isPrimaryTrack(), isSecondaryTrack(), and trackHitFullInfo().

37  {
38  size_t pos = -1;
39 
41 
42  std::vector<Track> refitTrks = refittedTracks();
43  for (size_t i = 0; i < refitTrks.size(); i++) {
44  if (fabs(refitTrks[i].pt() - refittedTrack.pt()) < 1.e-5) {
45  pos = i;
46  continue;
47  }
48  }
49  // cout << "pos = " << pos << endl;
50 
51  return pos;
52 }
Track refittedTrack(const TrackBaseRef &track) const
Definition: Vertex.cc:91
double pt() const
track transverse momentum
Definition: TrackBase.h:637
const std::vector< Track > & refittedTracks() const
Returns the container of refitted tracks.
Definition: Vertex.h:196
TrackBaseRef originalTrack(const Track &refTrack) const
Definition: Vertex.cc:81

◆ trackTypes()

const std::vector<VertexTrackType> reco::PFDisplacedVertex::trackTypes ( ) const
inline

Definition at line 88 of file PFDisplacedVertex.h.

References trackTypes_.

Referenced by Dump().

88 { return trackTypes_; }
std::vector< VertexTrackType > trackTypes_
Types of the tracks associated to the vertex.

◆ vertexType()

VertexType reco::PFDisplacedVertex::vertexType ( )
inline

Get the type of this vertex.

Definition at line 84 of file PFDisplacedVertex.h.

References vertexType_.

Referenced by setVertexType().

84 { return vertexType_; }
VertexType vertexType_
--—— MEMBERS --—— ///

Member Data Documentation

◆ defaultPrimaryMomentum_

math::XYZTLorentzVector reco::PFDisplacedVertex::defaultPrimaryMomentum_
private

Definition at line 261 of file PFDisplacedVertex.h.

Referenced by calcKinematics(), and secondaryPt().

◆ defaultSecondaryMomentum_

math::XYZTLorentzVector reco::PFDisplacedVertex::defaultSecondaryMomentum_
private

Definition at line 262 of file PFDisplacedVertex.h.

Referenced by calcKinematics(), and primaryPt().

◆ primaryDirection_

math::XYZVector reco::PFDisplacedVertex::primaryDirection_
private

Definition at line 259 of file PFDisplacedVertex.h.

Referenced by primaryDirection(), and setPrimaryDirection().

◆ trackHitFullInfos_

std::vector<PFTrackHitFullInfo> reco::PFDisplacedVertex::trackHitFullInfos_
private

Information on the distance between track's hits and the Vertex.

Definition at line 257 of file PFDisplacedVertex.h.

Referenced by addElement(), cleanTracks(), trackHitFullInfo(), and trackHitFullInfos().

◆ trackTypes_

std::vector<VertexTrackType> reco::PFDisplacedVertex::trackTypes_
private

Types of the tracks associated to the vertex.

Definition at line 254 of file PFDisplacedVertex.h.

Referenced by addElement(), cleanTracks(), isThereKindTracks(), isTrack(), momentum(), nKindTracks(), nTracks(), totalCharge(), and trackTypes().

◆ vertexType_

VertexType reco::PFDisplacedVertex::vertexType_
private