CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
TRecHit1DMomConstraint Class Reference

#include <TRecHit1DMomConstraint.h>

Inheritance diagram for TRecHit1DMomConstraint:
TrackingRecHit

Public Member Functions

virtual bool canImproveWithTrack () const override
 
int charge () const
 
virtual RecHitPointer clone (const TrajectoryStateOnSurface &ts) const
 
virtual TrackingRecHitcloneHit () const
 
virtual const GeomDetUnitdetUnit () const override
 
virtual int dimension () const
 
double err () const
 
virtual float errorGlobalR () const
 
virtual float errorGlobalRPhi () const
 
virtual float errorGlobalZ () const
 
virtual GlobalPoint globalPosition () const
 
virtual GlobalError globalPositionError () const
 
virtual const TrackingRecHithit () const override
 
virtual LocalPoint localPosition () const
 
virtual LocalError localPositionError () const
 
double mom () const
 
virtual AlgebraicVector parameters () const
 
virtual AlgebraicSymMatrix parametersError () const
 
virtual AlgebraicMatrix projectionMatrix () const
 
virtual std::vector< const
TrackingRecHit * > 
recHits () const
 Access to component RecHits (if any) More...
 
virtual std::vector
< TrackingRecHit * > 
recHits ()
 Non-const access to component RecHits (if any) More...
 
virtual bool sharesInput (const TrackingRecHit *, SharedInputType) const
 
virtual const Surfacesurface () const override
 
virtual ~TRecHit1DMomConstraint ()
 
- 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 (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 int charge, const double mom, const double err, const Surface *surface)
 

Private Member Functions

virtual TRecHit1DMomConstraintclone () const
 
 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)
 

Private Attributes

const int charge_
 
const double err_
 
const double mom_
 
const Surfacesurface_
 

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

Constructor & Destructor Documentation

virtual TRecHit1DMomConstraint::~TRecHit1DMomConstraint ( )
inlinevirtual

Definition at line 12 of file TRecHit1DMomConstraint.h.

12 {}
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 78 of file TRecHit1DMomConstraint.h.

Referenced by build(), and clone().

TRecHit1DMomConstraint::TRecHit1DMomConstraint ( const TRecHit1DMomConstraint other)
inlineprivate

Definition at line 84 of file TRecHit1DMomConstraint.h.

84  :
85  charge_( other.charge() ), mom_( other.mom() ),err_( other.err() ), surface_((other.surface())) {}
virtual const Surface * surface() const override

Member Function Documentation

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

Definition at line 56 of file TRecHit1DMomConstraint.h.

References TRecHit1DMomConstraint().

Referenced by KalmanAlignmentTrackRefitter::refitSingleTracklet().

59  {
60  return RecHitPointer( new TRecHit1DMomConstraint( charge, mom, err, surface));
61  }
TRecHit1DMomConstraint(const int charge, const double mom, const double err, const Surface *surface)
Creates the TrackingRecHit internally, avoids redundent cloning.
std::shared_ptr< TrackingRecHit const > RecHitPointer
virtual 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 50 of file TRecHit1DMomConstraint.h.

50 {return false;}
int TRecHit1DMomConstraint::charge ( void  ) const
inline

Definition at line 40 of file TRecHit1DMomConstraint.h.

References charge_.

40 {return charge_;}
virtual RecHitPointer TRecHit1DMomConstraint::clone ( const TrajectoryStateOnSurface ts) const
inlinevirtual

Definition at line 52 of file TRecHit1DMomConstraint.h.

References clone().

Referenced by clone().

52 {return RecHitPointer(clone());}
virtual TRecHit1DMomConstraint * clone() const
std::shared_ptr< TrackingRecHit const > RecHitPointer
virtual TRecHit1DMomConstraint* TRecHit1DMomConstraint::clone ( void  ) const
inlineprivatevirtual

Implements TrackingRecHit.

Definition at line 87 of file TRecHit1DMomConstraint.h.

References TRecHit1DMomConstraint().

87  {
88  return new TRecHit1DMomConstraint(*this);
89  }
TRecHit1DMomConstraint(const int charge, const double mom, const double err, const Surface *surface)
Creates the TrackingRecHit internally, avoids redundent cloning.
virtual TrackingRecHit* TRecHit1DMomConstraint::cloneHit ( ) const
inlinevirtual

Reimplemented from TrackingRecHit.

Definition at line 44 of file TRecHit1DMomConstraint.h.

44 { return 0;}
virtual 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 54 of file TRecHit1DMomConstraint.h.

54 {return 0;}
virtual int TRecHit1DMomConstraint::dimension ( ) const
inlinevirtual

Implements TrackingRecHit.

Definition at line 33 of file TRecHit1DMomConstraint.h.

33 {return 1;}
double TRecHit1DMomConstraint::err ( ) const
inline

Definition at line 39 of file TRecHit1DMomConstraint.h.

References err_.

39 {return err_;}
virtual float TRecHit1DMomConstraint::errorGlobalR ( ) const
inlinevirtual

Reimplemented from TrackingRecHit.

Definition at line 67 of file TRecHit1DMomConstraint.h.

67 { return 0;}
virtual float TRecHit1DMomConstraint::errorGlobalRPhi ( ) const
inlinevirtual

