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:
12 
14 
16  const GeomDet& idet, const FTLClusterRef& objref) :
17  TrackerSingleRecHit(p, e, idet, trackerHitRTTI::mipTiming, objref)
18  {}
19 
20  MTDTrackingRecHit* clone() const override { return new MTDTrackingRecHit(*this); }
21 
22  // things to specialize from BaseTrackerRecHit
23  bool isPhase2() const final { return true; }
24  void getKfComponents(KfComponentsHolder& holder) const final;
25 
26  int dimension() const final { return 2; }
27 
28  //specific timing stuff
29  float energy() const { return omniCluster().mtdCluster().energy(); }
30  float time() const { return omniCluster().mtdCluster().time(); }
31  float timeError() const { return omniCluster().mtdCluster().timeError(); }
32 };
33 
34 
35 // Instantiations and specializations for FTLRecHitRef and reco::CaloClusterPtr
40 
41 #endif
edmNew::DetSetVector< MTDTrackingRecHit > MTDTrackingDetSetVector
int dimension() const final
float time() const
float energy() const
float time() const
Definition: FTLCluster.h:118
FTLCluster const & mtdCluster() const
edm::OwnVector< MTDTrackingRecHit > MTDTrackingOwnVector
float timeError() const
Definition: FTLCluster.h:123
OmniClusterRef const & omniCluster() const
MTDTrackingRecHit(const LocalPoint &p, const LocalError &e, const GeomDet &idet, const FTLClusterRef &objref)
float energy() const
Definition: FTLCluster.h:138
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