CMS 3D CMS Logo

MTDTrackingRecHit.h
Go to the documentation of this file.
1 #ifndef DataFormats_TrackerRecHit2D_MTDTrackingRecHit_h
2 #define DataFormats_TrackerRecHit2D_MTDTrackingRecHit_h
3 
5 
6 #include <cassert>
9 
11 public:
13 
14  MTDTrackingRecHit(const LocalPoint& p, const LocalError& e, const GeomDet& idet, const FTLClusterRef& objref)
15  : TrackerSingleRecHit(p, e, idet, trackerHitRTTI::mipTiming, objref) {}
16 
17  MTDTrackingRecHit* clone() const override { return new MTDTrackingRecHit(*this); }
18 
19  // things to specialize from BaseTrackerRecHit
20  bool isPhase2() const final { return true; }
21  void getKfComponents(KfComponentsHolder& holder) const final;
22 
23  int dimension() const final { return 2; }
24 
25  //specific timing stuff
26  float energy() const { return omniCluster().mtdCluster().energy(); }
27  float time() const { return omniCluster().mtdCluster().time(); }
28  float timeError() const { return omniCluster().mtdCluster().timeError(); }
29 };
30 
31 // Instantiations and specializations for FTLRecHitRef and reco::CaloClusterPtr
36 
37 #endif
edmNew::DetSetVector< MTDTrackingRecHit > MTDTrackingDetSetVector
int dimension() const final
float time() const
float energy() const
float time() const
Definition: FTLCluster.h:131
FTLCluster const & mtdCluster() const
edm::OwnVector< MTDTrackingRecHit > MTDTrackingOwnVector
float timeError() const
Definition: FTLCluster.h:136
OmniClusterRef const & omniCluster() const
MTDTrackingRecHit(const LocalPoint &p, const LocalError &e, const GeomDet &idet, const FTLClusterRef &objref)
float energy() const
Definition: FTLCluster.h:150
bool isPhase2() const final
A 2D TrackerRecHit with time and time error information.
MTDTrackingRecHit * clone() const override
void getKfComponents(KfComponentsHolder &holder) const final
float timeError() const