Reimplemented from TrackingRecHit.

Definition at line 69 of file TRecHit1DMomConstraint.h.

69 { return 0; }
virtual float TRecHit1DMomConstraint::errorGlobalZ ( ) const
inlinevirtual

Reimplemented from TrackingRecHit.

Definition at line 68 of file TRecHit1DMomConstraint.h.

68 { return 0; }
virtual GlobalPoint TRecHit1DMomConstraint::globalPosition ( ) const
inlinevirtual

Reimplemented from TrackingRecHit.

Definition at line 65 of file TRecHit1DMomConstraint.h.

65 { return GlobalPoint(); }
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
virtual GlobalError TRecHit1DMomConstraint::globalPositionError ( ) const
inlinevirtual

Reimplemented from TrackingRecHit.

Definition at line 66 of file TRecHit1DMomConstraint.h.

66 { return GlobalError();}
GlobalErrorBase< double, ErrorMatrixTag > GlobalError
Definition: GlobalError.h:12
virtual const TrackingRecHit* TRecHit1DMomConstraint::hit ( void  ) const
inlineoverridevirtual

Reimplemented from TrackingRecHit.

Definition at line 43 of file TRecHit1DMomConstraint.h.

43 {return 0;}//fixme return invalid
virtual LocalPoint TRecHit1DMomConstraint::localPosition ( ) const
inlinevirtual

Implements TrackingRecHit.

Definition at line 35 of file TRecHit1DMomConstraint.h.

35 {return LocalPoint(0,0,0);}
Local3DPoint LocalPoint
Definition: LocalPoint.h:11
virtual LocalError TRecHit1DMomConstraint::localPositionError ( ) const
inlinevirtual

Implements TrackingRecHit.

Definition at line 36 of file TRecHit1DMomConstraint.h.

36 {return LocalError(0,0,0);}
double TRecHit1DMomConstraint::mom ( ) const
inline

Definition at line 38 of file TRecHit1DMomConstraint.h.

References mom_.

38 {return mom_;}
virtual AlgebraicVector TRecHit1DMomConstraint::parameters ( void  ) const
inlinevirtual

Implements TrackingRecHit.

Definition at line 14 of file TRecHit1DMomConstraint.h.

References charge_, mom_, and query::result.

14  {
16  result[0] = charge_/fabs(mom_);
17  return result;
18  }
tuple result
Definition: query.py:137
CLHEP::HepVector AlgebraicVector
virtual AlgebraicSymMatrix TRecHit1DMomConstraint::parametersError ( ) const
inlinevirtual

Implements TrackingRecHit.

Definition at line 20 of file TRecHit1DMomConstraint.h.

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

20  {
22  m[0][0] = err_/(mom_*mom_);//parametersErrors are squared
23  m[0][0] *= m[0][0];
24  return m;
25  }
CLHEP::HepSymMatrix AlgebraicSymMatrix
virtual AlgebraicMatrix TRecHit1DMomConstraint::projectionMatrix ( ) const
inlinevirtual

Implements TrackingRecHit.

Definition at line 27 of file TRecHit1DMomConstraint.h.

References theProjectionMatrix.

27  {
29  theProjectionMatrix = AlgebraicMatrix( 1, 5, 0);
30  theProjectionMatrix[0][0] = 1;
31  return theProjectionMatrix;
32  }
static const AlgebraicMatrix theProjectionMatrix
Definition: CSCSegment.cc:80
CLHEP::HepMatrix AlgebraicMatrix
virtual std::vector<const TrackingRecHit*> TRecHit1DMomConstraint::recHits ( ) const
inlinevirtual

Access to component RecHits (if any)

Implements TrackingRecHit.

Definition at line 46 of file TRecHit1DMomConstraint.h.

46 { return std::vector<const TrackingRecHit*>(); }
virtual std::vector<TrackingRecHit*> TRecHit1DMomConstraint::recHits ( )
inlinevirtual

Non-const access to component RecHits (if any)

Implements TrackingRecHit.

Definition at line 47 of file TRecHit1DMomConstraint.h.

47 { return std::vector<TrackingRecHit*>(); }
virtual bool TRecHit1DMomConstraint::sharesInput ( const TrackingRecHit other,
SharedInputType  what 
) const
inlinevirtual

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

48 { return false;}
virtual const Surface* TRecHit1DMomConstraint::surface ( ) const
inlineoverridevirtual

Reimplemented from TrackingRecHit.

Definition at line 63 of file TRecHit1DMomConstraint.h.

References surface_.

63 {return surface_;}

Member Data Documentation

const int TRecHit1DMomConstraint::charge_
private

Definition at line 73 of file TRecHit1DMomConstraint.h.

Referenced by charge(), and parameters().

const double TRecHit1DMomConstraint::err_
private

Definition at line 75 of file TRecHit1DMomConstraint.h.

Referenced by err(), and parametersError().

const double TRecHit1DMomConstraint::mom_
private

Definition at line 74 of file TRecHit1DMomConstraint.h.

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

const Surface* TRecHit1DMomConstraint::surface_
private

Definition at line 76 of file TRecHit1DMomConstraint.h.

Referenced by surface().