CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
reco::TrackExtraBase Class Reference

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

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

Public Member Functions

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...
 
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)
 
 TrackExtraBase ()
 default constructor More...
 

Private Attributes

unsigned int m_firstHit
 
edm::RefCore m_hitCollection
 
unsigned int m_nHits
 

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

Constructor & Destructor Documentation

reco::TrackExtraBase::TrackExtraBase ( )
inline

default constructor

Definition at line 26 of file TrackExtraBase.h.

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

Member Function Documentation

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

Definition at line 33 of file TrackExtraBase.h.

References m_firstHit.

Referenced by recHitsBegin().

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

get i-th recHit

Definition at line 59 of file TrackExtraBase.h.

References recHitRef().

59  {
60  return recHitRef(i);
61  }
int i
Definition: DBlmapReader.cc:9
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 54 of file TrackExtraBase.h.

References m_firstHit, and m_hitCollection.

Referenced by recHit().

54  {
56  }
int i
Definition: DBlmapReader.cc:9
edm::Ref< TrackingRecHitCollection > TrackingRecHitRef
persistent reference to a TrackingRecHit
unsigned int m_firstHit
edm::RefCore m_hitCollection
trackingRecHit_iterator reco::TrackExtraBase::recHitsBegin ( ) const
inline

first iterator over RecHits

Definition at line 44 of file TrackExtraBase.h.

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

Referenced by recHitsEnd().

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

last iterator over RecHits

Definition at line 49 of file TrackExtraBase.h.

References recHitsBegin(), and recHitsSize().

49  {
50  return recHitsBegin()+recHitsSize();
51  }
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 63 of file TrackExtraBase.h.

References m_hitCollection.

Referenced by recHitsBegin().

63  {
64  return *edm::getProduct<TrackingRecHitCollection>(m_hitCollection);
65 
66  }
edm::RefCore m_hitCollection
unsigned int reco::TrackExtraBase::recHitsSize ( ) const
inline

number of RecHits

Definition at line 38 of file TrackExtraBase.h.

References m_nHits.

Referenced by recHitsEnd().

38  {
39  return m_nHits;
40  }
unsigned int m_nHits
void reco::TrackExtraBase::setHits ( TrackingRecHitRefProd const &  prod,
unsigned  firstH,
unsigned int  nH 
)
inline

Definition at line 28 of file TrackExtraBase.h.

References m_firstHit, m_hitCollection, m_nHits, edm::RefCore::pushBackItem(), and edm::RefProd< T >::refCore().

Referenced by MuonErrorMatrixAdjuster::attachRecHits(), helper::GsfElectronCollectionStoreManager::cloneAndStore(), helper::MuonCollectionStoreManager::processMuon(), helper::TrackCollectionStoreManager::processTrack(), MuonTrackProducer::produce(), PixelTracksProducer::produce(), SimpleTrackListMerger::produce(), TrackListMerger::produce(), CosmicTrackSelector::produce(), FakeTrackProducer< T >::produce(), DuplicateListMerger::produce(), TrackMultiSelector::produce(), reco::modules::TrackFullCloneSelectorBase< Selector >::produce(), reco::modules::HICaloCompatibleTrackSelector::produce(), KfTrackProducerBase::putInEvt(), GsfTrackProducerBase::putInEvt(), TrackProducerWithSCAssociation::putInEvt(), AnalyticalTrackSelector::run(), and PixelTrackProducer::store().

28  {
29  m_hitCollection.pushBackItem(prod.refCore(),true);
30  m_firstHit =firstH; m_nHits=nH;
31  }
void pushBackItem(RefCore const &productToBeInserted, bool checkPointer)
Definition: RefCore.cc:176
unsigned int m_nHits
unsigned int m_firstHit
edm::RefCore m_hitCollection

Member Data Documentation

unsigned int reco::TrackExtraBase::m_firstHit
private

Definition at line 71 of file TrackExtraBase.h.

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

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

Definition at line 70 of file TrackExtraBase.h.

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

unsigned int reco::TrackExtraBase::m_nHits
private

Definition at line 72 of file TrackExtraBase.h.

Referenced by recHitsSize(), and setHits().