CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
TRecHit1DMomConstraint Class Referencefinal

#include <TRecHit1DMomConstraint.h>

Inheritance diagram for TRecHit1DMomConstraint:
TrackingRecHit

Public Member Functions

bool canImproveWithTrack () const override
 
int charge () const
 
virtual RecHitPointer clone (const TrajectoryStateOnSurface &ts) const
 
TrackingRecHitcloneHit () const override
 
const GeomDetUnitdetUnit () const override
 
int dimension () const override
 
double err () const
 
float errorGlobalR () const override
 
float errorGlobalRPhi () const override
 
float errorGlobalZ () const override
 
GlobalPoint globalPosition () const override
 
GlobalError globalPositionError () const override
 
const TrackingRecHithit () const override
 
LocalPoint localPosition () const override
 
LocalError localPositionError () const override
 
double mom () const
 
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
 
 ~TRecHit1DMomConstraint () override
 
- 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 * > &)
 
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 int charge, const double mom, const double err, const Surface *surface)
 

Private Member Functions

TRecHit1DMomConstraintclone () const override
 
 TRecHit1DMomConstraint (const int charge, const double mom, const double err, const Surface *surface)
 Creates the TrackingRecHit internally, avoids redundent cloning. More...
 
 TRecHit1DMomConstraint (const TRecHit1DMomConstraint &other)=default
 

Private Attributes

const int charge_
 
const double err_
 
const double mom_
 
const 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 TRecHit1DMomConstraint.h.

Constructor & Destructor Documentation

◆ ~TRecHit1DMomConstraint()

TRecHit1DMomConstraint::~TRecHit1DMomConstraint ( )
inlineoverride

Definition at line 9 of file TRecHit1DMomConstraint.h.

9 {}

◆ TRecHit1DMomConstraint() [1/2]

TRecHit1DMomConstraint::TRecHit1DMomConstraint ( const int  charge,
const double  mom,
const double  err,
const Surface surface 
)
inlineprivate

Creates the TrackingRecHit internally, avoids redundent cloning.

Definition at line 73 of file TRecHit1DMomConstraint.h.

Referenced by build(), and clone().

◆ TRecHit1DMomConstraint() [2/2]

TRecHit1DMomConstraint::TRecHit1DMomConstraint ( const TRecHit1DMomConstraint other)
privatedefault

Member Function Documentation

◆ build()

static RecHitPointer TRecHit1DMomConstraint::build ( const int  charge,
const double  mom,
const double  err,
const Surface surface 
)
inlinestatic

Definition at line 52 of file TRecHit1DMomConstraint.h.

55  {
57  }

References charge(), err(), mom(), surface(), and TRecHit1DMomConstraint().

◆ canImproveWithTrack()

bool TRecHit1DMomConstraint::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 46 of file TRecHit1DMomConstraint.h.

46 { return false; }

◆ charge()

int TRecHit1DMomConstraint::charge ( void  ) const
inline

Definition at line 37 of file TRecHit1DMomConstraint.h.

37 { return charge_; }

References charge_.

Referenced by build().

◆ clone() [1/2]

TRecHit1DMomConstraint* TRecHit1DMomConstraint::clone ( void  ) const
inlineoverrideprivatevirtual

Implements TrackingRecHit.

Definition at line 81 of file TRecHit1DMomConstraint.h.

81 { return new TRecHit1DMomConstraint(*this); }

References TRecHit1DMomConstraint().

◆ clone() [2/2]

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

Definition at line 48 of file TRecHit1DMomConstraint.h.

48 { return RecHitPointer(clone()); }

References clone().

Referenced by clone().

◆ cloneHit()

TrackingRecHit* TRecHit1DMomConstraint::cloneHit ( ) const
inlineoverridevirtual

Reimplemented from TrackingRecHit.

Definition at line 40 of file TRecHit1DMomConstraint.h.

40 { return nullptr; }

◆ detUnit()

const GeomDetUnit* TRecHit1DMomConstraint::detUnit ( ) const
inlineoverridevirtual

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 50 of file TRecHit1DMomConstraint.h.

50 { return nullptr; }

◆ dimension()

int TRecHit1DMomConstraint::dimension ( ) const
inlineoverridevirtual

