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) {}

Member Function Documentation

◆ chi2sX5()

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

Definition at line 77 of file TrackExtraBase.h.

77 { return m_chi2sX5; }

References m_chi2sX5.

◆ firstRecHit()

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

Definition at line 41 of file TrackExtraBase.h.

41 { return m_firstHit; }

References m_firstHit.

Referenced by recHitsBegin().

◆ recHit()

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

get i-th recHit

Definition at line 70 of file TrackExtraBase.h.

70 { return recHitRef(i); }

References mps_fire::i, and recHitRef().

◆ 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.

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  }

References HLT_FULL_cff::finder, egammaRechitFilter_cfi::hitCollection, mps_fire::i, B2GTnPMonitor_cfi::item, m_firstHit, and m_hitCollection.

Referenced by recHit().

◆ 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().

◆ recHitsBegin()

trackingRecHit_iterator reco::TrackExtraBase::recHitsBegin ( ) const
inline

first iterator over RecHits

Definition at line 50 of file TrackExtraBase.h.

50 { return recHitsProduct().data().begin() + firstRecHit(); }

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

Referenced by recHits(), and recHitsEnd().

◆ recHitsEnd()

trackingRecHit_iterator reco::TrackExtraBase::recHitsEnd ( ) const
inline

last iterator over RecHits

Definition at line 53 of file TrackExtraBase.h.

53 { return recHitsBegin() + recHitsSize(); }

References recHitsBegin(), and recHitsSize().

Referenced by recHits().

◆ recHitsProduct()

TrackingRecHitCollection const& reco::TrackExtraBase::recHitsProduct ( ) const
inline

Definition at line 72 of file TrackExtraBase.h.

72  {
73  return *edm::getProduct<TrackingRecHitCollection>(m_hitCollection);
74  }

References m_hitCollection.

Referenced by recHitsBegin().

◆ 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().

edm::RefCore
Definition: RefCore.h:21
mps_fire.i
i
Definition: mps_fire.py:428
edm::Ref::value_type
T value_type
Definition: Ref.h:160
reco::TrackExtraBase::m_nHits
unsigned int m_nHits
Definition: TrackExtraBase.h:82
HLT_FULL_cff.finder
finder
Definition: HLT_FULL_cff.py:51974
reco::TrackExtraBase::m_trajParams
TrajParams m_trajParams
Definition: TrackExtraBase.h:83
edm::Ref::finder_type
F finder_type
Definition: Ref.h:162
reco::TrackExtraBase::recHitsBegin
trackingRecHit_iterator recHitsBegin() const
first iterator over RecHits
Definition: TrackExtraBase.h:50
reco::TrackExtraBase::m_hitCollection
edm::RefCore m_hitCollection
Definition: TrackExtraBase.h:80
TrackingRecHitRange
edm::Range< trackingRecHit_iterator > TrackingRecHitRange
Range class to enable range-based loops for a tracks RecHits.
Definition: TrackingRecHitFwd.h:22
reco::TrackExtraBase::m_firstHit
unsigned int m_firstHit
Definition: TrackExtraBase.h:81
dumpMFGeometry_cfg.prod
prod
Definition: dumpMFGeometry_cfg.py:24
egammaRechitFilter_cfi.hitCollection
hitCollection
Definition: egammaRechitFilter_cfi.py:10
TrackingRecHitRef
edm::Ref< TrackingRecHitCollection > TrackingRecHitRef
persistent reference to a TrackingRecHit
Definition: TrackingRecHitFwd.h:14
edm::RefCore::pushBackItem
void pushBackItem(RefCore const &productToBeInserted, bool checkPointer)
Definition: RefCore.cc:165
reco::TrackExtraBase::m_chi2sX5
Chi2sFive m_chi2sX5
Definition: TrackExtraBase.h:84
B2GTnPMonitor_cfi.item
item
Definition: B2GTnPMonitor_cfi.py:147
reco::TrackExtraBase::recHitsSize
unsigned int recHitsSize() const
number of RecHits
Definition: TrackExtraBase.h:44
reco::TrackExtraBase::recHitsProduct
TrackingRecHitCollection const & recHitsProduct() const
Definition: TrackExtraBase.h:72
eostools.move
def move(src, dest)
Definition: eostools.py:511
edm::OwnVector::data
base const & data() const
Definition: OwnVector.h:476
reco::TrackExtraBase::recHitRef
TrackingRecHitRef recHitRef(unsigned int i) const
get a ref to i-th recHit
Definition: TrackExtraBase.h:56
reco::TrackExtraBase::firstRecHit
unsigned int firstRecHit() const
Definition: TrackExtraBase.h:41
reco::TrackExtraBase::recHitsEnd
trackingRecHit_iterator recHitsEnd() const
last iterator over RecHits
Definition: TrackExtraBase.h:53