CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
TRecHit2DPosConstraint Class Referencefinal

#include <TRecHit2DPosConstraint.h>

Inheritance diagram for TRecHit2DPosConstraint:
TrackingRecHit

Public Member Functions

bool canImproveWithTrack () const override
 
virtual RecHitPointer clone (const TrajectoryStateOnSurface &ts) const
 
int dimension () const override
 
float errorGlobalR () const override
 
float errorGlobalRPhi () const override
 
float errorGlobalZ () const override
 
GlobalPoint globalPosition () const override
 
GlobalError globalPositionError () const override
 
LocalPoint localPosition () const override
 
LocalError localPositionError () const override
 
AlgebraicVector parameters () const override
 
AlgebraicSymMatrix parametersError () const override
 
AlgebraicMatrix projectionMatrix () const override
 
std::vector< const TrackingRecHit * > recHits () const override
 Access to component RecHits (if any) More...
 
std::vector< TrackingRecHit * > recHits () override
 Non-const access to component RecHits (if any) More...
 
bool sharesInput (const TrackingRecHit *, SharedInputType) const override
 
const Surfacesurface () const override
 
 TRecHit2DPosConstraint (const LocalPoint &pos, const LocalError &err, const Surface *surface)
 
 TRecHit2DPosConstraint (const GeomDet &idet, const LocalPoint &pos, const LocalError &err, const Surface *surface)
 
 TRecHit2DPosConstraint (const TRecHit2DPosConstraint &other)=default
 
 TRecHit2DPosConstraint (TRecHit2DPosConstraint &&other)=default
 
 ~TRecHit2DPosConstraint () override
 
- Public Member Functions inherited from TrackingRecHit
RecHitPointer cloneForFit (const GeomDet &idet) const
 
virtual TrackingRecHitcloneHit () const
 
virtual RecHitPointer cloneSH () const
 
const GeomDetdet () const
 
virtual const GeomDetUnitdetUnit () const
 
DetId geographicalId () const
 
virtual void getKfComponents (KfComponentsHolder &holder) const
 
unsigned int getRTTI () const
 
Type getType () const
 
virtual bool hasPositionAndError () const
 to be redefined by daughter class More...
 
virtual TrackingRecHit const * hit () const
 
bool isValid () const
 
id_type rawId () const
 
virtual void recHitsV (std::vector< const TrackingRecHit * > &) const
 
virtual void recHitsV (std::vector< TrackingRecHit * > &)
 
virtual void setDet (const GeomDet &idet)
 
 TrackingRecHit (DetId id, Type type=valid)
 
 TrackingRecHit (id_type id=0, Type type=valid)
 
 TrackingRecHit (DetId id, unsigned int rt, Type type=valid)
 
 TrackingRecHit (const GeomDet &idet, Type type=valid)
 
 TrackingRecHit (const GeomDet &idet, unsigned int rt, Type type=valid)
 
 TrackingRecHit (const GeomDet &idet, TrackingRecHit const &rh)
 
virtual ConstRecHitContainer transientHits () const
 
Type type () const
 
virtual float weight () const
 
virtual ~TrackingRecHit ()
 

Static Public Member Functions

static RecHitPointer build (const LocalPoint &pos, const LocalError &err, const Surface *surface)
 

Private Member Functions

TRecHit2DPosConstraintclone () const override
 

Private Attributes

const LocalError err_
 
const LocalPoint pos_
 
ConstReferenceCountingPointer< Surfacesurface_
 

Additional Inherited Members

- Public Types inherited from TrackingRecHit
typedef std::vector< ConstRecHitPointerConstRecHitContainer
 
using ConstRecHitPointer = std::shared_ptr< TrackingRecHit const >
 
typedef unsigned int id_type
 
typedef std::vector< ConstRecHitPointerRecHitContainer
 
using RecHitPointer = std::shared_ptr< TrackingRecHit const >
 
enum  SharedInputType { all, some }
 definition of equality via shared input More...
 
enum  Type {
  valid = 0, missing = 1, inactive = 2, bad = 3,
  missing_inner = 4, missing_outer = 5, inactive_inner = 6, inactive_outer = 7
}
 
- Static Public Attributes inherited from TrackingRecHit
static const int rttiShift = 24
 
static const int typeMask = 0xf
 
- Protected Member Functions inherited from TrackingRecHit
void setId (id_type iid)
 
void setRTTI (unsigned int rt)
 
void setType (Type ttype)
 

Detailed Description

Definition at line 9 of file TRecHit2DPosConstraint.h.

Constructor & Destructor Documentation

TRecHit2DPosConstraint::TRecHit2DPosConstraint ( const LocalPoint pos,
const LocalError err,
const Surface surface 
)
inline

Definition at line 12 of file TRecHit2DPosConstraint.h.

Referenced by build(), clone(), and TRecHit2DPosConstraint().

14  :
16  pos_(pos),err_(err),surface_(surface) {}
ConstReferenceCountingPointer< Surface > surface_
TrackingRecHit(DetId id, Type type=valid)
TRecHit2DPosConstraint::TRecHit2DPosConstraint ( const GeomDet idet,
const LocalPoint pos,
const LocalError err,
const Surface surface 
)
inline