Implements TrackingRecHit.

Definition at line 30 of file TRecHit1DMomConstraint.h.

30 { return 1; }

◆ err()

double TRecHit1DMomConstraint::err ( ) const
inline

Definition at line 36 of file TRecHit1DMomConstraint.h.

36 { return err_; }

References err_.

Referenced by build().

◆ errorGlobalR()

float TRecHit1DMomConstraint::errorGlobalR ( ) const
inlineoverridevirtual

Reimplemented from TrackingRecHit.

Definition at line 63 of file TRecHit1DMomConstraint.h.

63 { return 0; }

◆ errorGlobalRPhi()

float TRecHit1DMomConstraint::errorGlobalRPhi ( ) const
inlineoverridevirtual

Reimplemented from TrackingRecHit.

Definition at line 65 of file TRecHit1DMomConstraint.h.

65 { return 0; }

◆ errorGlobalZ()

float TRecHit1DMomConstraint::errorGlobalZ ( ) const
inlineoverridevirtual

Reimplemented from TrackingRecHit.

Definition at line 64 of file TRecHit1DMomConstraint.h.

64 { return 0; }

◆ globalPosition()

GlobalPoint TRecHit1DMomConstraint::globalPosition ( ) const
inlineoverridevirtual

Reimplemented from TrackingRecHit.

Definition at line 61 of file TRecHit1DMomConstraint.h.

61 { return GlobalPoint(); }

◆ globalPositionError()

GlobalError TRecHit1DMomConstraint::globalPositionError ( ) const
inlineoverridevirtual

Reimplemented from TrackingRecHit.

Definition at line 62 of file TRecHit1DMomConstraint.h.

62 { return GlobalError(); }

◆ hit()

const TrackingRecHit* TRecHit1DMomConstraint::hit ( ) const
inlineoverridevirtual

Reimplemented from TrackingRecHit.

Definition at line 39 of file TRecHit1DMomConstraint.h.

39 { return nullptr; } //fixme return invalid

◆ localPosition()

LocalPoint TRecHit1DMomConstraint::localPosition ( ) const
inlineoverridevirtual

Implements TrackingRecHit.

Definition at line 32 of file TRecHit1DMomConstraint.h.

32 { return LocalPoint(0, 0, 0); }

◆ localPositionError()

LocalError TRecHit1DMomConstraint::localPositionError ( ) const
inlineoverridevirtual

Implements TrackingRecHit.

Definition at line 33 of file TRecHit1DMomConstraint.h.

33 { return LocalError(0, 0, 0); }

◆ mom()

double TRecHit1DMomConstraint::mom ( ) const
inline

Definition at line 35 of file TRecHit1DMomConstraint.h.

35 { return mom_; }

References mom_.

Referenced by build().

◆ parameters()

AlgebraicVector TRecHit1DMomConstraint::parameters ( void  ) const
inlineoverridevirtual

Implements TrackingRecHit.

Definition at line 11 of file TRecHit1DMomConstraint.h.

11  {
13  result[0] = charge_ / fabs(mom_);
14  return result;
15  }

References charge_, mom_, and mps_fire::result.

◆ parametersError()

AlgebraicSymMatrix TRecHit1DMomConstraint::parametersError ( ) const
inlineoverridevirtual

Implements TrackingRecHit.

Definition at line 17 of file TRecHit1DMomConstraint.h.

17  {
19  m[0][0] = err_ / (mom_ * mom_); //parametersErrors are squared
20  m[0][0] *= m[0][0];
21  return m;
22  }

References err_, visualization-live-secondInstance_cfg::m, and mom_.

◆ projectionMatrix()

AlgebraicMatrix TRecHit1DMomConstraint::projectionMatrix ( ) const
inlineoverridevirtual

Implements TrackingRecHit.

Definition at line 24 of file TRecHit1DMomConstraint.h.

24  {
27  theProjectionMatrix[0][0] = 1;
28  return theProjectionMatrix;
29  }

References theProjectionMatrix.

◆ recHits() [1/2]

std::vector<const TrackingRecHit*> TRecHit1DMomConstraint::recHits ( ) const
inlineoverridevirtual

Access to component RecHits (if any)

