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  virtual FastMatchedTrackerRecHit * clone() const {FastMatchedTrackerRecHit * p = new FastMatchedTrackerRecHit( * this); p->load(); return p;}
30 
31  size_t nIds() const { return 2;}
32  int32_t id(size_t i = 0) const { return i==0 ? monoHit().id() : stereoHit().id(); }
33  int32_t eventId(size_t i = 0) const { return i==0 ? monoHit().eventId() : stereoHit().eventId(); }
34 
38 
39  const FastSingleTrackerRecHit & monoHit() const { return componentMono_;}
43 
44 
45  void setStereoLayerFirst(bool stereoHitFirst = true){stereoHitFirst_ = stereoHitFirst;}
47 
49  FastTrackerRecHit::setRecHitCombinationIndex(recHitCombinationIndex);
50  componentMono_.setRecHitCombinationIndex(recHitCombinationIndex);
51  componentStereo_.setRecHitCombinationIndex(recHitCombinationIndex);
52  }
53 
54  private:
55 
59 };
60 
61 #endif
int32_t simTrackId(size_t i) const override
see addSimTrackId(int32_t simTrackId)
const FastSingleTrackerRecHit & firstHit() const
int32_t eventId(size_t i=0) const
void load()
helps making the hit postion and error persistent
int32_t id(size_t i=0) const override
int32_t simTrackId(size_t i) const
int32_t eventId(size_t i=0) const override
virtual FastMatchedTrackerRecHit * clone() const
void setRecHitCombinationIndex(int32_t recHitCombinationIndex)
size_t nSimTrackIds() const override
see addSimTrackId(int32_t simTrackId)
virtual int32_t recHitCombinationIndex() const
size_t nSimTrackIds() const
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
void setEventId(int32_t eventId) override
FastSingleTrackerRecHit componentMono_
int32_t simTrackEventId(size_t i) const
int32_t id(size_t i=0) const
void setEventId(int32_t eventId)
virtual void setRecHitCombinationIndex(int32_t recHitCombinationIndex)
void setStereoLayerFirst(bool stereoHitFirst=true)
int32_t simTrackEventId(size_t i) const override
see addSimTrackId(int32_t simTrackId)
const FastSingleTrackerRecHit & secondHit() const
FastSingleTrackerRecHit componentStereo_
const FastSingleTrackerRecHit & stereoHit() const