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
 
template<typename... Args>
 TValidTrackingRecHit (Args &&... args)
 
 TValidTrackingRecHit (const GeomDet &geom)
 
- 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 (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 ()
 

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) {}

◆ 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)...) {}

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.

20 { return hit()->clone(); }

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

◆ 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.

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

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

◆ errorGlobalRPhi()

float TValidTrackingRecHit::errorGlobalRPhi ( ) const
inlinefinalvirtual

Reimplemented from TrackingRecHit.

Definition at line 32 of file TValidTrackingRecHit.h.

32  {
33  return globalPosition().perp() * sqrt(globalPositionError().phierr(globalPosition()));
34  }

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

◆ errorGlobalZ()

float TValidTrackingRecHit::errorGlobalZ ( ) const
inlinefinalvirtual

Reimplemented from TrackingRecHit.

Definition at line 31 of file TValidTrackingRecHit.h.

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

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

◆ globalPosition()

GlobalPoint TValidTrackingRecHit::globalPosition ( ) const
inlinefinalvirtual

Reimplemented from TrackingRecHit.

Definition at line 25 of file TValidTrackingRecHit.h.

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

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

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

◆ globalPositionError()

GlobalError TValidTrackingRecHit::globalPositionError ( ) const
inlinefinalvirtual

◆ globalState()

TrackingRecHitGlobalState TValidTrackingRecHit::globalState ( ) const
inline

Definition at line 37 of file TValidTrackingRecHit.h.

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  }

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

◆ surface()

const Surface* TValidTrackingRecHit::surface ( ) const
inlinefinalvirtual
writedatasetfile.args
args
Definition: writedatasetfile.py:18
GlobalErrorBase::phierr
T phierr(const GlobalPoint &aPoint) const
Definition: GlobalErrorBase.h:149
TrackingRecHit::TrackingRecHit
TrackingRecHit(DetId id, Type type=valid)
Definition: TrackingRecHit.h:61
TrackingRecHit::hit
virtual TrackingRecHit const * hit() const
Definition: TrackingRecHit.h:75
TrackingRecHit::det
const GeomDet * det() const
Definition: TrackingRecHit.h:122
TrackingRecHit::localPosition
virtual LocalPoint localPosition() const =0
GeomDet::surface
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:37
ErrorFrameTransformer
Definition: ErrorFrameTransformer.h:12
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
Surface::toGlobal
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
Definition: Surface.h:79
relativeConstraints.geom
geom
Definition: relativeConstraints.py:72
TrackingRecHitGlobalState
Definition: TrackingRecHitGlobalState.h:7
GlobalErrorBase::rerr
T rerr(const GlobalPoint &aPoint) const
Definition: GlobalErrorBase.h:138
runTauDisplay.gp
gp
Definition: runTauDisplay.py:431
TValidTrackingRecHit::globalPositionError
GlobalError globalPositionError() const final
Definition: TValidTrackingRecHit.h:27
GlobalErrorBase< double, ErrorMatrixTag >
TrackingRecHit::clone
virtual TrackingRecHit * clone() const =0
TValidTrackingRecHit::surface
const Surface * surface() const final
Definition: TValidTrackingRecHit.h:23
alignCSCRings.r
r
Definition: alignCSCRings.py:93
GlobalErrorBase::czz
T czz() const
Definition: GlobalErrorBase.h:107
TValidTrackingRecHit::globalPosition
GlobalPoint globalPosition() const final
Definition: TValidTrackingRecHit.h:25
ErrorFrameTransformer::transform
static GlobalError transform(const LocalError &le, const Surface &surf)
Definition: ErrorFrameTransformer.h:16
PV3DBase::perp
T perp() const
Definition: PV3DBase.h:69
TrackingRecHit::localPositionError
virtual LocalError localPositionError() const =0