CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
l1tVertexFinder::RecoVertex< T > Class Template Reference

#include <RecoVertex.h>

Public Member Functions

void clear ()
 Clear track vector. More...
 
bool hasHighPt () const
 Compute vertex parameters. More...
 
double highestPt () const
 highest track pT in the vertex More...
 
void insert (const T *fitTrack)
 Assign fitted track to this vertex. More...
 
void isPrimary (bool is)
 Set primary vertex tag. More...
 
unsigned int numHighPtTracks () const
 Number of high-pT tracks (pT > 10 GeV) More...
 
unsigned int numTracks () const
 Number of tracks originating from this vertex. More...
 
unsigned int numTrueTracks () const
 Number of true particles assigned to this vertex. More...
 
RecoVertexoperator+= (const RecoVertex &rhs)
 Operators. More...
 
bool primaryVertex () const
 True if primary vertex. More...
 
double pt () const
 Sum of fitted tracks transverse momentum [GeV]. More...
 
 RecoVertex (const double z0=-999.)
 Basic constructor. More...
 
 RecoVertex (const l1t::Vertex &vertex, std::map< const edm::Ptr< TTTrack< Ref_Phase2TrackerDigi_ >>, const T * > trackAssociationMap)
 Conversion from l1t::Vertex to l1tVertexFinder::RecoVertex. More...
 
 RecoVertex (RecoVertex< L1Track > &vertex, std::map< const edm::Ptr< TTTrack< Ref_Phase2TrackerDigi_ >>, const T * > trackAssociationMap)
 Conversion from RecoVertex<L1Track> RecoVertex<T> More...
 
void setParameters (double pt, double z0, double width=-999., bool highPt=false, unsigned int nHighPt=-999, double highestPt=-999., bool pv=false)
 Set the vertex parameters. More...
 
void setPt (double pt)
 set the pT [GeV] of the vertex More...
 
void setZ0 (double z)
 Set z0 position [cm]. More...
 
const std::vector< const T * > & tracks () const
 Tracks in the vertex. More...
 
const std::set< const TP * > & trueTracks () const
 Tracking particles asociated to the vertex. More...
 
double z0 () const
 Vertex z0 position [cm]. More...
 
double z0width () const
 Vertex z0 width [cm]. More...
 
 ~RecoVertex ()
 Basic destructor. More...
 

Private Attributes

double highestPt_
 
bool highPt_
 
unsigned int numHighPtTracks_
 
double pT_
 
bool pv_
 
std::vector< const T * > tracks_
 
std::set< const TP * > trueTracks_
 
double z0_
 
double z0width_
 

Detailed Description

template<typename T = L1Track>
class l1tVertexFinder::RecoVertex< T >

Definition at line 15 of file RecoVertex.h.

Constructor & Destructor Documentation

◆ RecoVertex() [1/3]

template<typename T >
l1tVertexFinder::RecoVertex< T >::RecoVertex ( const double  z0 = -999.)

◆ RecoVertex() [2/3]

template<typename T >
l1tVertexFinder::RecoVertex< T >::RecoVertex ( RecoVertex< L1Track > &  vertex,
std::map< const edm::Ptr< TTTrack< Ref_Phase2TrackerDigi_ >>, const T * >  trackAssociationMap 
)

Conversion from RecoVertex<L1Track> RecoVertex<T>

Definition at line 103 of file RecoVertex.h.

104  {
105  z0_ = vertex.z0();
106  z0width_ = vertex.z0width();
107  pT_ = vertex.pt();
108  highestPt_ = vertex.highestPt();
109  pv_ = vertex.primaryVertex();
110  highPt_ = vertex.hasHighPt();
111  numHighPtTracks_ = vertex.numHighPtTracks();
112  clear();
113 
114  // loop over base fitted tracks in reco vertex and find the corresponding TP
115  // track using the TTTrack - L1TrackTruthMatched map from above
116  for (const auto& trackIt : vertex.tracks()) {
117  // using insert ensures that true tracks are also stored in vertex object
118  insert(trackAssociationMap[trackIt->getTTTrackPtr()]);
119  }
120  }

References clear(), edm::eventsetup::heterocontainer::insert(), and bphysicsOniaDQM_cfi::vertex.

◆ RecoVertex() [3/3]

template<typename T >
l1tVertexFinder::RecoVertex< T >::RecoVertex ( const l1t::Vertex vertex,
std::map< const edm::Ptr< TTTrack< Ref_Phase2TrackerDigi_ >>, const T * >  trackAssociationMap 
)

Conversion from l1t::Vertex to l1tVertexFinder::RecoVertex.

Definition at line 123 of file RecoVertex.h.

124  {
125  z0_ = vertex.z0();
126  z0width_ = -999.;
127  pT_ = vertex.pt();
128  highestPt_ = -999.;
129  pv_ = false;
130  highPt_ = false;
131  numHighPtTracks_ = 0;
132  clear();
133 
134  // populate vertex with tracks and TP track using the
135  // TTTrack - L1TrackTruthMatched map from above
136  for (const auto& track : vertex.tracks()) {
137  // using insert ensures that true tracks are also stored in vertex object
138  insert(trackAssociationMap.at(track));
139  }
140  }

