#include <BaseSiTrackerRecHit2DLocalPos.h>
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 | |
virtual LocalPoint | localPosition () const |
virtual LocalError | localPositionError () const |
const LocalError & | localPositionErrorFast () const |
const LocalPoint & | localPositionFast () const |
~BaseSiTrackerRecHit2DLocalPos () | |
Private Member Functions | |
void | throwExceptionUninitialized (const char *where) const |
Private Attributes | |
LocalError | err_ |
LocalPoint | pos_ |
Definition at line 8 of file BaseSiTrackerRecHit2DLocalPos.h.
BaseSiTrackerRecHit2DLocalPos::BaseSiTrackerRecHit2DLocalPos | ( | ) | [inline] |
Definition at line 11 of file BaseSiTrackerRecHit2DLocalPos.h.
: RecHit2DLocalPos(0) {}
BaseSiTrackerRecHit2DLocalPos::~BaseSiTrackerRecHit2DLocalPos | ( | ) | [inline] |
Definition at line 13 of file BaseSiTrackerRecHit2DLocalPos.h.
{}
BaseSiTrackerRecHit2DLocalPos::BaseSiTrackerRecHit2DLocalPos | ( | const LocalPoint & | p, |
const LocalError & | e, | ||
DetId | id | ||
) | [inline] |
Definition at line 15 of file BaseSiTrackerRecHit2DLocalPos.h.
: RecHit2DLocalPos(id), pos_(p), err_(e){}
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().
{ if (!hasPositionAndError()) throwExceptionUninitialized("getKfComponents"); //std::cout << "Call to KfComponentsHolder::genericFill should be optimized here " << std::endl; AlgebraicVector2 & pars = holder.params<2>(); pars[0] = pos_.x(); pars[1] = pos_.y(); AlgebraicSymMatrix22 & errs = holder.errors<2>(); errs(0,0) = err_.xx(); errs(0,1) = err_.xy(); errs(1,1) = err_.yy(); AlgebraicMatrix25 & proj = holder.projection<2>(); proj(0,3) = 1; proj(1,4) = 1; ProjectMatrix<double,5,2> & pf = holder.projFunc<2>(); pf.index[0] = 3; pf.index[1] = 4; holder.doUseProjFunc(); holder.measuredParams<2>() = AlgebraicVector2( & holder.tsosLocalParameters().At(3), 2 ); holder.measuredErrors<2>() = holder.tsosLocalErrors().Sub<AlgebraicSymMatrix22>( 3, 3 ); //std::cout << "======== MYSELF ==========" << std::endl; //holder.dump<2>(); //std::cout << "======== GENERIC ==========" << std::endl; //holder.genericFill(*this); //holder.dump<2>(); }
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().
LocalPoint BaseSiTrackerRecHit2DLocalPos::localPosition | ( | ) | const [virtual] |
Implements RecHit2DLocalPos.
Definition at line 10 of file BaseSiTrackerRecHit2DLocalPos.cc.
References hasPositionAndError(), pos_, and throwExceptionUninitialized().
{ if (!hasPositionAndError()) throwExceptionUninitialized("localPosition"); return pos_; }
LocalError BaseSiTrackerRecHit2DLocalPos::localPositionError | ( | ) | const [virtual] |
Implements RecHit2DLocalPos.
Definition at line 15 of file BaseSiTrackerRecHit2DLocalPos.cc.
References err_, hasPositionAndError(), and throwExceptionUninitialized().
{ if (!hasPositionAndError()) throwExceptionUninitialized("localPositionError"); return err_; }
const LocalError& BaseSiTrackerRecHit2DLocalPos::localPositionErrorFast | ( | ) | const [inline] |
const LocalPoint& BaseSiTrackerRecHit2DLocalPos::localPositionFast | ( | ) | const [inline] |
void BaseSiTrackerRecHit2DLocalPos::throwExceptionUninitialized | ( | const char * | where | ) | const [private] |
Definition at line 56 of file BaseSiTrackerRecHit2DLocalPos.cc.
References Exception.
Referenced by getKfComponents(), localPosition(), and localPositionError().
{ throw cms::Exception("BaseSiTrackerRecHit2DLocalPos") << "Trying to access " << where << " for a RecHit that was read from disk, but since CMSSW_2_1_X local positions are transient.\n" << "If you want to get coarse position/error estimation from disk, please set: ComputeCoarseLocalPositionFromDisk = True \n " << " to the TransientTrackingRecHitBuilder you are using from RecoTracker/TransientTrackingRecHit/python/TTRHBuilders_cff.py"; }
Definition at line 36 of file BaseSiTrackerRecHit2DLocalPos.h.
Referenced by getKfComponents(), hasPositionAndError(), localPositionError(), and localPositionErrorFast().
Definition at line 35 of file BaseSiTrackerRecHit2DLocalPos.h.
Referenced by getKfComponents(), hasPositionAndError(), localPosition(), and localPositionFast().