CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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
< 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,
  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 7 of file TRecHit2DPosConstraint.h.

Constructor & Destructor Documentation

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

Definition at line 9 of file TRecHit2DPosConstraint.h.

Referenced by build(), and clone().

10  : TrackingRecHit(0, int(trackerHitRTTI::notFromCluster)), 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 12 of file TRecHit2DPosConstraint.h.

13  : TrackingRecHit(idet, int(trackerHitRTTI::notFromCluster)), 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 18 of file TRecHit2DPosConstraint.h.

18 {}

Member Function Documentation

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

Definition at line 59 of file TRecHit2DPosConstraint.h.

References TRecHit2DPosConstraint().

Referenced by GsfConstraintAtVertex::constrainAtPoint().

59  {
60  return RecHitPointer(new TRecHit2DPosConstraint(pos, err, surface));
61  }
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 55 of file TRecHit2DPosConstraint.h.

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

Definition at line 57 of file TRecHit2DPosConstraint.h.

References clone().

Referenced by clone().

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

Implements TrackingRecHit.

Definition at line 80 of file TRecHit2DPosConstraint.h.

References TRecHit2DPosConstraint().

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

Implements TrackingRecHit.

Definition at line 44 of file TRecHit2DPosConstraint.h.

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

Reimplemented from TrackingRecHit.

Definition at line 69 of file TRecHit2DPosConstraint.h.

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

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

Reimplemented from TrackingRecHit.

Definition at line 71 of file TRecHit2DPosConstraint.h.

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

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

Reimplemented from TrackingRecHit.

Definition at line 70 of file TRecHit2DPosConstraint.h.

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

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

Reimplemented from TrackingRecHit.

Definition at line 65 of file TRecHit2DPosConstraint.h.

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

Referenced by errorGlobalR(), and errorGlobalRPhi().

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

Reimplemented from TrackingRecHit.

Definition at line 66 of file TRecHit2DPosConstraint.h.

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

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

66  {
68  }
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 46 of file TRecHit2DPosConstraint.h.

References pos_.

Referenced by globalPosition(), and parameters().

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

Implements TrackingRecHit.

Definition at line 47 of file TRecHit2DPosConstraint.h.

References err_.

Referenced by globalPositionError(), and parametersError().

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

Implements TrackingRecHit.

Definition at line 20 of file TRecHit2DPosConstraint.h.

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

20  {
23  result[0] = lp.x();
24  result[1] = lp.y();
25  return result;
26  }
T y() const
Definition: PV3DBase.h:60
tuple result
Definition: mps_fire.py:311
CLHEP::HepVector AlgebraicVector
T x() const
Definition: PV3DBase.h:59
LocalPoint localPosition() const override
AlgebraicSymMatrix TRecHit2DPosConstraint::parametersError ( ) const
inlineoverridevirtual

Implements TrackingRecHit.

Definition at line 28 of file TRecHit2DPosConstraint.h.

References localPositionError(), visualization-live-secondInstance_cfg::m, LocalError::xx(), LocalError::xy(), and LocalError::yy().

28  {
31  m[0][0] = le.xx();
32  m[0][1] = le.xy();
33  m[1][1] = le.yy();
34  return m;
35  }
LocalError localPositionError() const override
CLHEP::HepSymMatrix AlgebraicSymMatrix
AlgebraicMatrix TRecHit2DPosConstraint::projectionMatrix ( ) const
inlineoverridevirtual

Implements TrackingRecHit.

Definition at line 37 of file TRecHit2DPosConstraint.h.

References theProjectionMatrix.

37  {
39  theProjectionMatrix = AlgebraicMatrix(2, 5, 0);
40  theProjectionMatrix[0][3] = 1;
41  theProjectionMatrix[1][4] = 1;
42  return theProjectionMatrix;
43  }
static const AlgebraicMatrix theProjectionMatrix
Definition: CSCSegment.cc:79
CLHEP::HepMatrix AlgebraicMatrix
std::vector<const TrackingRecHit*> TRecHit2DPosConstraint::recHits ( ) const
inlineoverridevirtual

Access to component RecHits (if any)

Implements TrackingRecHit.

Definition at line 49 of file TRecHit2DPosConstraint.h.

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

Non-const access to component RecHits (if any)

Implements TrackingRecHit.

Definition at line 50 of file TRecHit2DPosConstraint.h.

50 { 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 53 of file TRecHit2DPosConstraint.h.

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

Reimplemented from TrackingRecHit.

Definition at line 63 of file TRecHit2DPosConstraint.h.

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

Referenced by globalPosition(), and globalPositionError().

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

Member Data Documentation

const LocalError TRecHit2DPosConstraint::err_
private

Definition at line 77 of file TRecHit2DPosConstraint.h.

Referenced by localPositionError().

const LocalPoint TRecHit2DPosConstraint::pos_
private

Definition at line 76 of file TRecHit2DPosConstraint.h.

Referenced by localPosition().

ConstReferenceCountingPointer<Surface> TRecHit2DPosConstraint::surface_
private

Definition at line 78 of file TRecHit2DPosConstraint.h.

Referenced by surface().