CMS 3D CMS Logo

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

#include <BaseTrackerRecHit.h>

Inheritance diagram for BaseTrackerRecHit:
TrackingRecHit GCC11_FINAL< T, TOPO > GSSiTrackerRecHit2DLocalPos SiTrackerMultiRecHit TrackerSingleRecHit SiTrackerGSMatchedRecHit2D SiTrackerGSRecHit2D GCC11_FINAL< T, TOPO > GCC11_FINAL< T, TOPO > GCC11_FINAL< T, TOPO > GCC11_FINAL< T, TOPO >

Public Member Functions

 BaseTrackerRecHit ()
 
 BaseTrackerRecHit (DetId id, trackerHitRTTI::RTTI rt)
 
 BaseTrackerRecHit (const LocalPoint &p, const LocalError &e, GeomDet const &idet, trackerHitRTTI::RTTI rt)
 
virtual float clusterProbability () const
 cluster probability, overloaded by pixel rechits. More...
 
virtual int dimension () const =0
 
float errorGlobalR () const GCC11_FINAL
 
float errorGlobalRPhi () const GCC11_FINAL
 
float errorGlobalZ () const GCC11_FINAL
 
virtual OmniClusterRef const & firstClusterRef () const =0
 
virtual void getKfComponents (KfComponentsHolder &holder) const =0
 
void getKfComponents1D (KfComponentsHolder &holder) const
 
void getKfComponents2D (KfComponentsHolder &holder) const
 
virtual GlobalPoint globalPosition () const GCC11_FINAL
 
GlobalError globalPositionError () const GCC11_FINAL
 
TrackingRecHitGlobalState globalState () const
 
bool hasPositionAndError () const GCC11_FINAL
 to be redefined by daughter class More...
 
BaseTrackerRecHit const * hit () const GCC11_FINAL
 
bool isMatched () const
 
bool isMulti () const
 
virtual bool isPixel () const
 
bool isProjected () const
 
bool isProjMono () const
 
bool isProjSterep () const
 
bool isSingle () const
 
virtual LocalPoint localPosition () const GCC11_FINAL
 
virtual LocalError localPositionError () const GCC11_FINAL
 
const LocalErrorlocalPositionErrorFast () const
 
const LocalPointlocalPositionFast () const
 
virtual AlgebraicVector parameters () const
 
virtual AlgebraicSymMatrix parametersError () const
 
virtual AlgebraicMatrix projectionMatrix () const
 
trackerHitRTTI::RTTI rtti () const
 
bool sameDetModule (TrackingRecHit const &hit) const
 
virtual const Surfacesurface () const GCC11_FINAL
 
virtual ~BaseTrackerRecHit ()
 
- Public Member Functions inherited from TrackingRecHit
virtual bool canImproveWithTrack () const
 
virtual TrackingRecHitclone () const =0
 
RecHitPointer cloneForFit (const GeomDet &idet) const
 
virtual TrackingRecHitcloneHit () const
 
virtual RecHitPointer cloneSH () const
 
const GeomDetdet () const
 
virtual const GeomDetUnitdetUnit () const
 
DetId geographicalId () const
 
unsigned int getRTTI () const
 
Type getType () const
 
bool isValid () const
 
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 * > &)
 
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 ()
 

Protected Attributes

unsigned int qualWord_
 

Static Private Member Functions

static void check ()
 

Private Attributes

LocalError err_
 
LocalPoint pos_
 

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 }
 
- 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 33 of file BaseTrackerRecHit.h.

Constructor & Destructor Documentation

BaseTrackerRecHit::BaseTrackerRecHit ( )
inline

Definition at line 35 of file BaseTrackerRecHit.h.

35 : qualWord_(0){}
unsigned int qualWord_
virtual BaseTrackerRecHit::~BaseTrackerRecHit ( )
inlinevirtual

Definition at line 40 of file BaseTrackerRecHit.h.

40 {}
BaseTrackerRecHit::BaseTrackerRecHit ( DetId  id,
trackerHitRTTI::RTTI  rt 
)
inline

Definition at line 43 of file BaseTrackerRecHit.h.

43 : TrackingRecHit(id,(unsigned int)(rt)) {}
TrackingRecHit(DetId id, Type type=valid)
BaseTrackerRecHit::BaseTrackerRecHit ( const LocalPoint p,
const LocalError e,
GeomDet const &  idet,
trackerHitRTTI::RTTI  rt 
)
inline

