CMS 3D CMS Logo

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

#include <DataFormats/TrackReco/interface/TrackExtraBase.h>

Inheritance diagram for reco::TrackExtraBase:
reco::TrackExtra

Public Types

using Chi2sFive = std::vector< unsigned char >
 
using TrajParams = std::vector< LocalTrajectoryParameters >
 

Public Member Functions

Chi2sFive const & chi2sX5 () const
 
unsigned int firstRecHit () const
 
TrackingRecHitRef recHit (unsigned int i) const
 get i-th recHit More...
 
TrackingRecHitRef recHitRef (unsigned int i) const
 get a ref to i-th recHit More...
 
auto recHits () const
 accessor to RecHits More...
 
trackingRecHit_iterator recHitsBegin () const
 first iterator over RecHits More...
 
trackingRecHit_iterator recHitsEnd () const
 last iterator over RecHits More...
 
TrackingRecHitCollection const & recHitsProduct () const
 
unsigned int recHitsSize () const
 number of RecHits More...
 
void setHits (TrackingRecHitRefProd const &prod, unsigned firstH, unsigned int nH)
 
void setTrajParams (TrajParams tmps, Chi2sFive chi2s)
 
 TrackExtraBase ()
 default constructor More...
 
TrajParams const & trajParams () const
 

Private Attributes

Chi2sFive m_chi2sX5
 
unsigned int m_firstHit
 
edm::RefCore m_hitCollection
 
unsigned int m_nHits
 
TrajParams m_trajParams
 

Detailed Description

Basic extension of a reconstructed Track. Contains references to the hits assigned to the track.

If you access the hits, check if they are valid or not. (Invalid hits are dummy hits created in layers crossed by the track, where no physical hit was found).

Author
Luca Lista, INFN

Definition at line 23 of file TrackExtraBase.h.

Member Typedef Documentation

using reco::TrackExtraBase::Chi2sFive = std::vector<unsigned char>

Definition at line 27 of file TrackExtraBase.h.

Definition at line 26 of file TrackExtraBase.h.

Constructor & Destructor Documentation

reco::TrackExtraBase::TrackExtraBase ( )
inline

default constructor

Definition at line 30 of file TrackExtraBase.h.

30 : m_firstHit((unsigned int) -1), m_nHits(0) { }
unsigned int m_nHits
unsigned int m_firstHit

Member Function Documentation

Chi2sFive const& reco::TrackExtraBase::chi2sX5 ( ) const
inline

Definition at line 88 of file TrackExtraBase.h.

References m_chi2sX5.

88 { return m_chi2sX5;}
unsigned int reco::TrackExtraBase::firstRecHit ( ) const
inline

Definition at line 43 of file TrackExtraBase.h.

References m_firstHit.

Referenced by recHitsBegin().

43  {
44  return m_firstHit;
45  }
unsigned int m_firstHit
TrackingRecHitRef reco::TrackExtraBase::recHit ( unsigned int  i) const
inline

get i-th recHit

Definition at line 79 of file TrackExtraBase.h.

References recHitRef().

Referenced by ConversionHitChecker::nHitsBeforeVtx().

79  {
80  return recHitRef(i);
81  }
TrackingRecHitRef recHitRef(unsigned int i) const
get a ref to i-th recHit
TrackingRecHitRef reco::TrackExtraBase::recHitRef ( unsigned int  i) const
inline

get a ref to i-th recHit

Definition at line 66 of file TrackExtraBase.h.

References ghostTrackVertexReco_cff::finder, egammaRechitFilter_cfi::hitCollection, mps_fire::i, edm::RefCore::id(), m_firstHit, m_hitCollection, and edm::RefCore::productPtr().

Referenced by recHit().

66  {
67  //Another thread might change the RefCore at the same time.
68  // By using a copy we will be safe.
70  if(hitCollection.productPtr()) {
72  TrackingRecHitRef::value_type const* item = finder(*(static_cast<TrackingRecHitRef::product_type const*>(hitCollection.productPtr())), m_firstHit+i);
73  return TrackingRecHitRef(hitCollection.id(), item, m_firstHit+i);
74  }
76  }
edm::Ref< TrackingRecHitCollection > TrackingRecHitRef
persistent reference to a TrackingRecHit
T value_type
Definition: Ref.h:163
F finder_type
Definition: Ref.h:165
unsigned int m_firstHit
edm::RefCore m_hitCollection
auto reco::TrackExtraBase::recHits ( void  ) const
inline

accessor to RecHits

Definition at line 53 of file TrackExtraBase.h.

References recHitsBegin(), and recHitsEnd().

Referenced by ConversionHitChecker::nHitsBeforeVtx().

trackingRecHit_iterator recHitsEnd() const
last iterator over RecHits
trackingRecHit_iterator recHitsBegin() const
first iterator over RecHits
edm::Range< trackingRecHit_iterator > TrackingRecHitRange
Range class to enable range-based loops for a tracks RecHits.
trackingRecHit_iterator reco::TrackExtraBase::recHitsBegin ( ) const
inline

first iterator over RecHits

Definition at line 56 of file TrackExtraBase.h.

References edm::OwnVector< T, P >::data(), firstRecHit(), and recHitsProduct().

Referenced by recHits(), and recHitsEnd().

56  {
57  return recHitsProduct().data().begin()+firstRecHit();
58  }
TrackingRecHitCollection const & recHitsProduct() const
base const & data() const
Definition: OwnVector.h:440
unsigned int firstRecHit() const
trackingRecHit_iterator reco::TrackExtraBase::recHitsEnd ( ) const
inline

last iterator over RecHits

Definition at line 61 of file TrackExtraBase.h.

References recHitsBegin(), and recHitsSize().

Referenced by recHits().

61  {
62  return recHitsBegin()+recHitsSize();
63  }
unsigned int recHitsSize() const
number of RecHits
trackingRecHit_iterator recHitsBegin() const
first iterator over RecHits
TrackingRecHitCollection const& reco::TrackExtraBase::recHitsProduct ( ) const
inline

Definition at line 83 of file TrackExtraBase.h.

References m_hitCollection.

Referenced by recHitsBegin().

83  {
84  return *edm::getProduct<TrackingRecHitCollection>(m_hitCollection);
85  }
edm::RefCore m_hitCollection
unsigned int reco::TrackExtraBase::recHitsSize ( ) const
inline
void reco::TrackExtraBase::setHits ( TrackingRecHitRefProd const &  prod,
unsigned  firstH,
unsigned int  nH 
)
inline
void reco::TrackExtraBase::setTrajParams ( TrajParams  tmps,
Chi2sFive  chi2s 
)
inline
TrajParams const& reco::TrackExtraBase::trajParams ( ) const
inline

Member Data Documentation

Chi2sFive reco::TrackExtraBase::m_chi2sX5
private

Definition at line 95 of file TrackExtraBase.h.

Referenced by chi2sX5(), and setTrajParams().

unsigned int reco::TrackExtraBase::m_firstHit
private

Definition at line 92 of file TrackExtraBase.h.

Referenced by firstRecHit(), recHitRef(), and setHits().

edm::RefCore reco::TrackExtraBase::m_hitCollection
private

Definition at line 91 of file TrackExtraBase.h.

Referenced by recHitRef(), recHitsProduct(), and setHits().

unsigned int reco::TrackExtraBase::m_nHits
private

Definition at line 93 of file TrackExtraBase.h.

Referenced by recHitsSize(), and setHits().

TrajParams reco::TrackExtraBase::m_trajParams
private

Definition at line 94 of file TrackExtraBase.h.

Referenced by setTrajParams(), and trajParams().