CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 22 of file TrackExtraBase.h.

Member Typedef Documentation

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

Definition at line 25 of file TrackExtraBase.h.

Definition at line 24 of file TrackExtraBase.h.

Constructor & Destructor Documentation

reco::TrackExtraBase::TrackExtraBase ( )
inline

default constructor

Definition at line 28 of file TrackExtraBase.h.

28 : 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 77 of file TrackExtraBase.h.

References m_chi2sX5.

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

Definition at line 41 of file TrackExtraBase.h.

References m_firstHit.

Referenced by recHitsBegin().

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

get i-th recHit

Definition at line 70 of file TrackExtraBase.h.

References recHitRef().

Referenced by ConversionHitChecker::nHitsBeforeVtx().

70 { return recHitRef(i); }
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 56 of file TrackExtraBase.h.

References reco_application_2006_simpleTBanalysis_cfg::hitCollection, mps_fire::i, edm::RefCore::id(), B2GTnPMonitor_cfi::item, m_firstHit, m_hitCollection, and edm::RefCore::productPtr().

Referenced by recHit().

56  {
57  //Another thread might change the RefCore at the same time.
58  // By using a copy we will be safe.
60  if (hitCollection.productPtr()) {
63  finder(*(static_cast<TrackingRecHitRef::product_type const*>(hitCollection.productPtr())), m_firstHit + i);
65  }
67  }
edm::Ref< TrackingRecHitCollection > TrackingRecHitRef
persistent reference to a TrackingRecHit
T value_type
Definition: Ref.h:160
F finder_type
Definition: Ref.h:162
unsigned int m_firstHit
edm::RefCore m_hitCollection
auto reco::TrackExtraBase::recHits ( void  ) const
inline

accessor to RecHits

Definition at line 47 of file TrackExtraBase.h.

References recHitsBegin(), and recHitsEnd().

Referenced by ConversionHitChecker::nHitsBeforeVtx(), and MuonReducedTrackExtraProducer::produce().

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 50 of file TrackExtraBase.h.

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

Referenced by recHits(), and recHitsEnd().

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

last iterator over RecHits

Definition at line 53 of file TrackExtraBase.h.

References recHitsBegin(), and recHitsSize().

Referenced by recHits().

53 { return recHitsBegin() + recHitsSize(); }
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 72 of file TrackExtraBase.h.

References m_hitCollection.

Referenced by recHitsBegin().

72  {
73  return *edm::getProduct<TrackingRecHitCollection>(m_hitCollection);
74  }
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 84 of file TrackExtraBase.h.

Referenced by chi2sX5(), and setTrajParams().

unsigned int reco::TrackExtraBase::m_firstHit
private

Definition at line 81 of file TrackExtraBase.h.

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

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

Definition at line 80 of file TrackExtraBase.h.

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

unsigned int reco::TrackExtraBase::m_nHits
private

Definition at line 82 of file TrackExtraBase.h.

Referenced by recHitsSize(), and setHits().

TrajParams reco::TrackExtraBase::m_trajParams
private

Definition at line 83 of file TrackExtraBase.h.

Referenced by setTrajParams(), and trajParams().