CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TRecHit5DParamConstraint.h
Go to the documentation of this file.
1 #ifndef RECOTRACKER_TRANSIENTRACKINGRECHIT_TRecHit5DParamConstraint_H
2 #define RECOTRACKER_TRANSIENTRACKINGRECHIT_TRecHit5DParamConstraint_H
3 
7 
8 class GeomDetUnit;
9 
10 class TRecHit5DParamConstraint GCC11_FINAL : public TransientTrackingRecHit {
11 
12 private:
13 
14  TRecHit5DParamConstraint( const TrajectoryStateOnSurface& tsos ) : tsos_( tsos ) {}
15 
16  TRecHit5DParamConstraint( const TRecHit5DParamConstraint& other ) : tsos_( other.trajectoryState() ) {}
17 
18 public:
19 
21 
22  virtual int dimension() const { return 5; }
23 
26  return projectionMatrix;
27  }
28 
29  virtual AlgebraicVector parameters() const { return asHepVector( tsos_.localParameters().vector() ); }
30 
31  virtual AlgebraicSymMatrix parametersError() const { return asHepMatrix( tsos_.localError().matrix() ); }
32 
33  virtual LocalPoint localPosition() const { return tsos_.localPosition(); }
34 
35  virtual LocalError localPositionError() const { return tsos_.localError().positionError(); }
36 
37  virtual int charge() const { return tsos_.charge(); }
38 
39  virtual bool canImproveWithTrack() const { return false; }
40 
41  virtual const TrackingRecHit* hit() const { return 0; }
42  virtual TrackingRecHit * cloneHit() const { return 0;}
43 
44  virtual std::vector<const TrackingRecHit*> recHits() const { return std::vector<const TrackingRecHit*>(); }
45  virtual std::vector<TrackingRecHit*> recHits() { return std::vector<TrackingRecHit*>(); }
46  virtual bool sharesInput( const TrackingRecHit*, SharedInputType) const { return false;}
47 
48 
49  virtual const GeomDetUnit* detUnit() const { return 0; }
50 
51  virtual const GeomDet* det() const { return 0; }
52 
53  virtual const Surface* surface() const { return &tsos_.surface(); }
54 
55  virtual GlobalPoint globalPosition() const { return surface()->toGlobal(localPosition());}
57  virtual float errorGlobalR() const { return std::sqrt(globalPositionError().rerr(globalPosition()));}
58  virtual float errorGlobalZ() const { return std::sqrt(globalPositionError().czz()); }
59  virtual float errorGlobalRPhi() const { return globalPosition().perp()*sqrt(globalPositionError().phierr(globalPosition())); }
60 
61 
63  //return new TRecHit5DParamConstraint( this->trajectoryState() );
64  return new TRecHit5DParamConstraint( tsos );
65  }
66 
68  return RecHitPointer( new TRecHit5DParamConstraint( tsos ) );
69  }
70 
71 private:
72 
74 
75  virtual TRecHit5DParamConstraint* clone() const {
76  return new TRecHit5DParamConstraint( this->trajectoryState() );
77  }
78 
79  const TrajectoryStateOnSurface& trajectoryState() const { return tsos_; }
80 
81 };
82 
83 #endif
ReferenceCountingPointer< TransientTrackingRecHit > RecHitPointer
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
Definition: Surface.h:114
virtual LocalError localPositionError() const
static GlobalError transform(const LocalError &le, const Surface &surf)
virtual GlobalError globalPositionError() const
CLHEP::HepMatrix asHepMatrix(const ROOT::Math::SMatrix< double, N1, N2, typename ROOT::Math::MatRepStd< double, N1, N2 > > &rm)
Definition: Migration.h:49
virtual const Surface * surface() const
The surface of the GeometricSearchDet.
TRecHit5DParamConstraint(const TRecHit5DParamConstraint &other)
T perp() const
Definition: PV3DBase.h:72
virtual bool sharesInput(const TrackingRecHit *, SharedInputType) const
virtual AlgebraicSymMatrix parametersError() const
virtual TrackingRecHit * cloneHit() const
GloballyPositioned< float >::GlobalPoint GlobalPoint
Definition: MagVolume.h:20
virtual TRecHit5DParamConstraint * clone() const
virtual const GeomDet * det() const
The GomeDet* can be zero for InvalidTransientRecHits and for TConstraintRecHit2Ds.
const TrajectoryStateOnSurface & trajectoryState() const
virtual bool canImproveWithTrack() const
virtual std::vector< TrackingRecHit * > recHits()
Non-const access to component RecHits (if any)
virtual ~TRecHit5DParamConstraint()
virtual AlgebraicMatrix projectionMatrix() const
virtual GlobalPoint globalPosition() const =0
CLHEP::HepMatrix AlgebraicMatrix
virtual const TrackingRecHit * hit() const
T sqrt(T t)
Definition: SSEVec.h:48
static TransientTrackingRecHit::RecHitPointer build(const TrajectoryStateOnSurface &tsos)
virtual GlobalError globalPositionError() const =0
const TrajectoryStateOnSurface tsos_
virtual const GeomDetUnit * detUnit() const
virtual AlgebraicVector parameters() const
virtual float errorGlobalZ() const
virtual int charge() const
virtual LocalPoint localPosition() const
CLHEP::HepVector AlgebraicVector
virtual LocalError localPositionError() const =0
virtual AlgebraicMatrix projectionMatrix() const =0
CLHEP::HepSymMatrix AlgebraicSymMatrix
virtual const Surface * surface() const
virtual float errorGlobalR() const
virtual GlobalPoint globalPosition() const
virtual TransientTrackingRecHit::RecHitPointer clone(const TrajectoryStateOnSurface &tsos) const
virtual LocalPoint localPosition() const =0
virtual float errorGlobalRPhi() const
TRecHit5DParamConstraint(const TrajectoryStateOnSurface &tsos)
CLHEP::HepVector asHepVector(const ROOT::Math::SVector< double, N > &v)
Definition: Migration.h:43
virtual int dimension() const
virtual std::vector< const TrackingRecHit * > recHits() const
Access to component RecHits (if any)
Unlimited (trivial) bounds.