CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
TRecHit2DPosConstraint Class Reference

#include <TRecHit2DPosConstraint.h>

Inheritance diagram for TRecHit2DPosConstraint:
TrackingRecHit

Public Member Functions

virtual bool canImproveWithTrack () const
 
virtual RecHitPointer clone (const TrajectoryStateOnSurface &ts) const
 
virtual TrackingRecHitcloneHit () const
 
virtual const GeomDetUnitdetUnit () const
 
virtual int dimension () const
 
virtual float errorGlobalR () const
 
virtual float errorGlobalRPhi () const
 
virtual float errorGlobalZ () const
 
virtual GlobalPoint globalPosition () const
 
virtual GlobalError globalPositionError () const
 
virtual const TrackingRecHithit () const
 
virtual LocalPoint localPosition () const
 
virtual LocalError localPositionError () const
 
virtual AlgebraicVector parameters () const
 
virtual AlgebraicSymMatrix parametersError () const
 
virtual AlgebraicMatrix projectionMatrix () const
 
virtual std::vector< const
TrackingRecHit * > 
recHits () const
 Access to component RecHits (if any) More...
 
virtual std::vector
< TrackingRecHit * > 
recHits ()
 Non-const access to component RecHits (if any) More...
 
virtual bool sharesInput (const TrackingRecHit *, SharedInputType) const
 
virtual const Surfacesurface () const
 
virtual ~TRecHit2DPosConstraint ()
 
- 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 * > &)
 
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

virtual TRecHit2DPosConstraintclone () const
 
 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
< Surface
surface_
 

Additional Inherited Members

- Public Types inherited from TrackingRecHit
typedef std::vector
< ConstRecHitPointer
ConstRecHitContainer
 
using ConstRecHitPointer = std::shared_ptr< TrackingRecHit const >
 
typedef unsigned int id_type
 
typedef std::vector
< ConstRecHitPointer
RecHitContainer
 
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 }
 
- 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

virtual TRecHit2DPosConstraint::~TRecHit2DPosConstraint ( )
inlinevirtual

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())) {}
virtual LocalPoint localPosition() const
ConstReferenceCountingPointer< Surface > surface_
virtual const Surface * surface() const
virtual LocalError localPositionError() const

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.
virtual bool TRecHit2DPosConstraint::canImproveWithTrack ( ) const
inlinevirtual

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());}
virtual TRecHit2DPosConstraint * clone() const
std::shared_ptr< TrackingRecHit const > RecHitPointer
virtual TRecHit2DPosConstraint* TRecHit2DPosConstraint::clone ( void  ) const
inlineprivatevirtual

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.
virtual TrackingRecHit* TRecHit2DPosConstraint::cloneHit ( ) const
inlinevirtual

Reimplemented from TrackingRecHit.

Definition at line 44 of file TRecHit2DPosConstraint.h.

44 { return 0;}
virtual const GeomDetUnit* TRecHit2DPosConstraint::detUnit ( ) const
inlinevirtual

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 0;}
virtual int TRecHit2DPosConstraint::dimension ( ) const
inlinevirtual

Implements TrackingRecHit.

Definition at line 38 of file TRecHit2DPosConstraint.h.

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

Reimplemented from TrackingRecHit.

Definition at line 65 of file TRecHit2DPosConstraint.h.

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

65 { return std::sqrt(globalPositionError().rerr(globalPosition()));}
virtual GlobalPoint globalPosition() const
T sqrt(T t)
Definition: SSEVec.h:48
virtual GlobalError globalPositionError() const
virtual float TRecHit2DPosConstraint::errorGlobalRPhi ( ) const
inlinevirtual

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
virtual GlobalPoint globalPosition() const
T sqrt(T t)
Definition: SSEVec.h:48
virtual GlobalError globalPositionError() const
virtual float TRecHit2DPosConstraint::errorGlobalZ ( ) const
inlinevirtual

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:48
virtual GlobalError globalPositionError() const
virtual GlobalPoint TRecHit2DPosConstraint::globalPosition ( ) const
inlinevirtual

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:114
virtual LocalPoint localPosition() const
virtual const Surface * surface() const
virtual GlobalError TRecHit2DPosConstraint::globalPositionError ( ) const
inlinevirtual

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)
virtual const Surface * surface() const
virtual LocalError localPositionError() const
virtual const TrackingRecHit* TRecHit2DPosConstraint::hit ( void  ) const
inlinevirtual

Reimplemented from TrackingRecHit.

Definition at line 43 of file TRecHit2DPosConstraint.h.

43 {return 0;}//fixme return invalid
virtual LocalPoint TRecHit2DPosConstraint::localPosition ( ) const
inlinevirtual

Implements TrackingRecHit.

Definition at line 40 of file TRecHit2DPosConstraint.h.

References pos_.

Referenced by globalPosition(), and parameters().

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

Implements TrackingRecHit.

Definition at line 41 of file TRecHit2DPosConstraint.h.

References err_.

Referenced by globalPositionError(), and parametersError().

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

Implements TrackingRecHit.

Definition at line 14 of file TRecHit2DPosConstraint.h.

References localPosition(), query::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  }
virtual LocalPoint localPosition() const
T y() const
Definition: PV3DBase.h:63
tuple result
Definition: query.py:137
CLHEP::HepVector AlgebraicVector
T x() const
Definition: PV3DBase.h:62
virtual AlgebraicSymMatrix TRecHit2DPosConstraint::parametersError ( ) const
inlinevirtual

Implements TrackingRecHit.

Definition at line 22 of file TRecHit2DPosConstraint.h.

References asciidump::le, localPositionError(), 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  }
CLHEP::HepSymMatrix AlgebraicSymMatrix
virtual LocalError localPositionError() const
virtual AlgebraicMatrix TRecHit2DPosConstraint::projectionMatrix ( ) const
inlinevirtual

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
virtual std::vector<const TrackingRecHit*> TRecHit2DPosConstraint::recHits ( ) const
inlinevirtual

Access to component RecHits (if any)

Implements TrackingRecHit.

Definition at line 46 of file TRecHit2DPosConstraint.h.

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

Non-const access to component RecHits (if any)

Implements TrackingRecHit.

Definition at line 47 of file TRecHit2DPosConstraint.h.

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

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;}
virtual const Surface* TRecHit2DPosConstraint::surface ( ) const
inlinevirtual

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.