CMS 3D CMS Logo

FastSingleTrackerRecHit.h
Go to the documentation of this file.
1 #ifndef FastSingleTrackerRecHit_H
2 #define FastSingleTrackerRecHit_H
3 
5 #include <cstdint>
6 
8 public:
10 
12  const LocalError& e,
13  GeomDet const& idet,
15  : FastTrackerRecHit(p, e, idet, hitType), id_(-1), eventId_(0) {}
16 
17 public:
18  FastSingleTrackerRecHit* clone() const override {
20  p->load();
21  return p;
22  }
23 
24  size_t nIds() const override { return 1; }
25  int32_t id(size_t i = 0) const override { return i == 0 ? id_ : -1; }
26  int32_t eventId(size_t i = 0) const override { return i == 0 ? eventId_ : -1; }
27  size_t nSimTrackIds() const override { return simTrackIds_.size(); }
28  int32_t simTrackId(size_t i) const override {
29  return i < simTrackIds_.size() ? simTrackIds_[i] : -1;
30  }
31  int32_t simTrackEventId(size_t i) const override {
32  return i < simTrackIds_.size() ? eventId_ : -1;
33  }
34 
37  void addSimTrackId(int32_t simTrackId) { simTrackIds_.push_back(simTrackId); }
38 
41  // the hit id number must be unique within the list of hits in the event
42  void setId(int32_t id) { id_ = id; }
43 
47  void setEventId(int32_t eventId) override { eventId_ = eventId; }
48 
49 private:
50  int32_t id_;
51  int32_t eventId_;
52  std::vector<int32_t> simTrackIds_;
53 };
54 
55 #endif
FastSingleTrackerRecHit(const LocalPoint &p, const LocalError &e, GeomDet const &idet, fastTrackerRecHitType::HitType hitType)
FastSingleTrackerRecHit * clone() const override
size_t nSimTrackIds() const override
see addSimTrackId(int32_t simTrackId)
std::vector< int32_t > simTrackIds_
see addSimTrackIds(int32_t)
int32_t id(size_t i=0) const override
size_t nIds() const override
int32_t eventId_
see setEeId(int32_t eeid)
void setEventId(int32_t eventId) override
int32_t simTrackEventId(size_t i) const override
see addSimTrackId(int32_t simTrackId)
int32_t simTrackId(size_t i) const override
see addSimTrackId(int32_t simTrackId)
int32_t id_
see setId(int32_t id)
int32_t eventId(size_t i=0) const override
void addSimTrackId(int32_t simTrackId)