CMS 3D CMS Logo

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

#include <BaseSiTrackerRecHit2DLocalPos.h>

Inheritance diagram for BaseSiTrackerRecHit2DLocalPos:
RecHit2DLocalPos TrackingRecHit

Public Member Functions

 BaseSiTrackerRecHit2DLocalPos ()
 
 BaseSiTrackerRecHit2DLocalPos (const LocalPoint &p, const LocalError &e, DetId id)
 
virtual void getKfComponents (KfComponentsHolder &holder) const
 
bool hasPositionAndError () const
 to be redefined by daughter class More...
 
virtual LocalPoint localPosition () const
 
virtual LocalError localPositionError () const
 
const LocalErrorlocalPositionErrorFast () const
 
const LocalPointlocalPositionFast () const
 
 ~BaseSiTrackerRecHit2DLocalPos ()
 
- Public Member Functions inherited from RecHit2DLocalPos
virtual RecHit2DLocalPosclone () const =0
 
virtual int dimension () const
 
virtual AlgebraicVector parameters () const
 
virtual AlgebraicSymMatrix parametersError () const
 
virtual AlgebraicMatrix projectionMatrix () const
 
 RecHit2DLocalPos (DetId id)
 
 RecHit2DLocalPos (TrackingRecHit::id_type id=0)
 
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 ~RecHit2DLocalPos ()
 
- Public Member Functions inherited from TrackingRecHit
DetId geographicalId () const
 
unsigned int getRTTI () const
 
Type getType () const
 
bool isValid () const
 
id_type rawId () const
 
virtual void recHitsV (std::vector< const TrackingRecHit * > &) const
 
virtual void recHitsV (std::vector< TrackingRecHit * > &)
 
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)
 
Type type () const
 
virtual float weight () const
 
virtual ~TrackingRecHit ()
 

Private Member Functions

void throwExceptionUninitialized (const char *where) const
 

Private Attributes

LocalError err_
 
LocalPoint pos_
 

Additional Inherited Members

- Public Types inherited from RecHit2DLocalPos
typedef GloballyPositioned
< float >::LocalPoint 
LocalPoint
 
- Public Types inherited from TrackingRecHit
typedef unsigned int id_type
 
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 8 of file BaseSiTrackerRecHit2DLocalPos.h.

Constructor & Destructor Documentation

BaseSiTrackerRecHit2DLocalPos::BaseSiTrackerRecHit2DLocalPos ( )
inline

Definition at line 11 of file BaseSiTrackerRecHit2DLocalPos.h.

11 : RecHit2DLocalPos(0) {}
RecHit2DLocalPos(DetId id)
BaseSiTrackerRecHit2DLocalPos::~BaseSiTrackerRecHit2DLocalPos ( )
inline

Definition at line 13 of file BaseSiTrackerRecHit2DLocalPos.h.

13 {}
BaseSiTrackerRecHit2DLocalPos::BaseSiTrackerRecHit2DLocalPos ( const LocalPoint p,
const LocalError e,
DetId  id 
)
inline

Member Function Documentation

void BaseSiTrackerRecHit2DLocalPos::getKfComponents ( KfComponentsHolder holder) const
virtual

Reimplemented from TrackingRecHit.

Definition at line 22 of file BaseSiTrackerRecHit2DLocalPos.cc.

References KfComponentsHolder::doUseProjFunc(), err_, KfComponentsHolder::errors(), hasPositionAndError(), ProjectMatrix< T, N, D >::index, KfComponentsHolder::measuredErrors(), KfComponentsHolder::measuredParams(), KfComponentsHolder::params(), pos_, trackerHitRTTI::proj, KfComponentsHolder::projection(), KfComponentsHolder::projFunc(), throwExceptionUninitialized(), KfComponentsHolder::tsosLocalErrors(), KfComponentsHolder::tsosLocalParameters(), LocalError::xx(), LocalError::xy(), and LocalError::yy().

