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

Member Typedef Documentation

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

Definition at line 26 of file TrackExtraBase.h.

Definition at line 25 of file TrackExtraBase.h.

Constructor & Destructor Documentation

reco::TrackExtraBase::TrackExtraBase ( )
inline

default constructor

Definition at line 29 of file TrackExtraBase.h.

29 : m_firstHit(-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 82 of file TrackExtraBase.h.

References m_chi2sX5.

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

Definition at line 38 of file TrackExtraBase.h.

References m_firstHit.

Referenced by recHitsBegin().

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

get i-th recHit

Definition at line 72 of file TrackExtraBase.h.

References recHitRef().

72  {
73  return recHitRef(i);
74  }
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 59 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().

59  {
60  //Another thread might change the RefCore at the same time.
61  // By using a copy we will be safe.
63  if(hitCollection.productPtr()) {
65  TrackingRecHitRef::value_type const* item = finder(*(static_cast<TrackingRecHitRef::product_type const*>(hitCollection.productPtr())), m_firstHit+i);
66  return TrackingRecHitRef(hitCollection.id(), item, m_firstHit+i);
67  }
69  }
edm::Ref< TrackingRecHitCollection > TrackingRecHitRef
persistent reference to a TrackingRecHit
typename refhelper::ValueTrait< TrackingRecHitCollection >::value value_type
Definition: Ref.h:164
typename refhelper::FindTrait< TrackingRecHitCollection, typename refhelper::ValueTrait< TrackingRecHitCollection >::value >::value finder_type
Definition: Ref.h:166
unsigned int m_firstHit
edm::RefCore m_hitCollection
trackingRecHit_iterator reco::TrackExtraBase::recHitsBegin ( ) const
inline

first iterator over RecHits

Definition at line 49 of file TrackExtraBase.h.

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

Referenced by ConversionHitChecker::nHitsBeforeVtx(), and recHitsEnd().

49  {
50  return recHitsProduct().data().begin()+firstRecHit();
51  }
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 54 of file TrackExtraBase.h.

References recHitsBegin(), and recHitsSize().

54  {
55  return recHitsBegin()+recHitsSize();
56  }
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 76 of file TrackExtraBase.h.

References m_hitCollection.

Referenced by recHitsBegin().

76  {
77  return *edm::getProduct<TrackingRecHitCollection>(m_hitCollection);
78 
79  }
edm::RefCore m_hitCollection
unsigned int reco::TrackExtraBase::recHitsSize ( ) const
inline
void reco::TrackExtraBase::setHits ( TrackingRecHitRefProd const &  prod,
unsigned  firstH,
unsigned int  nH 
)
inline

Definition at line 31 of file TrackExtraBase.h.

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

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

31  {
32  m_hitCollection.pushBackItem(prod.refCore(),true);
33  m_firstHit =firstH; m_nHits=nH;
34  }
void pushBackItem(RefCore const &productToBeInserted, bool checkPointer)
Definition: RefCore.cc:194
unsigned int m_nHits
unsigned int m_firstHit
edm::RefCore m_hitCollection
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 89 of file TrackExtraBase.h.

Referenced by chi2sX5(), and setTrajParams().

unsigned int reco::TrackExtraBase::m_firstHit
private

Definition at line 86 of file TrackExtraBase.h.

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

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

Definition at line 85 of file TrackExtraBase.h.

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

unsigned int reco::TrackExtraBase::m_nHits
private

Definition at line 87 of file TrackExtraBase.h.

Referenced by recHitsSize(), and setHits().

TrajParams reco::TrackExtraBase::m_trajParams
private

Definition at line 88 of file TrackExtraBase.h.

Referenced by setTrajParams(), and trajParams().