Definition at line 45 of file BaseTrackerRecHit.h.

References TrackingRecHit::det(), err_, GeomDet::localAlignmentError(), LocalError::valid(), LocalError::xx(), LocalError::xy(), and LocalError::yy().

46  :
47  TrackingRecHit(idet, (unsigned int)(rt)), pos_(p), err_(e){
49  if (lape.valid())
50  err_ = LocalError(err_.xx()+lape.xx(),
51  err_.xy()+lape.xy(),
52  err_.yy()+lape.yy()
53  );
54  }
bool valid() const
Definition: LocalError.h:21
float xx() const
Definition: LocalError.h:24
float xy() const
Definition: LocalError.h:25
float yy() const
Definition: LocalError.h:26
const GeomDet * det() const
LocalError const & localAlignmentError() const
Return local alligment error.
Definition: GeomDet.h:78
TrackingRecHit(DetId id, Type type=valid)

Member Function Documentation

static void BaseTrackerRecHit::check ( )
inlinestaticprivate
virtual float BaseTrackerRecHit::clusterProbability ( ) const
inlinevirtual

cluster probability, overloaded by pixel rechits.

Definition at line 123 of file BaseTrackerRecHit.h.

123 { return 1.f; }
virtual int BaseTrackerRecHit::dimension ( ) const
pure virtual
float BaseTrackerRecHit::errorGlobalR ( ) const
inlinevirtual

Reimplemented from TrackingRecHit.

Reimplemented in GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, and GCC11_FINAL< T, TOPO >.

Definition at line 103 of file BaseTrackerRecHit.h.

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

103 { return std::sqrt(globalPositionError().rerr(globalPosition()));}
GlobalError globalPositionError() const GCC11_FINAL
T sqrt(T t)
Definition: SSEVec.h:48
virtual GlobalPoint globalPosition() const GCC11_FINAL
float BaseTrackerRecHit::errorGlobalRPhi ( ) const
inlinevirtual

Reimplemented from TrackingRecHit.

Reimplemented in GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, and GCC11_FINAL< T, TOPO >.

Definition at line 105 of file BaseTrackerRecHit.h.

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

105 { return globalPosition().perp()*sqrt(globalPositionError().phierr(globalPosition())); }
T perp() const
Definition: PV3DBase.h:72
GlobalError globalPositionError() const GCC11_FINAL
T sqrt(T t)
Definition: SSEVec.h:48
virtual GlobalPoint globalPosition() const GCC11_FINAL
float BaseTrackerRecHit::errorGlobalZ ( ) const
inlinevirtual

Reimplemented from TrackingRecHit.

Reimplemented in GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, and GCC11_FINAL< T, TOPO >.

Definition at line 104 of file BaseTrackerRecHit.h.

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

104 { return std::sqrt(globalPositionError().czz()); }
GlobalError globalPositionError() const GCC11_FINAL
T sqrt(T t)
Definition: SSEVec.h:48
virtual OmniClusterRef const& BaseTrackerRecHit::firstClusterRef ( ) const
pure virtual
virtual void BaseTrackerRecHit::getKfComponents ( KfComponentsHolder holder) const
pure virtual
void BaseTrackerRecHit::getKfComponents1D ( KfComponentsHolder holder) const

Definition at line 39 of file BaseTrackerRecHit.cc.

References err_, KfComponentsHolder::errors(), KfComponentsHolder::measuredErrors(), KfComponentsHolder::measuredParams(), KfComponentsHolder::params(), pos_, KfComponentsHolder::projection(), KfComponentsHolder::tsosLocalErrors(), KfComponentsHolder::tsosLocalParameters(), PV3DBase< T, PVType, FrameType >::x(), and LocalError::xx().

Referenced by GCC11_FINAL< T, TOPO >::getKfComponents().

