CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions
TValidTrackingRecHit Class Referenceabstract

#include <TValidTrackingRecHit.h>

Inheritance diagram for TValidTrackingRecHit:
TrackingRecHit BeamSpotTransientTrackingRecHit GenericTransientTrackingRecHit KFBasedPixelFitter::MyBeamSpotHit MTDTransientTrackingRecHit MuonTransientTrackingRecHit

Public Member Functions

bool canImproveWithTrack () const override
 
TrackingRecHitcloneHit () const override
 
virtual float clusterProbability () const
 cluster probability, overloaded by pixel rechits. More...
 
float errorGlobalR () const final
 
float errorGlobalRPhi () const final
 
float errorGlobalZ () const final
 
GlobalPoint globalPosition () const final
 
GlobalError globalPositionError () const final
 
TrackingRecHitGlobalState globalState () const
 
const Surfacesurface () const final
 
 TValidTrackingRecHit (const GeomDet &geom)
 
template<typename... Args>
 TValidTrackingRecHit (Args &&... args)
 
- Public Member Functions inherited from TrackingRecHit
RecHitPointer cloneForFit (const GeomDet &idet) const
 
virtual RecHitPointer cloneSH () const
 
const GeomDetdet () const
 
virtual const GeomDetUnitdetUnit () const
 
virtual int dimension () const =0
 
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
 
virtual LocalPoint localPosition () const =0
 
virtual LocalError localPositionError () const =0
 
virtual AlgebraicVector parameters () const =0
 
virtual AlgebraicSymMatrix parametersError () const =0
 
virtual AlgebraicMatrix projectionMatrix () const =0
 
id_type rawId () const
 
virtual std::vector< const TrackingRecHit * > recHits () const =0
 Access to component RecHits (if any) More...
 
virtual std::vector< TrackingRecHit * > recHits ()=0
 Non-const access to component RecHits (if any) More...
 
virtual void recHitsV (std::vector< const TrackingRecHit *> &) const
 
virtual void recHitsV (std::vector< TrackingRecHit *> &)
 
virtual void setDet (const GeomDet &idet)
 
virtual bool sharesInput (const TrackingRecHit *other, SharedInputType what) const
 
 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 ()
 

Private Member Functions

TValidTrackingRecHitclone () const override=0
 

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

only for valid hits

Definition at line 12 of file TValidTrackingRecHit.h.

Constructor & Destructor Documentation

◆ TValidTrackingRecHit() [1/2]

TValidTrackingRecHit::TValidTrackingRecHit ( const GeomDet geom)
inline

Definition at line 14 of file TValidTrackingRecHit.h.

14 : TrackingRecHit(geom) {}
TrackingRecHit(DetId id, Type type=valid)

◆ TValidTrackingRecHit() [2/2]

template<typename... Args>
TValidTrackingRecHit::TValidTrackingRecHit ( Args &&...  args)
inline

Definition at line 17 of file TValidTrackingRecHit.h.

17 : TrackingRecHit(std::forward<Args>(args)...) {}
TrackingRecHit(DetId id, Type type=valid)

Member Function Documentation

◆ canImproveWithTrack()

bool TValidTrackingRecHit::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&).

Reimplemented from TrackingRecHit.

Definition at line 51 of file TValidTrackingRecHit.h.

51 { return false; }

◆ clone()

TValidTrackingRecHit* TValidTrackingRecHit::clone ( ) const
overrideprivatepure virtual

◆ cloneHit()

TrackingRecHit* TValidTrackingRecHit::cloneHit ( ) const
inlineoverridevirtual

Reimplemented from TrackingRecHit.

Definition at line 20 of file TValidTrackingRecHit.h.

References TrackingRecHit::clone(), and TrackingRecHit::hit().

20 { return hit()->clone(); }
virtual TrackingRecHit * clone() const =0
virtual TrackingRecHit const * hit() const

◆ clusterProbability()

virtual float TValidTrackingRecHit::clusterProbability ( ) const
inlinevirtual

cluster probability, overloaded by pixel rechits.

Definition at line 54 of file TValidTrackingRecHit.h.