References clear(), edm::eventsetup::heterocontainer::insert(), HLT_FULL_cff::track, and bphysicsOniaDQM_cfi::vertex.

◆ ~RecoVertex()

template<typename T = L1Track>
l1tVertexFinder::RecoVertex< T >::~RecoVertex ( )
inline

Basic destructor.

Definition at line 26 of file RecoVertex.h.

26 {}

Member Function Documentation

◆ clear()

void l1tVertexFinder::RecoVertexWithTP::clear ( void  )
inline

Clear track vector.

Definition at line 35 of file RecoVertex.h.

35 { tracks_.clear(); }

References l1tVertexFinder::RecoVertex< T >::tracks_.

Referenced by l1tVertexFinder::RecoVertex< T >::RecoVertex().

◆ hasHighPt()

template<typename T = L1Track>
bool l1tVertexFinder::RecoVertex< T >::hasHighPt ( ) const
inline

Compute vertex parameters.

Contain high-pT track?

Definition at line 39 of file RecoVertex.h.

39 { return highPt_; }

References l1tVertexFinder::RecoVertex< T >::highPt_.

◆ highestPt()

template<typename T = L1Track>
double l1tVertexFinder::RecoVertex< T >::highestPt ( ) const
inline

highest track pT in the vertex

Definition at line 41 of file RecoVertex.h.

41 { return highestPt_; }

References l1tVertexFinder::RecoVertex< T >::highestPt_.

◆ insert()

template<typename T = L1Track>
void l1tVertexFinder::RecoVertex< T >::insert ( const T fitTrack)
inline

Assign fitted track to this vertex.

Definition at line 43 of file RecoVertex.h.

43 { tracks_.push_back(fitTrack); }

References l1tVertexFinder::RecoVertex< T >::tracks_.

◆ isPrimary()

template<typename T = L1Track>
void l1tVertexFinder::RecoVertex< T >::isPrimary ( bool  is)
inline

Set primary vertex tag.

Definition at line 45 of file RecoVertex.h.

45 { pv_ = is; }

References l1tVertexFinder::RecoVertex< T >::pv_.

◆ numHighPtTracks()

template<typename T = L1Track>
unsigned int l1tVertexFinder::RecoVertex< T >::numHighPtTracks ( ) const
inline

Number of high-pT tracks (pT > 10 GeV)

Definition at line 47 of file RecoVertex.h.

47 { return numHighPtTracks_; }

References l1tVertexFinder::RecoVertex< T >::numHighPtTracks_.

◆ numTracks()

template<typename T = L1Track>
unsigned int l1tVertexFinder::RecoVertex< T >::numTracks ( ) const
inline

Number of tracks originating from this vertex.

Definition at line 49 of file RecoVertex.h.

49 { return tracks_.size(); }

References l1tVertexFinder::RecoVertex< T >::tracks_.

Referenced by l1tVertexFinder::VertexFinder::meanDistance().

◆ numTrueTracks()

template<typename T = L1Track>
unsigned int l1tVertexFinder::RecoVertex< T >::numTrueTracks ( ) const
inline

Number of true particles assigned to this vertex.

Definition at line 51 of file RecoVertex.h.

51 { return trueTracks_.size(); }

References l1tVertexFinder::RecoVertex< T >::trueTracks_.

◆ operator+=()

RecoVertexWithTP & l1tVertexFinder::RecoVertexWithTP::operator+= ( const RecoVertex< T > &  rhs)
inline

Operators.

Definition at line 29 of file RecoVertex.h.

29  {
30  this->tracks_.insert(std::end(this->tracks_), std::begin(rhs.tracks()), std::end(rhs.tracks()));
31  return *this;
32  }

References mps_fire::end, l1tVertexFinder::RecoVertex< T >::tracks(), and l1tVertexFinder::RecoVertex< T >::tracks_.

◆ primaryVertex()

template<typename T = L1Track>
bool l1tVertexFinder::RecoVertex< T >::primaryVertex ( ) const
inline

True if primary vertex.

Definition at line 53 of file RecoVertex.h.

53 { return pv_; }

References l1tVertexFinder::RecoVertex< T >::pv_.

◆ pt()

template<typename T = L1Track>
double l1tVertexFinder::RecoVertex< T >::pt ( ) const
inline

◆ setParameters()

template<typename T >
void l1tVertexFinder::RecoVertex< T >::setParameters ( double  pt,
double  z0,
double  width = -999.,
bool  highPt = false,
unsigned int  nHighPt = -999,
double  highestPt = -999.,
bool  pv = false 
)

Set the vertex parameters.

Definition at line 143 of file RecoVertex.h.

144  {
145  pT_ = pt;
146  z0_ = z0;
147  z0width_ = width;
148  highPt_ = highPt;
149  numHighPtTracks_ = nHighPt;
151  pv_ = pv;
152  }

References DiDispStaMuonMonitor_cfi::pt, MetAnalyzer::pv(), ApeEstimator_cff::width, and HLTMuonOfflineAnalyzer_cfi::z0.

