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
mps_fire.i
i
Definition: mps_fire.py:355
FastSingleTrackerRecHit::simTrackIds_
std::vector< int32_t > simTrackIds_
see addSimTrackIds(int32_t)
Definition: FastSingleTrackerRecHit.h:52
FastSingleTrackerRecHit::simTrackEventId
int32_t simTrackEventId(size_t i) const override
see addSimTrackId(int32_t simTrackId)
Definition: FastSingleTrackerRecHit.h:31
GeomDet
Definition: GeomDet.h:27
FastSingleTrackerRecHit::nIds
size_t nIds() const override
Definition: FastSingleTrackerRecHit.h:24
FastSingleTrackerRecHit::clone
FastSingleTrackerRecHit * clone() const override
Definition: FastSingleTrackerRecHit.h:18
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
fastTrackerRecHitType::HitType
HitType
Definition: FastTrackerRecHit.h:16
FastSingleTrackerRecHit::id
int32_t id(size_t i=0) const override
Definition: FastSingleTrackerRecHit.h:25
FastTrackerRecHit
Definition: FastTrackerRecHit.h:40
FastSingleTrackerRecHit::FastSingleTrackerRecHit
FastSingleTrackerRecHit(const LocalPoint &p, const LocalError &e, GeomDet const &idet, fastTrackerRecHitType::HitType hitType)
Definition: FastSingleTrackerRecHit.h:11
FastSingleTrackerRecHit::simTrackId
int32_t simTrackId(size_t i) const override
see addSimTrackId(int32_t simTrackId)
Definition: FastSingleTrackerRecHit.h:28
FastSingleTrackerRecHit::eventId_
int32_t eventId_
see setEeId(int32_t eeid)
Definition: FastSingleTrackerRecHit.h:51
FastSingleTrackerRecHit::nSimTrackIds
size_t nSimTrackIds() const override
see addSimTrackId(int32_t simTrackId)
Definition: FastSingleTrackerRecHit.h:27
Point3DBase< float, LocalTag >
LocalError
Definition: LocalError.h:12
FastSingleTrackerRecHit
Definition: FastSingleTrackerRecHit.h:7
FastSingleTrackerRecHit::FastSingleTrackerRecHit
FastSingleTrackerRecHit()
Definition: FastSingleTrackerRecHit.h:9
FastSingleTrackerRecHit::setId
void setId(int32_t id)
Definition: FastSingleTrackerRecHit.h:42
FastSingleTrackerRecHit::eventId
int32_t eventId(size_t i=0) const override
Definition: FastSingleTrackerRecHit.h:26
FastTrackerRecHit.h
FastSingleTrackerRecHit::setEventId
void setEventId(int32_t eventId) override
Definition: FastSingleTrackerRecHit.h:47
FastSingleTrackerRecHit::addSimTrackId
void addSimTrackId(int32_t simTrackId)
Definition: FastSingleTrackerRecHit.h:37
FastSingleTrackerRecHit::id_
int32_t id_
see setId(int32_t id)
Definition: FastSingleTrackerRecHit.h:50
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37