54 { return 1.f; }

◆ errorGlobalR()

float TValidTrackingRecHit::errorGlobalR ( ) const
inlinefinalvirtual

Reimplemented from TrackingRecHit.

Definition at line 30 of file TValidTrackingRecHit.h.

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

30 { return std::sqrt(globalPositionError().rerr(globalPosition())); }
GlobalError globalPositionError() const final
GlobalPoint globalPosition() const final
T sqrt(T t)
Definition: SSEVec.h:19

◆ errorGlobalRPhi()

float TValidTrackingRecHit::errorGlobalRPhi ( ) const
inlinefinalvirtual

Reimplemented from TrackingRecHit.

Definition at line 32 of file TValidTrackingRecHit.h.

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

32  {
33  return globalPosition().perp() * sqrt(globalPositionError().phierr(globalPosition()));
34  }
T perp() const
Definition: PV3DBase.h:69
GlobalError globalPositionError() const final
GlobalPoint globalPosition() const final
T sqrt(T t)
Definition: SSEVec.h:19

◆ errorGlobalZ()

float TValidTrackingRecHit::errorGlobalZ ( ) const
inlinefinalvirtual

Reimplemented from TrackingRecHit.

Definition at line 31 of file TValidTrackingRecHit.h.

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

31 { return std::sqrt(globalPositionError().czz()); }
GlobalError globalPositionError() const final
T sqrt(T t)
Definition: SSEVec.h:19

◆ globalPosition()

GlobalPoint TValidTrackingRecHit::globalPosition ( ) const
inlinefinalvirtual

Reimplemented from TrackingRecHit.

Definition at line 25 of file TValidTrackingRecHit.h.

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

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

25 { return surface()->toGlobal(localPosition()); }
const Surface * surface() const final
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
Definition: Surface.h:79
virtual LocalPoint localPosition() const =0

◆ globalPositionError()

GlobalError TValidTrackingRecHit::globalPositionError ( ) const
inlinefinalvirtual

Reimplemented from TrackingRecHit.

Definition at line 27 of file TValidTrackingRecHit.h.

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

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

27  {
29  }
static GlobalError transform(const LocalError &le, const Surface &surf)
const Surface * surface() const final
virtual LocalError localPositionError() const =0

◆ globalState()

TrackingRecHitGlobalState TValidTrackingRecHit::globalState ( ) const
inline

Definition at line 37 of file TValidTrackingRecHit.h.

References GlobalErrorBase< T, ErrorWeightType >::czz(), globalPosition(), runTauDisplay::gp, TrackingRecHit::localPositionError(), GlobalErrorBase< T, ErrorWeightType >::phierr(), alignCSCRings::r, GlobalErrorBase< T, ErrorWeightType >::rerr(), mathSSE::sqrt(), surface(), and ErrorFrameTransformer::transform().

37  {
39  auto gp = globalPosition();
40  float r = gp.perp();
41  float errorRPhi = r * std::sqrt(float(globalError.phierr(gp)));
42  float errorR = std::sqrt(float(globalError.rerr(gp)));
43  float errorZ = std::sqrt(float(globalError.czz()));
44  return (TrackingRecHitGlobalState){gp.basicVector(), r, gp.barePhi(), errorR, errorZ, errorRPhi};
45  }
static GlobalError transform(const LocalError &le, const Surface &surf)
const Surface * surface() const final
T phierr(const GlobalPoint &aPoint) const
GlobalPoint globalPosition() const final
T sqrt(T t)
Definition: SSEVec.h:19
virtual LocalError localPositionError() const =0
T rerr(const GlobalPoint &aPoint) const

◆ surface()

const Surface* TValidTrackingRecHit::surface ( ) const
inlinefinalvirtual

Reimplemented from TrackingRecHit.

Definition at line 23 of file TValidTrackingRecHit.h.

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

Referenced by MuonTransientTrackingRecHit::globalDirection(), MuonTransientTrackingRecHit::globalDirectionError(), globalPosition(), globalPositionError(), and globalState().

23 { return &(det()->surface()); }
const GeomDet * det() const
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:37