◆ setPt()

template<typename T = L1Track>
void l1tVertexFinder::RecoVertex< T >::setPt ( double  pt)
inline

set the pT [GeV] of the vertex

Definition at line 61 of file RecoVertex.h.

61 { pT_ = pt; }

References l1tVertexFinder::RecoVertex< T >::pt(), and l1tVertexFinder::RecoVertex< T >::pT_.

◆ setZ0()

template<typename T = L1Track>
void l1tVertexFinder::RecoVertex< T >::setZ0 ( double  z)
inline

Set z0 position [cm].

Definition at line 63 of file RecoVertex.h.

63 { z0_ = z; }

References l1tVertexFinder::RecoVertex< T >::z0_.

◆ tracks()

template<typename T = L1Track>
const std::vector<const T*>& l1tVertexFinder::RecoVertex< T >::tracks ( void  ) const
inline

◆ trueTracks()

template<typename T = L1Track>
const std::set<const TP*>& l1tVertexFinder::RecoVertex< T >::trueTracks ( ) const
inline

Tracking particles asociated to the vertex.

Definition at line 59 of file RecoVertex.h.

59 { return trueTracks_; }

References l1tVertexFinder::RecoVertex< T >::trueTracks_.

◆ z0()

template<typename T = L1Track>
double l1tVertexFinder::RecoVertex< T >::z0 ( ) const
inline

◆ z0width()

template<typename T = L1Track>
double l1tVertexFinder::RecoVertex< T >::z0width ( ) const
inline

Vertex z0 width [cm].

Definition at line 75 of file RecoVertex.h.

75 { return z0width_; }

References l1tVertexFinder::RecoVertex< T >::z0width_.

Member Data Documentation

◆ highestPt_

template<typename T = L1Track>
double l1tVertexFinder::RecoVertex< T >::highestPt_
private

◆ highPt_

template<typename T = L1Track>
bool l1tVertexFinder::RecoVertex< T >::highPt_
private

◆ numHighPtTracks_

template<typename T = L1Track>
unsigned int l1tVertexFinder::RecoVertex< T >::numHighPtTracks_
private

◆ pT_

template<typename T = L1Track>
double l1tVertexFinder::RecoVertex< T >::pT_
private

◆ pv_

template<typename T = L1Track>
bool l1tVertexFinder::RecoVertex< T >::pv_
private

◆ tracks_

template<typename T = L1Track>
std::vector<const T*> l1tVertexFinder::RecoVertex< T >::tracks_
private

◆ trueTracks_

template<typename T = L1Track>
std::set<const TP*> l1tVertexFinder::RecoVertex< T >::trueTracks_
private

◆ z0_

template<typename T = L1Track>
double l1tVertexFinder::RecoVertex< T >::z0_
private

◆ z0width_

template<typename T = L1Track>
double l1tVertexFinder::RecoVertex< T >::z0width_
private
ApeEstimator_cff.width
width
Definition: ApeEstimator_cff.py:24
l1tVertexFinder::RecoVertex::highestPt
double highestPt() const
highest track pT in the vertex
Definition: RecoVertex.h:41
l1tVertexFinder::RecoVertex::z0_
double z0_
Definition: RecoVertex.h:78
HLT_FULL_cff.track
track
Definition: HLT_FULL_cff.py:11724
l1tVertexFinder::RecoVertex::highestPt_
double highestPt_
Definition: RecoVertex.h:81
l1tVertexFinder::RecoVertex::z0
double z0() const
Vertex z0 position [cm].
Definition: RecoVertex.h:73
l1tVertexFinder::RecoVertex::pv_
bool pv_
Definition: RecoVertex.h:84
l1tVertexFinder::RecoVertex::tracks_
std::vector< const T * > tracks_
Definition: RecoVertex.h:82
mps_fire.end
end
Definition: mps_fire.py:242
DDAxes::z
l1tVertexFinder::RecoVertex::pT_
double pT_
Definition: RecoVertex.h:80
bphysicsOniaDQM_cfi.vertex
vertex
Definition: bphysicsOniaDQM_cfi.py:7
MetAnalyzer.pv
def pv(vc)
Definition: MetAnalyzer.py:7
l1tVertexFinder::RecoVertex::z0width_
double z0width_
Definition: RecoVertex.h:79
l1tVertexFinder::RecoVertex::highPt_
bool highPt_
Definition: RecoVertex.h:85
l1tVertexFinder::RecoVertex::trueTracks_
std::set< const TP * > trueTracks_
Definition: RecoVertex.h:83
l1tVertexFinder::RecoVertex::insert
void insert(const T *fitTrack)
Assign fitted track to this vertex.
Definition: RecoVertex.h:43
l1tVertexFinder::RecoVertex::pt
double pt() const
Sum of fitted tracks transverse momentum [GeV].
Definition: RecoVertex.h:55
l1tVertexFinder::RecoVertex::numHighPtTracks_
unsigned int numHighPtTracks_
Definition: RecoVertex.h:86
l1tVertexFinder::RecoVertex::clear
void clear()
Clear track vector.
Definition: RecoVertex.h:35