23 {
24  if (!hasPositionAndError()) throwExceptionUninitialized("getKfComponents");
25  //std::cout << "Call to KfComponentsHolder::genericFill should be optimized here " << std::endl;
26  AlgebraicVector2 & pars = holder.params<2>();
27  pars[0] = pos_.x();
28  pars[1] = pos_.y();
29 
30  AlgebraicSymMatrix22 & errs = holder.errors<2>();
31  errs(0,0) = err_.xx();
32  errs(0,1) = err_.xy();
33  errs(1,1) = err_.yy();
34 
35 
36  AlgebraicMatrix25 & proj = holder.projection<2>();
37  proj(0,3) = 1;
38  proj(1,4) = 1;
39 
40  ProjectMatrix<double,5,2> & pf = holder.projFunc<2>();
41  pf.index[0] = 3;
42  pf.index[1] = 4;
43  holder.doUseProjFunc();
44 
45  holder.measuredParams<2>() = AlgebraicVector2( & holder.tsosLocalParameters().At(3), 2 );
46  holder.measuredErrors<2>() = holder.tsosLocalErrors().Sub<AlgebraicSymMatrix22>( 3, 3 );
47 
48  //std::cout << "======== MYSELF ==========" << std::endl;
49  //holder.dump<2>();
50  //std::cout << "======== GENERIC ==========" << std::endl;
51  //holder.genericFill(*this);
52  //holder.dump<2>();
53 }
float xx() const
Definition: LocalError.h:24
AlgebraicROOTObject< D, D >::SymMatrix & measuredErrors()
ROOT::Math::SMatrix< double, 2, 2, ROOT::Math::MatRepSym< double, 2 > > AlgebraicSymMatrix22
float xy() const
Definition: LocalError.h:25
void throwExceptionUninitialized(const char *where) const
float yy() const
Definition: LocalError.h:26
bool hasPositionAndError() const
to be redefined by daughter class
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:42
AlgebraicROOTObject< D, D >::SymMatrix & errors()
AlgebraicROOTObject< D, 5 >::Matrix & projection()
const AlgebraicSymMatrix55 & tsosLocalErrors() const
ProjectMatrix< double, 5, D > & projFunc()
ROOT::Math::SVector< double, 2 > AlgebraicVector2
bool BaseSiTrackerRecHit2DLocalPos::hasPositionAndError ( ) const
virtual

to be redefined by daughter class

Reimplemented from TrackingRecHit.

Definition at line 5 of file BaseSiTrackerRecHit2DLocalPos.cc.

References err_, pos_, LocalError::xx(), LocalError::xy(), and LocalError::yy().

Referenced by getKfComponents(), localPosition(), and localPositionError().

5  {
6  return (err_.xx() != 0) || (err_.yy() != 0) || (err_.xy() != 0) ||
7  (pos_.x() != 0) || (pos_.y() != 0) || (pos_.z() != 0);
8 }
float xx() const
Definition: LocalError.h:24
float xy() const
Definition: LocalError.h:25
float yy() const
Definition: LocalError.h:26
LocalPoint BaseSiTrackerRecHit2DLocalPos::localPosition ( ) const
virtual

Implements RecHit2DLocalPos.

Definition at line 10 of file BaseSiTrackerRecHit2DLocalPos.cc.

References hasPositionAndError(), pos_, and throwExceptionUninitialized().

10  {
11  if (!hasPositionAndError()) throwExceptionUninitialized("localPosition");
12  return pos_;
13 }
void throwExceptionUninitialized(const char *where) const
bool hasPositionAndError() const
to be redefined by daughter class
LocalError BaseSiTrackerRecHit2DLocalPos::localPositionError ( ) const
virtual

Implements RecHit2DLocalPos.

Definition at line 15 of file BaseSiTrackerRecHit2DLocalPos.cc.

References err_, hasPositionAndError(), and throwExceptionUninitialized().

15  {
16  if (!hasPositionAndError()) throwExceptionUninitialized("localPositionError");
17  return err_;
18 }
void throwExceptionUninitialized(const char *where) const
bool hasPositionAndError() const
to be redefined by daughter class
const LocalError& BaseSiTrackerRecHit2DLocalPos::localPositionErrorFast ( ) const
inline

Definition at line 29 of file BaseSiTrackerRecHit2DLocalPos.h.

References err_.

const LocalPoint& BaseSiTrackerRecHit2DLocalPos::localPositionFast ( ) const
inline

Definition at line 28 of file BaseSiTrackerRecHit2DLocalPos.h.

References pos_.

void BaseSiTrackerRecHit2DLocalPos::throwExceptionUninitialized ( const char *  where) const
private

Definition at line 56 of file BaseSiTrackerRecHit2DLocalPos.cc.

References edm::hlt::Exception.

Referenced by getKfComponents(), localPosition(), and localPositionError().

57 {
58  throw cms::Exception("BaseSiTrackerRecHit2DLocalPos") <<
59  "Trying to access " << where << " for a RecHit that was read from disk, but since CMSSW_2_1_X local positions are transient.\n" <<
60  "If you want to get coarse position/error estimation from disk, please set: ComputeCoarseLocalPositionFromDisk = True \n " <<
61  " to the TransientTrackingRecHitBuilder you are using from RecoTracker/TransientTrackingRecHit/python/TTRHBuilders_cff.py";
62 }

Member Data Documentation

LocalError BaseSiTrackerRecHit2DLocalPos::err_
private
LocalPoint BaseSiTrackerRecHit2DLocalPos::pos_
private