Implements TrackingRecHit.

Definition at line 42 of file TRecHit1DMomConstraint.h.

42 { return std::vector<const TrackingRecHit*>(); }

◆ recHits() [2/2]

std::vector<TrackingRecHit*> TRecHit1DMomConstraint::recHits ( )
inlineoverridevirtual

Non-const access to component RecHits (if any)

Implements TrackingRecHit.

Definition at line 43 of file TRecHit1DMomConstraint.h.

43 { return std::vector<TrackingRecHit*>(); }

◆ sharesInput()

bool TRecHit1DMomConstraint::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 44 of file TRecHit1DMomConstraint.h.

44 { return false; }

◆ surface()

const Surface* TRecHit1DMomConstraint::surface ( ) const
inlineoverridevirtual

Reimplemented from TrackingRecHit.

Definition at line 59 of file TRecHit1DMomConstraint.h.

59 { return surface_; }

References surface_.

Referenced by build().

Member Data Documentation

◆ charge_

const int TRecHit1DMomConstraint::charge_
private

Definition at line 68 of file TRecHit1DMomConstraint.h.

Referenced by charge(), and parameters().

◆ err_

const double TRecHit1DMomConstraint::err_
private

Definition at line 70 of file TRecHit1DMomConstraint.h.

Referenced by err(), and parametersError().

◆ mom_

const double TRecHit1DMomConstraint::mom_
private

Definition at line 69 of file TRecHit1DMomConstraint.h.

Referenced by mom(), parameters(), and parametersError().

◆ surface_

const Surface* TRecHit1DMomConstraint::surface_
private

Definition at line 71 of file TRecHit1DMomConstraint.h.

Referenced by surface().

TRecHit1DMomConstraint::err
double err() const
Definition: TRecHit1DMomConstraint.h:36
TRecHit1DMomConstraint::err_
const double err_
Definition: TRecHit1DMomConstraint.h:70
align::LocalPoint
Point3DBase< Scalar, LocalTag > LocalPoint
Definition: Definitions.h:30
TrackingRecHit::RecHitPointer
std::shared_ptr< TrackingRecHit const > RecHitPointer
Definition: TrackingRecHit.h:24
TRecHit1DMomConstraint::mom
double mom() const
Definition: TRecHit1DMomConstraint.h:35
TRecHit1DMomConstraint::surface
const Surface * surface() const override
Definition: TRecHit1DMomConstraint.h:59
TRecHit1DMomConstraint::charge
int charge() const
Definition: TRecHit1DMomConstraint.h:37
TRecHit1DMomConstraint::charge_
const int charge_
Definition: TRecHit1DMomConstraint.h:68
GlobalError
GlobalErrorBase< double, ErrorMatrixTag > GlobalError
Definition: GlobalError.h:13
TRecHit1DMomConstraint::clone
TRecHit1DMomConstraint * clone() const override
Definition: TRecHit1DMomConstraint.h:81
TRecHit1DMomConstraint::mom_
const double mom_
Definition: TRecHit1DMomConstraint.h:69
AlgebraicVector
CLHEP::HepVector AlgebraicVector
Definition: AlgebraicObjects.h:13
visualization-live-secondInstance_cfg.m
m
Definition: visualization-live-secondInstance_cfg.py:72
GlobalPoint
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
TRecHit1DMomConstraint::surface_
const Surface * surface_
Definition: TRecHit1DMomConstraint.h:71
LocalError
Definition: LocalError.h:12
AlgebraicSymMatrix
CLHEP::HepSymMatrix AlgebraicSymMatrix
Definition: AlgebraicObjects.h:15
AlgebraicMatrix
CLHEP::HepMatrix AlgebraicMatrix
Definition: AlgebraicObjects.h:14
TRecHit1DMomConstraint::TRecHit1DMomConstraint
TRecHit1DMomConstraint(const int charge, const double mom, const double err, const Surface *surface)
Creates the TrackingRecHit internally, avoids redundent cloning.
Definition: TRecHit1DMomConstraint.h:73
theProjectionMatrix
static const AlgebraicMatrix theProjectionMatrix
Definition: CSCSegment.cc:79
mps_fire.result
result
Definition: mps_fire.py:303