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), objref_(objref), pos_(pos), err_(err) {}
18 
19  FTLTrackingRecHit<ObjRef> *clone() const override { return new FTLTrackingRecHit<ObjRef>(*this); }
20 
21  LocalPoint localPosition() const override { return pos_; }
22  LocalError localPositionError() const override { return err_; }
23 
24  const ObjRef &objRef() const { return objref_; }
25 
26  float energy() const { return objref_->energy(); }
27 
28  float time() const { return objref_->time(); }
29  float timeError() const { return objref_->timeError(); }
30 
31  bool sharesInput(const TrackingRecHit *other, SharedInputType what) const override { assert(false); }
32 
33 protected:
34  ObjRef objref_;
37 };
38 
39 // Instantiations and specializations for FTLRecHitRef and reco::CaloClusterPtr
43 typedef std::vector<FTLTrackingRecHitFromHit> FTLTrackingRecHitCollection;
44 
45 template <>
46 bool FTLTrackingRecHit<FTLRecHitRef>::sharesInput(const TrackingRecHit *other, SharedInputType what) const;
47 
48 #endif
SharedInputType
definition of equality via shared input
bool sharesInput(const TrackingRecHit *other, SharedInputType what) const override
float timeError() const
Basic template class for a RecHit wrapping a Ref to an object.
float energy() const
FTLTrackingRecHit< ObjRef > * clone() const override
LocalError localPositionError() const override
const ObjRef & objRef() const
assert(be >=bs)
FTLTrackingRecHit(DetId id, const ObjRef &objref, const LocalPoint &pos, const LocalError &err)
ObjRef::value_type obj_type
std::vector< FTLTrackingRecHitFromHit > FTLTrackingRecHitCollection
FTLTrackingRecHit< FTLRecHitRef > FTLTrackingRecHitFromHit
Definition: DetId.h:17
LocalPoint localPosition() const override
float time() const
GloballyPositioned< float >::LocalPoint LocalPoint