40 {
41  // if (!hasPositionAndError()) throwExceptionUninitialized("getKfComponents");
42  AlgebraicVector1 & pars = holder.params<1>();
43  pars[0] = pos_.x();
44 
45  AlgebraicSymMatrix11 & errs = holder.errors<1>();
46  errs(0,0) = err_.xx();
47 
48  AlgebraicMatrix15 & proj = holder.projection<1>();
49  proj(0,3) = 1;
50 
51  holder.measuredParams<1>() = AlgebraicVector1( holder.tsosLocalParameters().At(3) );
52  holder.measuredErrors<1>() = holder.tsosLocalErrors().Sub<AlgebraicSymMatrix11>( 3, 3 );
53 }
float xx() const
Definition: LocalError.h:24
AlgebraicROOTObject< D, D >::SymMatrix & measuredErrors()
ROOT::Math::SVector< double, 1 > AlgebraicVector1
ROOT::Math::SMatrix< double, 1, 5, ROOT::Math::MatRepStd< double, 1, 5 > > AlgebraicMatrix15
AlgebraicROOTObject< D >::Vector & params()
const AlgebraicVector5 & tsosLocalParameters() const
AlgebraicROOTObject< D >::Vector & measuredParams()
AlgebraicROOTObject< D, D >::SymMatrix & errors()
AlgebraicROOTObject< D, 5 >::Matrix & projection()
T x() const
Definition: PV3DBase.h:62
const AlgebraicSymMatrix55 & tsosLocalErrors() const
ROOT::Math::SMatrix< double, 1, 1, ROOT::Math::MatRepSym< double, 1 > > AlgebraicSymMatrix11
void BaseTrackerRecHit::getKfComponents2D ( KfComponentsHolder holder) const

Definition at line 56 of file BaseTrackerRecHit.cc.

References KfComponentsHolder::doUseProjFunc(), err_, KfComponentsHolder::errors(), ProjectMatrix< T, N, D >::index, KfComponentsHolder::measuredErrors(), KfComponentsHolder::measuredParams(), KfComponentsHolder::params(), pos_, KfComponentsHolder::projection(), KfComponentsHolder::projFunc(), KfComponentsHolder::tsosLocalErrors(), KfComponentsHolder::tsosLocalParameters(), PV3DBase< T, PVType, FrameType >::x(), LocalError::xx(), LocalError::xy(), PV3DBase< T, PVType, FrameType >::y(), and LocalError::yy().

Referenced by GSSiTrackerRecHit2DLocalPos::getKfComponents(), SiTrackerMultiRecHit::getKfComponents(), and GCC11_FINAL< T, TOPO >::getKfComponents().

57 {
58  //if (!hasPositionAndError()) throwExceptionUninitialized("getKfComponents");
59  AlgebraicVector2 & pars = holder.params<2>();
60  pars[0] = pos_.x();
61  pars[1] = pos_.y();
62 
63  AlgebraicSymMatrix22 & errs = holder.errors<2>();
64  errs(0,0) = err_.xx();
65  errs(0,1) = err_.xy();
66  errs(1,1) = err_.yy();
67 
68 
69  AlgebraicMatrix25 & proj = holder.projection<2>();
70  proj(0,3) = 1;
71  proj(1,4) = 1;
72 
73  ProjectMatrix<double,5,2> & pf = holder.projFunc<2>();
74  pf.index[0] = 3;
75  pf.index[1] = 4;
76  holder.doUseProjFunc();
77 
78  holder.measuredParams<2>() = AlgebraicVector2( & holder.tsosLocalParameters().At(3), 2 );
79  holder.measuredErrors<2>() = holder.tsosLocalErrors().Sub<AlgebraicSymMatrix22>( 3, 3 );
80 
81 }
float xx() const
Definition: LocalError.h:24
AlgebraicROOTObject< D, D >::SymMatrix & measuredErrors()
ROOT::Math::SMatrix< double, 2, 2, ROOT::Math::MatRepSym< double, 2 > > AlgebraicSymMatrix22
T y() const
Definition: PV3DBase.h:63
float xy() const
Definition: LocalError.h:25
float yy() const
Definition: LocalError.h:26
AlgebraicROOTObject< D >::Vector & params()
const AlgebraicVector5 & tsosLocalParameters() const
AlgebraicROOTObject< D >::Vector & measuredParams()
ROOT::Math::SMatrix< double, 2, 5, ROOT::Math::MatRepStd< double, 2, 5 > > AlgebraicMatrix25
unsigned int index[D]
Definition: ProjectMatrix.h:43
AlgebraicROOTObject< D, D >::SymMatrix & errors()
AlgebraicROOTObject< D, 5 >::Matrix & projection()
T x() const
Definition: PV3DBase.h:62
const AlgebraicSymMatrix55 & tsosLocalErrors() const
ProjectMatrix< double, 5, D > & projFunc()
ROOT::Math::SVector< double, 2 > AlgebraicVector2
virtual GlobalPoint BaseTrackerRecHit::globalPosition ( ) const
inlinevirtual

