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
 
TrackingRecHitcloneHit () const override
 
const GeomDetUnitdetUnit () const override
 
int dimension () const override
 
float errorGlobalR () const override
 
float errorGlobalRPhi () const override
 
float errorGlobalZ () const override
 
GlobalPoint globalPosition () const override
 
GlobalError globalPositionError () const override
 
const TrackingRecHithit () 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 () override
 
- Public Member Functions inherited from TrackingRecHit
RecHitPointer cloneForFit (const GeomDet &idet) const
 
virtual RecHitPointer cloneSH () const
 
const GeomDetdet () 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...
 
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
 
 TRecHit2DPosConstraint (const LocalPoint &pos, const LocalError &err, const Surface *surface)
 Creates the TrackingRecHit internally, avoids redundent cloning. More...
 
 TRecHit2DPosConstraint (const TRecHit2DPosConstraint &other)
 

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 ( )
inlineoverride

Definition at line 12 of file TRecHit2DPosConstraint.h.

12 {}
TRecHit2DPosConstraint::TRecHit2DPosConstraint ( const LocalPoint pos,
const LocalError err,
const Surface surface 
)
inlineprivate

Creates the TrackingRecHit internally, avoids redundent cloning.

Definition at line 75 of file TRecHit2DPosConstraint.h.

Referenced by build(), and clone().

77  :
78  pos_(pos),err_(err),surface_(surface) {}
ConstReferenceCountingPointer< Surface > surface_
TRecHit2DPosConstraint::TRecHit2DPosConstraint ( const TRecHit2DPosConstraint other)
inlineprivate

Definition at line 80 of file TRecHit2DPosConstraint.h.

80  :
81  pos_( other.localPosition() ),err_( other.localPositionError() ), surface_((other.surface())) {}
const Surface * surface() const override
LocalPoint localPosition() const override
ConstReferenceCountingPointer< Surface > surface_
LocalError localPositionError() const override

Member Function Documentation

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

Definition at line 56 of file TRecHit2DPosConstraint.h.

References TRecHit2DPosConstraint().

Referenced by GsfConstraintAtVertex::constrainAtPoint().

57  {
58  return RecHitPointer( new TRecHit2DPosConstraint( pos, err, surface));
59  }
std::shared_ptr< TrackingRecHit const > RecHitPointer
TRecHit2DPosConstraint(const LocalPoint &pos, const LocalError &err, const Surface *surface)
Creates the TrackingRecHit internally, avoids redundent cloning.
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 50 of file TRecHit2DPosConstraint.h.

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

Definition at line 52 of file TRecHit2DPosConstraint.h.

References clone().

Referenced by clone().

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

Implements TrackingRecHit.

Definition at line 83 of file TRecHit2DPosConstraint.h.

References TRecHit2DPosConstraint().

83  {
84  return new TRecHit2DPosConstraint(*this);
85  }
TRecHit2DPosConstraint(const LocalPoint &pos, const LocalError &err, const Surface *surface)
Creates the TrackingRecHit internally, avoids redundent cloning.
TrackingRecHit* TRecHit2DPosConstraint::cloneHit ( ) const
inlineoverridevirtual

Reimplemented from TrackingRecHit.

Definition at line 44 of file TRecHit2DPosConstraint.h.

44 { return nullptr;}
const GeomDetUnit* TRecHit2DPosConstraint::detUnit ( ) const
inlineoverridevirtual

CAUTION: the GeomDetUnit* is zero for composite hits (matched hits in the tracker, segments in the muon). Always check this pointer before using it!

Reimplemented from TrackingRecHit.

Definition at line 54 of file TRecHit2DPosConstraint.h.

54 {return nullptr;}
int TRecHit2DPosConstraint::dimension ( ) const
inlineoverridevirtual

Implements TrackingRecHit.

Definition at line 38 of file TRecHit2DPosConstraint.h.

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

Reimplemented from TrackingRecHit.

Definition at line 65 of file TRecHit2DPosConstraint.h.

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

65 { 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 67 of file TRecHit2DPosConstraint.h.

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

67 { 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 66 of file TRecHit2DPosConstraint.h.

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

66 { 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 63 of file TRecHit2DPosConstraint.h.

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

Referenced by errorGlobalR(), and errorGlobalRPhi().

63 { 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 64 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
const TrackingRecHit* TRecHit2DPosConstraint::hit ( ) const
inlineoverridevirtual

Reimplemented from TrackingRecHit.

Definition at line 43 of file TRecHit2DPosConstraint.h.

43 {return nullptr;}//fixme return invalid
LocalPoint TRecHit2DPosConstraint::localPosition ( ) const
inlineoverridevirtual

Implements TrackingRecHit.

Definition at line 40 of file TRecHit2DPosConstraint.h.

References pos_.

Referenced by globalPosition(), and parameters().

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

Implements TrackingRecHit.

Definition at line 41 of file TRecHit2DPosConstraint.h.

References err_.

Referenced by globalPositionError(), and parametersError().

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

Implements TrackingRecHit.

Definition at line 14 of file TRecHit2DPosConstraint.h.

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

14  {
17  result[0] = lp.x();
18  result[1] = lp.y();
19  return result;
20  }
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 22 of file TRecHit2DPosConstraint.h.

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

22  {
25  m[0][0] = le.xx();
26  m[0][1] = le.xy();
27  m[1][1] = le.yy();
28  return m;
29  }
LocalError localPositionError() const override
CLHEP::HepSymMatrix AlgebraicSymMatrix
AlgebraicMatrix TRecHit2DPosConstraint::projectionMatrix ( ) const
inlineoverridevirtual

Implements TrackingRecHit.

Definition at line 31 of file TRecHit2DPosConstraint.h.

References theProjectionMatrix.

31  {
33  theProjectionMatrix = AlgebraicMatrix( 2, 5, 0);
34  theProjectionMatrix[0][3] = 1;
35  theProjectionMatrix[1][4] = 1;
36  return theProjectionMatrix;
37  }
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 46 of file TRecHit2DPosConstraint.h.

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

Non-const access to component RecHits (if any)

Implements TrackingRecHit.

Definition at line 47 of file TRecHit2DPosConstraint.h.

47 { 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 48 of file TRecHit2DPosConstraint.h.

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

Reimplemented from TrackingRecHit.

Definition at line 61 of file TRecHit2DPosConstraint.h.

Referenced by globalPosition(), and globalPositionError().

61 {return &(*surface_);}

Member Data Documentation

const LocalError TRecHit2DPosConstraint::err_
private

Definition at line 72 of file TRecHit2DPosConstraint.h.

Referenced by localPositionError().

const LocalPoint TRecHit2DPosConstraint::pos_
private

Definition at line 71 of file TRecHit2DPosConstraint.h.

Referenced by localPosition().

ConstReferenceCountingPointer<Surface> TRecHit2DPosConstraint::surface_
private

Definition at line 73 of file TRecHit2DPosConstraint.h.