CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
InvalidTransientRecHit.h
Go to the documentation of this file.
1 #ifndef InvalidTransientRecHit_H
2 #define InvalidTransientRecHit_H
3 
4 
8 
9 class InvalidTransientRecHit GCC11_FINAL : public TransientTrackingRecHit {
10  public:
13 
14  static RecHitPointer build( const GeomDet * geom, Type type=TrackingRecHit::missing, const DetLayer * layer=nullptr) {
15  return RecHitPointer( new InvalidTransientRecHit( geom, layer, type ));
16  }
17 
18 
19  ~InvalidTransientRecHit();
20 
21  const GeomDet * det() const {return geom_;}
22  const Surface* surface() const { return surface_; }
23 
24  virtual GlobalPoint globalPosition() const;
25  virtual GlobalError globalPositionError() const;
26 
27  virtual float errorGlobalR() const;
28  virtual float errorGlobalZ() const;
29  virtual float errorGlobalRPhi() const;
30 
31  virtual const TrackingRecHit * hit() const { return &me; } // this;}
32  virtual InvalidTrackingRecHit * cloneHit() const { return new InvalidTrackingRecHit(rawId(),type());}
33 
34  // duplicate of persistent class
35  virtual AlgebraicVector parameters() const;
36  virtual AlgebraicSymMatrix parametersError() const;
37  virtual AlgebraicMatrix projectionMatrix() const;
38  virtual int dimension() const;
39 
40  virtual LocalPoint localPosition() const;
41  virtual LocalError localPositionError() const;
42 
43  virtual std::vector<const TrackingRecHit*> recHits() const;
44  virtual std::vector<TrackingRecHit*> recHits();
45 
46  virtual bool sharesInput( const TrackingRecHit*, SharedInputType) const { return false;}
47 
48  private:
49 
50  void throwError() const;
51 
52  private:
53  const GeomDet * geom_;
54  Surface const * surface_;
55 
56  // until all clients are migrated...
57  InvalidTrackingRecHit me;
58 
60  InvalidTransientRecHit( const GeomDet* geom, const DetLayer * layer, Type type) :
61  Base(geom == nullptr ? DetId(0) : geom->geographicalId(), type),
62  geom_(geom),
63  surface_(geom ? &(det()->surface()) : ( layer ? &(layer->surface()) : nullptr)),
64  me( geom == nullptr ? DetId(0) : geom->geographicalId(), type)
65  {}
66 
67  // hide the clone method for ReferenceCounted. Warning: this method is still
68  // accessible via the bas class TrackingRecHit interface!
69  virtual InvalidTransientRecHit* clone() const {return new InvalidTransientRecHit(*this);}
70 
71 };
72 
73 #endif
ReferenceCountingPointer< TransientTrackingRecHit > RecHitPointer
virtual InvalidTransientRecHit * clone() const
type
Definition: HCALResponse.h:21
virtual int dimension() const =0
static RecHitPointer build(const GeomDet *geom, Type type=TrackingRecHit::missing, const DetLayer *layer=nullptr)
Surface const * surface_
virtual float errorGlobalR() const =0
virtual bool sharesInput(const TrackingRecHit *, SharedInputType) const
InvalidTransientRecHit(const GeomDet *geom, const DetLayer *layer, Type type)
invalid RecHit - has only GeomDet and Type
#define nullptr
Type type() const
virtual float errorGlobalRPhi() const =0
virtual float errorGlobalZ() const =0
const Surface * surface() const
The surface of the GeometricSearchDet.
virtual AlgebraicVector parameters() const =0
virtual GlobalPoint globalPosition() const =0
CLHEP::HepMatrix AlgebraicMatrix
virtual const TrackingRecHit * hit() const
TrackingRecHit::Type Type
virtual InvalidTrackingRecHit * cloneHit() const
virtual GlobalError globalPositionError() const =0
virtual std::vector< const TrackingRecHit * > recHits() const =0
Access to component RecHits (if any)
Definition: DetId.h:20
CLHEP::HepVector AlgebraicVector
InvalidTrackingRecHit me
const GeomDet * det() const
The GomeDet* can be zero for InvalidTransientRecHits and for TConstraintRecHit2Ds.
virtual LocalError localPositionError() const =0
virtual AlgebraicMatrix projectionMatrix() const =0
const GeomDet * geom_
CLHEP::HepSymMatrix AlgebraicSymMatrix
virtual LocalPoint localPosition() const =0
TransientTrackingRecHit Base
id_type rawId() const
virtual AlgebraicSymMatrix parametersError() const =0
Unlimited (trivial) bounds.