Reimplemented from TrackingRecHit.

Reimplemented in GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, and GCC11_FINAL< T, TOPO >.

Definition at line 98 of file BaseTrackerRecHit.h.

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

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

98  {
99  return surface()->toGlobal(localPosition());
100  }
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
Definition: Surface.h:114
virtual const Surface * surface() const GCC11_FINAL
virtual LocalPoint localPosition() const GCC11_FINAL
GlobalError BaseTrackerRecHit::globalPositionError ( ) const
inlinevirtual

Reimplemented from TrackingRecHit.

Reimplemented in GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, and GCC11_FINAL< T, TOPO >.

Definition at line 102 of file BaseTrackerRecHit.h.

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

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

static GlobalError transform(const LocalError &le, const Surface &surf)
virtual LocalError localPositionError() const GCC11_FINAL
virtual const Surface * surface() const GCC11_FINAL
TrackingRecHitGlobalState BaseTrackerRecHit::globalState ( ) const
inline

Definition at line 108 of file BaseTrackerRecHit.h.

References PV3DBase< T, PVType, FrameType >::barePhi(), PV3DBase< T, PVType, FrameType >::basicVector(), GlobalErrorBase< T, ErrorWeightType >::czz(), globalPosition(), localPositionError(), PV3DBase< T, PVType, FrameType >::perp(), GlobalErrorBase< T, ErrorWeightType >::phierr(), alignCSCRings::r, GlobalErrorBase< T, ErrorWeightType >::rerr(), mathSSE::sqrt(), surface(), and ErrorFrameTransformer::transform().

108  {
109  GlobalError
112  float r = gp.perp();
113  float errorRPhi = r*std::sqrt(float(globalError.phierr(gp)));
114  float errorR = std::sqrt(float(globalError.rerr(gp)));
115  float errorZ = std::sqrt(float(globalError.czz()));
116  return (TrackingRecHitGlobalState){
117  gp.basicVector(), r, gp.barePhi(),
118  errorR,errorZ,errorRPhi
119  };
120  }
static GlobalError transform(const LocalError &le, const Surface &surf)
T perp() const
Definition: PV3DBase.h:72
T phierr(const GlobalPoint &aPoint) const
T barePhi() const
Definition: PV3DBase.h:68
virtual LocalError localPositionError() const GCC11_FINAL
T sqrt(T t)
Definition: SSEVec.h:48
virtual const Surface * surface() const GCC11_FINAL
T rerr(const GlobalPoint &aPoint) const
virtual GlobalPoint globalPosition() const GCC11_FINAL
const BasicVectorType & basicVector() const
Definition: PV3DBase.h:56
bool BaseTrackerRecHit::hasPositionAndError ( ) const
virtual

to be redefined by daughter class

Reimplemented from TrackingRecHit.

Definition at line 29 of file BaseTrackerRecHit.cc.

References TrackingRecHit::det().

29  {
30  return det();
31 
32  // return (err_.xx() != 0) || (err_.yy() != 0) || (err_.xy() != 0) ||
33  // (pos_.x() != 0) || (pos_.y() != 0) || (pos_.z() != 0);
34 }
const GeomDet * det() const
BaseTrackerRecHit const* BaseTrackerRecHit::hit ( void  ) const
inlinevirtual
bool BaseTrackerRecHit::isMatched ( ) const
inline

Definition at line 58 of file BaseTrackerRecHit.h.

References trackerHitRTTI::isMatched().

58 { return trackerHitRTTI::isMatched(*this);}
bool isMatched(TrackingRecHit const &hit)
bool BaseTrackerRecHit::isMulti ( ) const
inline

Definition at line 62 of file BaseTrackerRecHit.h.

References trackerHitRTTI::isMulti().

62 { return trackerHitRTTI::isMulti(*this);}
bool isMulti(TrackingRecHit const &hit)
virtual bool BaseTrackerRecHit::isPixel ( ) const
inlinevirtual

Reimplemented in GCC11_FINAL< T, TOPO >.

Definition at line 64 of file BaseTrackerRecHit.h.

64 { return false;}
bool BaseTrackerRecHit::isProjected ( ) const
inline

Definition at line 59 of file BaseTrackerRecHit.h.

