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 GeomDet &idet, const LocalPoint &pos, const LocalError &err, const Surface *surface)
 
 TRecHit2DPosConstraint (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 (const GeomDet &idet, TrackingRecHit const &rh)
 
 TrackingRecHit (const GeomDet &idet, Type type=valid)
 
 TrackingRecHit (const GeomDet &idet, unsigned int rt, Type type=valid)
 
 TrackingRecHit (DetId id, Type type=valid)
 
 TrackingRecHit (DetId id, unsigned int rt, Type type=valid)
 
 TrackingRecHit (id_type id=0, Type type=valid)
 
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 7 of file TRecHit2DPosConstraint.h.

Constructor & Destructor Documentation

◆ TRecHit2DPosConstraint() [1/4]

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

◆ TRecHit2DPosConstraint() [2/4]

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

Definition at line 12 of file TRecHit2DPosConstraint.h.

◆ TRecHit2DPosConstraint() [3/4]

TRecHit2DPosConstraint::TRecHit2DPosConstraint ( const TRecHit2DPosConstraint other)
default

◆ TRecHit2DPosConstraint() [4/4]

TRecHit2DPosConstraint::TRecHit2DPosConstraint ( TRecHit2DPosConstraint &&  other)
default

◆ ~TRecHit2DPosConstraint()

TRecHit2DPosConstraint::~TRecHit2DPosConstraint ( )
inlineoverride

Definition at line 18 of file TRecHit2DPosConstraint.h.

18 {}

Member Function Documentation

◆ build()

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

◆ canImproveWithTrack()

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; }

◆ clone() [1/2]

TRecHit2DPosConstraint* TRecHit2DPosConstraint::clone ( void  ) const
inlineoverrideprivatevirtual

Implements TrackingRecHit.

Definition at line 80 of file TRecHit2DPosConstraint.h.

80 { return new TRecHit2DPosConstraint(*this); }

References TRecHit2DPosConstraint().

◆ clone() [2/2]

virtual RecHitPointer TRecHit2DPosConstraint::clone ( const TrajectoryStateOnSurface ts) const
inlinevirtual

Definition at line 57 of file TRecHit2DPosConstraint.h.

57 { return RecHitPointer(clone()); }

References clone().

Referenced by clone().

◆ dimension()

int TRecHit2DPosConstraint::dimension ( ) const
inlineoverridevirtual

Implements TrackingRecHit.

Definition at line 44 of file TRecHit2DPosConstraint.h.

44 { return 2; }

◆ errorGlobalR()

float TRecHit2DPosConstraint::errorGlobalR ( ) const
inlineoverridevirtual

Reimplemented from TrackingRecHit.

Definition at line 69 of file TRecHit2DPosConstraint.h.

69 { return std::sqrt(globalPositionError().rerr(globalPosition())); }

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

◆ errorGlobalRPhi()

float TRecHit2DPosConstraint::errorGlobalRPhi ( ) const
inlineoverridevirtual

Reimplemented from TrackingRecHit.

Definition at line 71 of file TRecHit2DPosConstraint.h.

71  {
72  return globalPosition().perp() * sqrt(globalPositionError().phierr(globalPosition()));
73  }

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

◆ errorGlobalZ()

float TRecHit2DPosConstraint::errorGlobalZ ( ) const
inlineoverridevirtual

Reimplemented from TrackingRecHit.

Definition at line 70 of file TRecHit2DPosConstraint.h.

70 { return std::sqrt(globalPositionError().czz()); }

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

◆ globalPosition()

GlobalPoint TRecHit2DPosConstraint::globalPosition ( ) const
inlineoverridevirtual

Reimplemented from TrackingRecHit.

Definition at line 65 of file TRecHit2DPosConstraint.h.

65 { return surface()->toGlobal(localPosition()); }

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

Referenced by errorGlobalR(), and errorGlobalRPhi().

◆ globalPositionError()

GlobalError TRecHit2DPosConstraint::globalPositionError ( ) const
inlineoverridevirtual

Reimplemented from TrackingRecHit.

Definition at line 66 of file TRecHit2DPosConstraint.h.

66  {
68  }

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

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

◆ localPosition()

LocalPoint TRecHit2DPosConstraint::localPosition ( ) const
inlineoverridevirtual

Implements TrackingRecHit.

Definition at line 46 of file TRecHit2DPosConstraint.h.

46 { return pos_; }

References pos_.

Referenced by globalPosition(), and parameters().

◆ localPositionError()

LocalError TRecHit2DPosConstraint::localPositionError ( ) const
inlineoverridevirtual

Implements TrackingRecHit.

Definition at line 47 of file TRecHit2DPosConstraint.h.

47 { return err_; }

References err_.

Referenced by globalPositionError(), and parametersError().

◆ parameters()

AlgebraicVector TRecHit2DPosConstraint::parameters ( void  ) const
inlineoverridevirtual

Implements TrackingRecHit.

Definition at line 20 of file TRecHit2DPosConstraint.h.

20  {
23  result[0] = lp.x();
24  result[1] = lp.y();
25  return result;
26  }

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

◆ parametersError()

AlgebraicSymMatrix TRecHit2DPosConstraint::parametersError ( ) const
inlineoverridevirtual

