CMS 3D CMS Logo

FTLTrackingRecHit.h
Go to the documentation of this file.
1 #ifndef DataFormats_FTLRecHit_FTLTrackingRecHit_h
2 #define DataFormats_FTLRecHit_FTLTrackingRecHit_h
3 
5 
6 #include <cassert>
8 
9 template<typename ObjRef>
11  public:
12  typedef ObjRef ref_type;
13  typedef typename ObjRef::value_type obj_type;
14 
16  FTLTrackingRecHit(DetId id, const ObjRef &objref, const LocalPoint &pos, const LocalError &err):
17  RecHit2DLocalPos(id),
18  objref_(objref),
19  pos_(pos), err_(err) {}
20 
21  FTLTrackingRecHit<ObjRef> * clone() const override { return new FTLTrackingRecHit<ObjRef>(*this); }
22 
23  LocalPoint localPosition() const override { return pos_; }
24  LocalError localPositionError() const override { return err_; }
25 
26  const ObjRef & objRef() const { return objref_; }
27 
28  float energy() const { return objref_->energy(); }
29 
30  float time() const { return objref_->time(); }
31  float timeError() const { return objref_->timeError(); }
32 
33  bool sharesInput( const TrackingRecHit* other, SharedInputType what) const override { assert(false); }
34  protected:
35  ObjRef objref_;
38 };
39 
40 
41 // Instantiations and specializations for FTLRecHitRef and reco::CaloClusterPtr
45 typedef std::vector<FTLTrackingRecHitFromHit> FTLTrackingRecHitCollection;
46 
47 template<>
49 
50 #endif
SharedInputType
definition of equality via shared input
Basic template class for a RecHit wrapping a Ref to an object.
const ObjRef & objRef() const
FTLTrackingRecHit(DetId id, const ObjRef &objref, const LocalPoint &pos, const LocalError &err)
float time() const
ObjRef::value_type obj_type
std::vector< FTLTrackingRecHitFromHit > FTLTrackingRecHitCollection
bool sharesInput(const TrackingRecHit *other, SharedInputType what) const override
float timeError() const
FTLTrackingRecHit< FTLRecHitRef > FTLTrackingRecHitFromHit
Definition: DetId.h:18
LocalError localPositionError() const override
FTLTrackingRecHit< ObjRef > * clone() const override
float energy() const
GloballyPositioned< float >::LocalPoint LocalPoint
LocalPoint localPosition() const override