References trackerHitRTTI::isProjected().

59 { return trackerHitRTTI::isProjected(*this);}
bool isProjected(TrackingRecHit const &hit)
bool BaseTrackerRecHit::isProjMono ( ) const
inline

Definition at line 60 of file BaseTrackerRecHit.h.

References trackerHitRTTI::isProjMono().

60 { return trackerHitRTTI::isProjMono(*this);}
bool isProjMono(TrackingRecHit const &hit)
bool BaseTrackerRecHit::isProjSterep ( ) const
inline

Definition at line 61 of file BaseTrackerRecHit.h.

References trackerHitRTTI::isProjStereo().

61 { return trackerHitRTTI::isProjStereo(*this);}
bool isProjStereo(TrackingRecHit const &hit)
bool BaseTrackerRecHit::isSingle ( ) const
inline

Definition at line 57 of file BaseTrackerRecHit.h.

References trackerHitRTTI::isSingle().

57 { return trackerHitRTTI::isSingle(*this);}
bool isSingle(TrackingRecHit const &hit)
virtual LocalPoint BaseTrackerRecHit::localPosition ( ) const
inlinevirtual
virtual LocalError BaseTrackerRecHit::localPositionError ( ) const
inlinevirtual
const LocalError& BaseTrackerRecHit::localPositionErrorFast ( ) const
inline

Definition at line 81 of file BaseTrackerRecHit.h.

References check(), and err_.

81 { check(); return err_; }
const LocalPoint& BaseTrackerRecHit::localPositionFast ( ) const
inline

Definition at line 80 of file BaseTrackerRecHit.h.

References check(), and pos_.

80 { check(); return pos_; }
AlgebraicVector BaseTrackerRecHit::parameters ( void  ) const
virtual
AlgebraicSymMatrix BaseTrackerRecHit::parametersError ( ) const
virtual

Implements TrackingRecHit.

Reimplemented in GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, and GCC11_FINAL< T, TOPO >.

Definition at line 89 of file BaseTrackerRecHit.cc.

89  {
90  obsolete();
91  return AlgebraicSymMatrix();
92 }
CLHEP::HepSymMatrix AlgebraicSymMatrix
AlgebraicMatrix BaseTrackerRecHit::projectionMatrix ( ) const
virtual

Implements TrackingRecHit.

Reimplemented in GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, GCC11_FINAL< T, TOPO >, and GCC11_FINAL< T, TOPO >.

Definition at line 95 of file BaseTrackerRecHit.cc.

95  {
96  obsolete();
97  return AlgebraicMatrix();
98 }
CLHEP::HepMatrix AlgebraicMatrix
trackerHitRTTI::RTTI BaseTrackerRecHit::rtti ( ) const
inline

Definition at line 56 of file BaseTrackerRecHit.h.

References trackerHitRTTI::rtti().

56 { return trackerHitRTTI::rtti(*this);}
RTTI rtti(TrackingRecHit const &hit)
bool BaseTrackerRecHit::sameDetModule ( TrackingRecHit const &  hit) const
inline

Definition at line 152 of file BaseTrackerRecHit.h.

References TrackingRecHit::geographicalId(), TrackingRecHit::isValid(), DetId::kSubdetOffset, and DetId::rawId().

Referenced by TrackerSingleRecHit::sharesInput().

152  {
153  unsigned int myid = geographicalId().rawId();
154  unsigned int mysubd = myid >> (DetId::kSubdetOffset);
155 
156  unsigned int id = hit.geographicalId().rawId();
157  unsigned int subd = id >> (DetId::kSubdetOffset);
158 
159  if (mysubd!=subd) return false;
160 
161  //Protection against invalid hits
162  if(!hit.isValid()) return false;
163 
164  const unsigned int limdet = 10; // TIB=11
165 
166  if (mysubd>limdet) { // strip
167  // mask glue and stereo
168  myid|=3;
169  id|=3;
170  }
171  return id==myid;
172 
173 }
static const int kSubdetOffset
Definition: DetId.h:21
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
DetId geographicalId() const
virtual const Surface* BaseTrackerRecHit::surface ( ) const
inlinevirtual

Member Data Documentation

LocalError BaseTrackerRecHit::err_
private
LocalPoint BaseTrackerRecHit::pos_
private
unsigned int BaseTrackerRecHit::qualWord_
protected

Definition at line 148 of file BaseTrackerRecHit.h.