Implements TrackingRecHit.

Definition at line 28 of file TRecHit2DPosConstraint.h.

28  {
31  m[0][0] = le.xx();
32  m[0][1] = le.xy();
33  m[1][1] = le.yy();
34  return m;
35  }

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

◆ projectionMatrix()

AlgebraicMatrix TRecHit2DPosConstraint::projectionMatrix ( ) const
inlineoverridevirtual

Implements TrackingRecHit.

Definition at line 37 of file TRecHit2DPosConstraint.h.

37  {
40  theProjectionMatrix[0][3] = 1;
41  theProjectionMatrix[1][4] = 1;
42  return theProjectionMatrix;
43  }

References theProjectionMatrix.

◆ recHits() [1/2]

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*>(); }

◆ recHits() [2/2]

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*>(); }

◆ sharesInput()

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; }

◆ surface()

const Surface* TRecHit2DPosConstraint::surface ( ) const
inlineoverridevirtual

Reimplemented from TrackingRecHit.

Definition at line 63 of file TRecHit2DPosConstraint.h.

63 { return det() ? &(det()->surface()) : &(*surface_); }

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

Referenced by build(), globalPosition(), and globalPositionError().

Member Data Documentation

◆ err_

const LocalError TRecHit2DPosConstraint::err_
private

Definition at line 77 of file TRecHit2DPosConstraint.h.

Referenced by localPositionError().

◆ pos_

const LocalPoint TRecHit2DPosConstraint::pos_
private

Definition at line 76 of file TRecHit2DPosConstraint.h.

Referenced by localPosition().

◆ surface_

ConstReferenceCountingPointer<Surface> TRecHit2DPosConstraint::surface_
private

Definition at line 78 of file TRecHit2DPosConstraint.h.

Referenced by surface().

TRecHit2DPosConstraint::pos_
const LocalPoint pos_
Definition: TRecHit2DPosConstraint.h:76
PV3DBase::x
T x() const
Definition: PV3DBase.h:59
TrackingRecHit::TrackingRecHit
TrackingRecHit(DetId id, Type type=valid)
Definition: TrackingRecHit.h:61
TrackingRecHit::det
const GeomDet * det() const
Definition: TrackingRecHit.h:122
pos
Definition: PixelAliasList.h:18
TrackingRecHit::RecHitPointer
std::shared_ptr< TrackingRecHit const > RecHitPointer
Definition: TrackingRecHit.h:24
TRecHit2DPosConstraint::globalPositionError
GlobalError globalPositionError() const override
Definition: TRecHit2DPosConstraint.h:66
GeomDet::surface
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:37
ErrorFrameTransformer
Definition: ErrorFrameTransformer.h:12
AlgebraicVector
CLHEP::HepVector AlgebraicVector
Definition: AlgebraicObjects.h:13
TRecHit2DPosConstraint::clone
TRecHit2DPosConstraint * clone() const override
Definition: TRecHit2DPosConstraint.h:80
visualization-live-secondInstance_cfg.m
m
Definition: visualization-live-secondInstance_cfg.py:79
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
Surface::toGlobal
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
Definition: Surface.h:79
Point3DBase< float, LocalTag >
LocalError
Definition: LocalError.h:12
TRecHit2DPosConstraint::TRecHit2DPosConstraint
TRecHit2DPosConstraint(const LocalPoint &pos, const LocalError &err, const Surface *surface)
Definition: TRecHit2DPosConstraint.h:9
TRecHit2DPosConstraint::localPosition
LocalPoint localPosition() const override
Definition: TRecHit2DPosConstraint.h:46
TRecHit2DPosConstraint::globalPosition
GlobalPoint globalPosition() const override
Definition: TRecHit2DPosConstraint.h:65
PV3DBase::y
T y() const
Definition: PV3DBase.h:60
TRecHit2DPosConstraint::surface_
ConstReferenceCountingPointer< Surface > surface_
Definition: TRecHit2DPosConstraint.h:78
AlgebraicSymMatrix
CLHEP::HepSymMatrix AlgebraicSymMatrix
Definition: AlgebraicObjects.h:15
submitPVResolutionJobs.err
err
Definition: submitPVResolutionJobs.py:85
TRecHit2DPosConstraint::err_
const LocalError err_
Definition: TRecHit2DPosConstraint.h:77
AlgebraicMatrix
CLHEP::HepMatrix AlgebraicMatrix
Definition: AlgebraicObjects.h:14
TRecHit2DPosConstraint::localPositionError
LocalError localPositionError() const override
Definition: TRecHit2DPosConstraint.h:47
theProjectionMatrix
static const AlgebraicMatrix theProjectionMatrix
Definition: CSCSegment.cc:79
mps_fire.result
result
Definition: mps_fire.py:311
ErrorFrameTransformer::transform
static GlobalError transform(const LocalError &le, const Surface &surf)
Definition: ErrorFrameTransformer.h:16
trackerHitRTTI::notFromCluster
Definition: trackerHitRTTI.h:19
TRecHit2DPosConstraint::surface
const Surface * surface() const override
Definition: TRecHit2DPosConstraint.h:63
PV3DBase::perp
T perp() const
Definition: PV3DBase.h:69