CMS 3D CMS Logo

FastMatchedTrackerRecHit.h
Go to the documentation of this file.
1 #ifndef FastMatchedTrackerRecHit_H
2 #define FastMatchedTrackerRecHit_H
3 
6 
8 
9  public:
10 
13  {}
14 
16 
18  const LocalError & err,
19  const GeomDet & idet,
20  const FastSingleTrackerRecHit & rMono,
21  const FastSingleTrackerRecHit & rStereo,
22  bool stereoHitFirst = false)
24  , stereoHitFirst_(stereoHitFirst)
25  , componentMono_(rMono)
26  , componentStereo_(rStereo)
27  {};
28 
29  FastMatchedTrackerRecHit * clone() const override {FastMatchedTrackerRecHit * p = new FastMatchedTrackerRecHit( * this); p->load(); return p;}
30 
31  size_t nIds() const override { return 2;}
32  int32_t id(size_t i = 0) const override { return i==0 ? monoHit().id() : stereoHit().id(); }
33  int32_t eventId(size_t i = 0) const override { return i==0 ? monoHit().eventId() : stereoHit().eventId(); }
34 
35  size_t nSimTrackIds() const override { return componentMono_.nSimTrackIds() + componentStereo_.nSimTrackIds();}
38 
39  const FastSingleTrackerRecHit & monoHit() const { return componentMono_;}
43 
44 
45  void setStereoLayerFirst(bool stereoHitFirst = true){stereoHitFirst_ = stereoHitFirst;}
46  void setEventId(int32_t eventId) override{componentMono_.setEventId(eventId);componentStereo_.setEventId(eventId);}
47 
49  FastTrackerRecHit::setRecHitCombinationIndex(recHitCombinationIndex);
50  componentMono_.setRecHitCombinationIndex(recHitCombinationIndex);
51  componentStereo_.setRecHitCombinationIndex(recHitCombinationIndex);
52  }
53 
54  private:
55 
59 };
60 
61 #endif
int32_t eventId(size_t i=0) const override
void setRecHitCombinationIndex(int32_t recHitCombinationIndex) override
int32_t simTrackId(size_t i) const override
see addSimTrackId(int32_t simTrackId)
const FastSingleTrackerRecHit & firstHit() const
void load()
helps making the hit postion and error persistent
int32_t id(size_t i=0) const override
int32_t eventId(size_t i=0) const override
void setEventId(int32_t eventId) override
size_t nSimTrackIds() const override
see addSimTrackId(int32_t simTrackId)
virtual int32_t recHitCombinationIndex() const
size_t nSimTrackIds() const override
see addSimTrackId(int32_t simTrackId)
FastMatchedTrackerRecHit(const LocalPoint &pos, const LocalError &err, const GeomDet &idet, const FastSingleTrackerRecHit &rMono, const FastSingleTrackerRecHit &rStereo, bool stereoHitFirst=false)
const FastSingleTrackerRecHit & monoHit() const
int32_t id(size_t i=0) const override
void setEventId(int32_t eventId) override
int32_t simTrackEventId(size_t i) const override
FastSingleTrackerRecHit componentMono_
FastMatchedTrackerRecHit * clone() const override
virtual void setRecHitCombinationIndex(int32_t recHitCombinationIndex)
int32_t simTrackId(size_t i) const override
void setStereoLayerFirst(bool stereoHitFirst=true)
int32_t simTrackEventId(size_t i) const override
see addSimTrackId(int32_t simTrackId)
const FastSingleTrackerRecHit & secondHit() const
size_t nIds() const override
FastSingleTrackerRecHit componentStereo_
const FastSingleTrackerRecHit & stereoHit() const