CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 (RecoVertex< L1Track > &vertex, std::map< const edm::Ptr< TTTrack< Ref_Phase2TrackerDigi_ >>, const T * > trackAssociationMap)
 Conversion from RecoVertex<L1Track> RecoVertex<T> 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...
 
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

template<typename T >
l1tVertexFinder::RecoVertex< T >::RecoVertex ( const double  z0 = -999.)
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.

References clear(), l1tVertexFinder::RecoVertex< T >::hasHighPt(), l1tVertexFinder::RecoVertex< T >::highestPt(), edm::eventsetup::heterocontainer::insert(), l1tVertexFinder::RecoVertex< T >::numHighPtTracks(), l1tVertexFinder::RecoVertex< T >::primaryVertex(), l1tVertexFinder::RecoVertex< T >::pt(), l1tVertexFinder::RecoVertex< T >::tracks(), l1tVertexFinder::RecoVertex< T >::z0(), and l1tVertexFinder::RecoVertex< T >::z0width().

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  }
unsigned int numHighPtTracks_
Definition: RecoVertex.h:86
void clear()
Clear track vector.
Definition: RecoVertex.h:35
void insert(const T *fitTrack)
Assign fitted track to this vertex.
Definition: RecoVertex.h:43
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.

References clear(), edm::eventsetup::heterocontainer::insert(), l1t::Vertex::pt(), HLT_FULL_cff::track, l1t::Vertex::tracks(), and l1t::Vertex::z0().

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  }
unsigned int numHighPtTracks_
Definition: RecoVertex.h:86
float pt() const
Definition: Vertex.cc:12
float z0() const
Definition: Vertex.cc:14
const std::vector< edm::Ptr< Track_t > > & tracks() const
Definition: Vertex.cc:16
void clear()
Clear track vector.
Definition: RecoVertex.h:35
void insert(const T *fitTrack)
Assign fitted track to this vertex.
Definition: RecoVertex.h:43
template<typename T = L1Track>
l1tVertexFinder::RecoVertex< T >::~RecoVertex ( )
inline

Basic destructor.

Definition at line 26 of file RecoVertex.h.

26 {}

Member Function Documentation

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

Clear track vector.

Definition at line 35 of file RecoVertex.h.

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

Referenced by l1tVertexFinder::VertexFinder::GapClustering(), and l1tVertexFinder::RecoVertex< T >::RecoVertex().

35 { tracks_.clear(); }
std::vector< const T * > tracks_
Definition: RecoVertex.h:82
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.

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

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

39 { return highPt_; }
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.

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

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

41 { return highestPt_; }
template<typename T = L1Track>
void l1tVertexFinder::RecoVertex< T >::insert ( const T fitTrack)
inline
template<typename T = L1Track>
void l1tVertexFinder::RecoVertex< T >::isPrimary ( bool  is)
inline

Set primary vertex tag.

Definition at line 45 of file RecoVertex.h.

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

45 { pv_ = is; }
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.

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

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

47 { return numHighPtTracks_; }
unsigned int numHighPtTracks_
Definition: RecoVertex.h:86
template<typename T = L1Track>
unsigned int l1tVertexFinder::RecoVertex< T >::numTracks ( ) const
inline
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.

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

51 { return trueTracks_.size(); }
std::set< const TP * > trueTracks_
Definition: RecoVertex.h:83
RecoVertexWithTP & l1tVertexFinder::RecoVertexWithTP::operator+= ( const RecoVertex< T > &  rhs)
inline

Operators.

Definition at line 29 of file RecoVertex.h.

References SplitLinear::begin, dataset::end, l1tVertexFinder::RecoVertex< T >::tracks(), and l1tVertexFinder::RecoVertex< T >::tracks_.

29  {
30  this->tracks_.insert(std::end(this->tracks_), std::begin(rhs.tracks()), std::end(rhs.tracks()));
31  return *this;
32  }
std::vector< const T * > tracks_
Definition: RecoVertex.h:82
string end
Definition: dataset.py:937
template<typename T = L1Track>
bool l1tVertexFinder::RecoVertex< T >::primaryVertex ( ) const
inline

True if primary vertex.

Definition at line 53 of file RecoVertex.h.

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

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

53 { return pv_; }
template<typename T = L1Track>
double l1tVertexFinder::RecoVertex< T >::pt ( ) const
inline
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.

References DiDispStaMuonMonitor_cfi::pt, and MetAnalyzer::pv().

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

144  {
145  pT_ = pt;
146  z0_ = z0;
147  z0width_ = width;
148  highPt_ = highPt;
149  numHighPtTracks_ = nHighPt;
151  pv_ = pv;
152  }
unsigned int numHighPtTracks_
Definition: RecoVertex.h:86
double highestPt() const
highest track pT in the vertex
Definition: RecoVertex.h:41
double z0() const
Vertex z0 position [cm].
Definition: RecoVertex.h:73
double pt() const
Sum of fitted tracks transverse momentum [GeV].
Definition: RecoVertex.h:55
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.

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

61 { pT_ = pt; }
double pt() const
Sum of fitted tracks transverse momentum [GeV].
Definition: RecoVertex.h:55
template<typename T = L1Track>
void l1tVertexFinder::RecoVertex< T >::setZ0 ( double  z)
inline

Set z0 position [cm].

Definition at line 63 of file RecoVertex.h.

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

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

template<typename T = L1Track>
const std::vector<const T*>& l1tVertexFinder::RecoVertex< T >::tracks ( void  ) const
inline
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.

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

59 { return trueTracks_; }
std::set< const TP * > trueTracks_
Definition: RecoVertex.h:83
template<typename T = L1Track>
double l1tVertexFinder::RecoVertex< T >::z0 ( ) const
inline
template<typename T = L1Track>
double l1tVertexFinder::RecoVertex< T >::z0width ( ) const
inline

Vertex z0 width [cm].

Definition at line 75 of file RecoVertex.h.

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

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

75 { return z0width_; }

Member Data Documentation

template<typename T = L1Track>
double l1tVertexFinder::RecoVertex< T >::highestPt_
private
template<typename T = L1Track>
bool l1tVertexFinder::RecoVertex< T >::highPt_
private
template<typename T = L1Track>
unsigned int l1tVertexFinder::RecoVertex< T >::numHighPtTracks_
private
template<typename T = L1Track>
double l1tVertexFinder::RecoVertex< T >::pT_
private
template<typename T = L1Track>
bool l1tVertexFinder::RecoVertex< T >::pv_
private
template<typename T = L1Track>
std::vector<const T*> l1tVertexFinder::RecoVertex< T >::tracks_
private
template<typename T = L1Track>
std::set<const TP*> l1tVertexFinder::RecoVertex< T >::trueTracks_
private
template<typename T = L1Track>
double l1tVertexFinder::RecoVertex< T >::z0_
private
template<typename T = L1Track>
double l1tVertexFinder::RecoVertex< T >::z0width_
private