CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Protected Attributes
TrackingRecHitProduct Class Reference

#include <TrackingRecHitProduct.h>

Public Types

typedef std::pair< FastSingleTrackerRecHit, std::vector< SimHitIdPair > > RecHitToSimHitIdPairs
 
typedef std::pair< unsigned int, const PSimHit * > SimHitIdPair
 

Public Member Functions

virtual void addRecHit (const FastSingleTrackerRecHit &recHit, std::vector< SimHitIdPair > simHitIdPairs={})
 
const DetIdgetDetId () const
 
virtual const std::vector< RecHitToSimHitIdPairs > & getRecHitToSimHitIdPairs () const
 
virtual std::vector< SimHitIdPair > & getSimHitIdPairs ()
 
virtual unsigned int numberOfRecHits () const
 
 TrackingRecHitProduct (const DetId &detId, std::vector< SimHitIdPair > &simHitsIdPairList)
 
virtual ~TrackingRecHitProduct ()
 

Protected Attributes

const DetId_detId
 
std::vector< RecHitToSimHitIdPairs_recHits
 
std::vector< SimHitIdPair_simHitsIdPairList
 

Detailed Description

Definition at line 13 of file TrackingRecHitProduct.h.

Member Typedef Documentation

◆ RecHitToSimHitIdPairs

Definition at line 16 of file TrackingRecHitProduct.h.

◆ SimHitIdPair

typedef std::pair<unsigned int, const PSimHit*> TrackingRecHitProduct::SimHitIdPair

Definition at line 15 of file TrackingRecHitProduct.h.

Constructor & Destructor Documentation

◆ TrackingRecHitProduct()

TrackingRecHitProduct::TrackingRecHitProduct ( const DetId detId,
std::vector< SimHitIdPair > &  simHitsIdPairList 
)
inline

Definition at line 26 of file TrackingRecHitProduct.h.

27  : _detId(detId), _simHitsIdPairList(simHitsIdPairList) {}
std::vector< SimHitIdPair > _simHitsIdPairList

◆ ~TrackingRecHitProduct()

virtual TrackingRecHitProduct::~TrackingRecHitProduct ( )
inlinevirtual

Definition at line 44 of file TrackingRecHitProduct.h.

44 {}

Member Function Documentation

◆ addRecHit()

virtual void TrackingRecHitProduct::addRecHit ( const FastSingleTrackerRecHit recHit,
std::vector< SimHitIdPair simHitIdPairs = {} 
)
inlinevirtual

Definition at line 33 of file TrackingRecHitProduct.h.

33  {}) {
34  _recHits.push_back(std::make_pair(recHit, simHitIdPairs));
35  for (unsigned int isimhit = 0; isimhit < simHitIdPairs.size(); ++isimhit) {
36  _recHits.back().first.addSimTrackId(simHitIdPairs[isimhit].second->trackId());
37  }
38  }
U second(std::pair< T, U > const &p)
std::vector< RecHitToSimHitIdPairs > _recHits

◆ getDetId()

const DetId& TrackingRecHitProduct::getDetId ( void  ) const
inline

Definition at line 29 of file TrackingRecHitProduct.h.

References _detId.

29 { return _detId; }

◆ getRecHitToSimHitIdPairs()

virtual const std::vector<RecHitToSimHitIdPairs>& TrackingRecHitProduct::getRecHitToSimHitIdPairs ( ) const
inlinevirtual

Definition at line 40 of file TrackingRecHitProduct.h.

References _recHits.

40 { return _recHits; }
std::vector< RecHitToSimHitIdPairs > _recHits

◆ getSimHitIdPairs()

virtual std::vector<SimHitIdPair>& TrackingRecHitProduct::getSimHitIdPairs ( )
inlinevirtual

Definition at line 31 of file TrackingRecHitProduct.h.

References _simHitsIdPairList.

31 { return _simHitsIdPairList; }
std::vector< SimHitIdPair > _simHitsIdPairList

◆ numberOfRecHits()

virtual unsigned int TrackingRecHitProduct::numberOfRecHits ( void  ) const
inlinevirtual

Definition at line 42 of file TrackingRecHitProduct.h.

References _recHits.

42 { return _recHits.size(); }
std::vector< RecHitToSimHitIdPairs > _recHits

Member Data Documentation

◆ _detId

const DetId& TrackingRecHitProduct::_detId
protected

Definition at line 19 of file TrackingRecHitProduct.h.

Referenced by getDetId().

◆ _recHits

std::vector<RecHitToSimHitIdPairs> TrackingRecHitProduct::_recHits
protected

Definition at line 23 of file TrackingRecHitProduct.h.

Referenced by getRecHitToSimHitIdPairs(), and numberOfRecHits().

◆ _simHitsIdPairList

std::vector<SimHitIdPair> TrackingRecHitProduct::_simHitsIdPairList
protected

Definition at line 21 of file TrackingRecHitProduct.h.

Referenced by getSimHitIdPairs().