CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
FastSingleTrackerRecHit.h
Go to the documentation of this file.
1 #ifndef FastSingleTrackerRecHit_H
2 #define FastSingleTrackerRecHit_H
3 
5 #include "stdint.h"
6 
8 
9  public:
10 
13  , id_(-1)
14  , eventId_(0) {}
15 
16 
18  : FastTrackerRecHit(p,e,idet,hitType)
19  , id_(-1)
20  , eventId_(0) {}
21 
22  public:
23 
25 
26  size_t nIds() const { return 1;}
27  int32_t id(size_t i =0) const { return i == 0 ? id_ : -1;}
28  int32_t eventId(size_t i = 0) const { return i == 0 ? eventId_ : -1;}
29  size_t nSimTrackIds() const { return simTrackIds_.size();}
30  int32_t simTrackId(size_t i) const { return i < simTrackIds_.size() ? simTrackIds_[i] : -1;}
31  int32_t simTrackEventId(size_t i) const { return i < simTrackIds_.size() ? eventId_ : -1;}
32 
33 
36  void addSimTrackId(int32_t simTrackId) {simTrackIds_.push_back(simTrackId);}
37 
40  // the hit id number must be unique within the list of hits in the event
41  void setId(int32_t id) {id_ = id;}
42 
46  void setEventId(int32_t eventId) {eventId_ = eventId;}
47 
48  private:
49 
50  int32_t id_;
51  int32_t eventId_;
52  std::vector<int32_t> simTrackIds_;
53 
54 };
55 
56 #endif
FastSingleTrackerRecHit(const LocalPoint &p, const LocalError &e, GeomDet const &idet, fastTrackerRecHitType::HitType hitType)
int i
Definition: DBlmapReader.cc:9
#define GCC11_OVERRIDE
void setEventId(int32_t eventId)
void load()
helps making the hit postion and error persistent
int32_t simTrackId(size_t i) const
see addSimTrackId(int32_t simTrackId)
int32_t eventId(size_t i=0) const
std::vector< int32_t > simTrackIds_
see addSimTrackIds(int32_t)
int32_t eventId_
see setEeId(int32_t eeid)
size_t nSimTrackIds() const
see addSimTrackId(int32_t simTrackId)
int32_t simTrackEventId(size_t i) const
see addSimTrackId(int32_t simTrackId)
string const
Definition: compareJSON.py:14
int32_t id(size_t i=0) const
int32_t id_
see setId(int32_t id)
virtual FastSingleTrackerRecHit * clone() const
void addSimTrackId(int32_t simTrackId)