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

Member Typedef Documentation

◆ Chi2sFive

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

Definition at line 25 of file TrackExtraBase.h.

◆ TrajParams

Definition at line 24 of file TrackExtraBase.h.

Constructor & Destructor Documentation

◆ TrackExtraBase()

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

◆ chi2sX5()

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

Definition at line 77 of file TrackExtraBase.h.

References m_chi2sX5.

77 { return m_chi2sX5; }

◆ firstRecHit()

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

◆ recHit()

TrackingRecHitRef reco::TrackExtraBase::recHit ( unsigned int  i) const
inline

get i-th recHit

Definition at line 70 of file TrackExtraBase.h.

References mps_fire::i, and recHitRef().

70 { return recHitRef(i); }
TrackingRecHitRef recHitRef(unsigned int i) const
get a ref to i-th recHit

◆ recHitRef()

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 HLT_2024v11_cff::finder, hgceeDigitizer_cfi::hitCollection, mps_fire::i, B2GTnPMonitor_cfi::item, m_firstHit, and m_hitCollection.

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

◆ recHits()

auto reco::TrackExtraBase::recHits ( void  ) const
inline

accessor to RecHits

Definition at line 47 of file TrackExtraBase.h.

References recHitsBegin(), and recHitsEnd().

Referenced by MuonReducedTrackExtraProducer::produce().

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

◆ recHitsBegin()

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(); }
base const & data() const
Definition: OwnVector.h:476
unsigned int firstRecHit() const
TrackingRecHitCollection const & recHitsProduct() const

◆ recHitsEnd()

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

◆ recHitsProduct()

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

◆ recHitsSize()

unsigned int reco::TrackExtraBase::recHitsSize ( ) const
inline

◆ setHits()

void reco::TrackExtraBase::setHits ( TrackingRecHitRefProd const &  prod,
unsigned  firstH,
unsigned int  nH 
)
inline

◆ setTrajParams()

void reco::TrackExtraBase::setTrajParams ( TrajParams  tmps,
Chi2sFive  chi2s 
)
inline

◆ trajParams()

TrajParams const& reco::TrackExtraBase::trajParams ( ) const
inline

Member Data Documentation

◆ m_chi2sX5

Chi2sFive reco::TrackExtraBase::m_chi2sX5
private

Definition at line 84 of file TrackExtraBase.h.

Referenced by chi2sX5(), and setTrajParams().

◆ m_firstHit

unsigned int reco::TrackExtraBase::m_firstHit
private

Definition at line 81 of file TrackExtraBase.h.

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

◆ m_hitCollection

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

Definition at line 80 of file TrackExtraBase.h.

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

◆ m_nHits

unsigned int reco::TrackExtraBase::m_nHits
private

Definition at line 82 of file TrackExtraBase.h.

Referenced by recHitsSize(), and setHits().

◆ m_trajParams

TrajParams reco::TrackExtraBase::m_trajParams
private

Definition at line 83 of file TrackExtraBase.h.

Referenced by setTrajParams(), and trajParams().