CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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
Basic template class for a RecHit wrapping a Ref to an object.
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)
float time() const
ObjRef::value_type obj_type
std::vector< FTLTrackingRecHitFromHit > FTLTrackingRecHitCollection
float timeError() const
FTLTrackingRecHit< FTLRecHitRef > FTLTrackingRecHitFromHit
Definition: DetId.h:17
LocalPoint localPosition() const override
float energy() const
GloballyPositioned< float >::LocalPoint LocalPoint