Definition at line 18 of file TRecHit2DPosConstraint.h.

References trackingPlots::other, and TRecHit2DPosConstraint().

21  :
23  pos_(pos),err_(err) {}
TrackingRecHit(DetId id, Type type=valid)
TRecHit2DPosConstraint::TRecHit2DPosConstraint ( const TRecHit2DPosConstraint other)
default
TRecHit2DPosConstraint::TRecHit2DPosConstraint ( TRecHit2DPosConstraint &&  other)
default
TRecHit2DPosConstraint::~TRecHit2DPosConstraint ( )
inlineoverride

Definition at line 28 of file TRecHit2DPosConstraint.h.

28 {}

Member Function Documentation

static RecHitPointer TRecHit2DPosConstraint::build ( const LocalPoint pos,
const LocalError err,
const Surface surface 
)
inlinestatic

Definition at line 70 of file TRecHit2DPosConstraint.h.

References TRecHit2DPosConstraint().

Referenced by GsfConstraintAtVertex::constrainAtPoint().

71  {
72  return RecHitPointer( new TRecHit2DPosConstraint( pos, err, surface));
73  }
std::shared_ptr< TrackingRecHit const > RecHitPointer
TRecHit2DPosConstraint(const LocalPoint &pos, const LocalError &err, const Surface *surface)
bool TRecHit2DPosConstraint::canImproveWithTrack ( ) const
inlineoverridevirtual

Returns true if the clone( const TrajectoryStateOnSurface&) method returns an improved hit, false if it returns an identical copy. In order to avoid redundent copies one should call canImproveWithTrack() before calling clone( const TrajectoryStateOnSurface&). this will be done inside the TkCloner itself

Reimplemented from TrackingRecHit.

Definition at line 66 of file TRecHit2DPosConstraint.h.

66 {return false;}
virtual RecHitPointer TRecHit2DPosConstraint::clone ( const TrajectoryStateOnSurface ts) const
inlinevirtual

Definition at line 68 of file TRecHit2DPosConstraint.h.

References clone().

Referenced by clone().

68 {return RecHitPointer(clone());}
TRecHit2DPosConstraint * clone() const override
std::shared_ptr< TrackingRecHit const > RecHitPointer
TRecHit2DPosConstraint* TRecHit2DPosConstraint::clone ( void  ) const
inlineoverrideprivatevirtual

Implements TrackingRecHit.

Definition at line 89 of file TRecHit2DPosConstraint.h.

References TRecHit2DPosConstraint().

89  {
90  return new TRecHit2DPosConstraint(*this);
91  }
TRecHit2DPosConstraint(const LocalPoint &pos, const LocalError &err, const Surface *surface)
int TRecHit2DPosConstraint::dimension ( ) const
inlineoverridevirtual

Implements TrackingRecHit.

Definition at line 54 of file TRecHit2DPosConstraint.h.

54 {return 2;}
float TRecHit2DPosConstraint::errorGlobalR ( ) const
inlineoverridevirtual

Reimplemented from TrackingRecHit.

Definition at line 79 of file TRecHit2DPosConstraint.h.

References globalPosition(), globalPositionError(), and mathSSE::sqrt().

79 { return std::sqrt(globalPositionError().rerr(globalPosition()));}
GlobalPoint globalPosition() const override
T sqrt(T t)
Definition: SSEVec.h:18
GlobalError globalPositionError() const override
float TRecHit2DPosConstraint::errorGlobalRPhi ( ) const
inlineoverridevirtual

Reimplemented from TrackingRecHit.

Definition at line 81 of file TRecHit2DPosConstraint.h.

References globalPosition(), globalPositionError(), PV3DBase< T, PVType, FrameType >::perp(), and mathSSE::sqrt().

81 { return globalPosition().perp()*sqrt(globalPositionError().phierr(globalPosition())); }
T perp() const
Definition: PV3DBase.h:72
GlobalPoint globalPosition() const override
T sqrt(T t)
Definition: SSEVec.h:18
GlobalError globalPositionError() const override
float TRecHit2DPosConstraint::errorGlobalZ ( ) const
inlineoverridevirtual

Reimplemented from TrackingRecHit.

Definition at line 80 of file TRecHit2DPosConstraint.h.

References globalPositionError(), and mathSSE::sqrt().

80 { return std::sqrt(globalPositionError().czz()); }
T sqrt(T t)
Definition: SSEVec.h:18
GlobalError globalPositionError() const override
GlobalPoint TRecHit2DPosConstraint::globalPosition ( ) const
inlineoverridevirtual

Reimplemented from TrackingRecHit.

Definition at line 77 of file TRecHit2DPosConstraint.h.

References localPosition(), surface(), and Surface::toGlobal().

Referenced by errorGlobalR(), and errorGlobalRPhi().

77 { return surface()->toGlobal(localPosition());}
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
Definition: Surface.h:106
const Surface * surface() const override
LocalPoint localPosition() const override
GlobalError TRecHit2DPosConstraint::globalPositionError ( ) const
inlineoverridevirtual

Reimplemented from TrackingRecHit.

Definition at line 78 of file TRecHit2DPosConstraint.h.

References localPositionError(), surface(), and ErrorFrameTransformer::transform().

Referenced by errorGlobalR(), errorGlobalRPhi(), and errorGlobalZ().

static GlobalError transform(const LocalError &le, const Surface &surf)
const Surface * surface() const override
LocalError localPositionError() const override
LocalPoint TRecHit2DPosConstraint::localPosition ( ) const
inlineoverridevirtual

Implements TrackingRecHit.

Definition at line 56 of file TRecHit2DPosConstraint.h.

References pos_.

Referenced by globalPosition(), and parameters().

56 {return pos_;}
LocalError TRecHit2DPosConstraint::localPositionError ( ) const
inlineoverridevirtual

Implements TrackingRecHit.

Definition at line 57 of file TRecHit2DPosConstraint.h.

References err_.

Referenced by globalPositionError(), and parametersError().

57 {return err_;}
AlgebraicVector TRecHit2DPosConstraint::parameters ( void  ) const
inlineoverridevirtual

Implements TrackingRecHit.

Definition at line 30 of file TRecHit2DPosConstraint.h.

References localPosition(), mps_fire::result, PV3DBase< T, PVType, FrameType >::x(), and PV3DBase< T, PVType, FrameType >::y().

30  {
33  result[0] = lp.x();
34  result[1] = lp.y();
35  return result;
36  }
LocalPoint localPosition() const override
T y() const
Definition: PV3DBase.h:63
CLHEP::HepVector AlgebraicVector
T x() const
Definition: PV3DBase.h:62
AlgebraicSymMatrix TRecHit2DPosConstraint::parametersError ( ) const
inlineoverridevirtual

Implements TrackingRecHit.

Definition at line 38 of file TRecHit2DPosConstraint.h.

References localPositionError(), funct::m, LocalError::xx(), LocalError::xy(), and LocalError::yy().

38  {
41  m[0][0] = le.xx();
42  m[0][1] = le.xy();
43  m[1][1] = le.yy();
44  return m;
45  }
LocalError localPositionError() const override
CLHEP::HepSymMatrix AlgebraicSymMatrix
AlgebraicMatrix TRecHit2DPosConstraint::projectionMatrix ( ) const
inlineoverridevirtual

Implements TrackingRecHit.

Definition at line 47 of file TRecHit2DPosConstraint.h.

References theProjectionMatrix.

47  {
49  theProjectionMatrix = AlgebraicMatrix( 2, 5, 0);
50  theProjectionMatrix[0][3] = 1;
51  theProjectionMatrix[1][4] = 1;
52  return theProjectionMatrix;
53  }
static const AlgebraicMatrix theProjectionMatrix
Definition: CSCSegment.cc:80
CLHEP::HepMatrix AlgebraicMatrix
std::vector<const TrackingRecHit*> TRecHit2DPosConstraint::recHits ( ) const
inlineoverridevirtual

Access to component RecHits (if any)

Implements TrackingRecHit.

Definition at line 60 of file TRecHit2DPosConstraint.h.

60 { return std::vector<const TrackingRecHit*>(); }
std::vector<TrackingRecHit*> TRecHit2DPosConstraint::recHits ( )
inlineoverridevirtual

Non-const access to component RecHits (if any)

Implements TrackingRecHit.

Definition at line 61 of file TRecHit2DPosConstraint.h.

61 { return std::vector<TrackingRecHit*>(); }
bool TRecHit2DPosConstraint::sharesInput ( const TrackingRecHit other,
SharedInputType  what 
) const
inlineoverridevirtual

Returns true if the two TrackingRecHits are using the same input information (like Digis, Clusters, etc), false otherwise. The second argument specifies how much sharing is needed in order to return true: the value "all" means that all inputs of the two hits must be identical; the value "some" means that at least one of the inputs is in common.

Reimplemented from TrackingRecHit.

Definition at line 64 of file TRecHit2DPosConstraint.h.

64 { return false;}
const Surface* TRecHit2DPosConstraint::surface ( ) const
inlineoverridevirtual

Reimplemented from TrackingRecHit.

Definition at line 75 of file TRecHit2DPosConstraint.h.

References TrackingRecHit::det(), GeomDet::surface(), and surface_.

Referenced by globalPosition(), and globalPositionError().

75 {return det() ? &(det()->surface()) : &(*surface_);}
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:42
ConstReferenceCountingPointer< Surface > surface_
const GeomDet * det() const

Member Data Documentation

const LocalError TRecHit2DPosConstraint::err_
private

Definition at line 86 of file TRecHit2DPosConstraint.h.

Referenced by localPositionError().

const LocalPoint TRecHit2DPosConstraint::pos_
private

Definition at line 85 of file TRecHit2DPosConstraint.h.

Referenced by localPosition().

ConstReferenceCountingPointer<Surface> TRecHit2DPosConstraint::surface_
private

Definition at line 87 of file TRecHit2DPosConstraint.h.

Referenced by surface().