#include <KfComponentsHolder.h>
Public Member Functions | |
void | doUseProjFunc () |
template<unsigned int D> | |
void | dump () |
template<unsigned int D> | |
AlgebraicROOTObject< D, D > ::SymMatrix & | errors () |
void | genericFill (const TrackingRecHit &hit) |
Fill in datamembers from a generic TrackingRecHit using the CLHEP matrices. | |
KfComponentsHolder () | |
template<unsigned int D> | |
AlgebraicROOTObject< D, D > ::SymMatrix & | measuredErrors () |
template<unsigned int D> | |
AlgebraicROOTObject< D >::Vector & | measuredParams () |
template<unsigned int D> | |
AlgebraicROOTObject< D >::Vector & | params () |
template<unsigned int D> | |
AlgebraicROOTObject< D, 5 > ::Matrix & | projection () |
template<unsigned int D> | |
ProjectMatrix< double, 5, D > & | projFunc () |
template<unsigned int D> | |
void | setup (typename AlgebraicROOTObject< D >::Vector *params, typename AlgebraicROOTObject< D, D >::SymMatrix *errors, typename AlgebraicROOTObject< D, 5 >::Matrix *projection, ProjectMatrix< double, 5, D > *projFunc, typename AlgebraicROOTObject< D >::Vector *measuredParams, typename AlgebraicROOTObject< D, D >::SymMatrix *measuredErrors, const AlgebraicVector5 &tsosLocalParameters, const AlgebraicSymMatrix55 &tsosLocalErrors) |
template<unsigned int D> | |
void | setup (typename AlgebraicROOTObject< D >::Vector *params, typename AlgebraicROOTObject< D, D >::SymMatrix *errors, typename AlgebraicROOTObject< D, 5 >::Matrix *projection, typename AlgebraicROOTObject< D >::Vector *measuredParams, typename AlgebraicROOTObject< D, D >::SymMatrix *measuredErrors, const AlgebraicVector5 &tsosLocalParameters, const AlgebraicSymMatrix55 &tsosLocalErrors) |
const AlgebraicSymMatrix55 & | tsosLocalErrors () const |
const AlgebraicVector5 & | tsosLocalParameters () const |
bool | useProjFunc () const |
Private Member Functions | |
template<unsigned int D> | |
void | genericFill_ (const TrackingRecHit &hit) |
Private Attributes | |
void * | errors_ |
void * | measuredErrors_ |
void * | measuredParams_ |
void * | params_ |
void * | projection_ |
void * | projFunc_ |
uint16_t | size_ |
const AlgebraicSymMatrix55 * | tsosLocalErrors_ |
const AlgebraicVector5 * | tsosLocalParameters_ |
bool | useProjFunc_ |
Definition at line 13 of file KfComponentsHolder.h.
KfComponentsHolder::KfComponentsHolder | ( | ) | [inline] |
Definition at line 15 of file KfComponentsHolder.h.
References size_.
: params_(0), errors_(0), projection_(0), useProjFunc_(false) { #ifdef Debug_KfComponentsHolder size_ = 0; #endif }
void KfComponentsHolder::doUseProjFunc | ( | ) | [inline] |
Definition at line 103 of file KfComponentsHolder.h.
References useProjFunc_.
Referenced by BaseSiTrackerRecHit2DLocalPos::getKfComponents(), and BaseTrackerRecHit::getKfComponents2D().
{ useProjFunc_ = true; }
void KfComponentsHolder::dump | ( | void | ) |
Definition at line 176 of file KfComponentsHolder.h.
References gather_cfg::cout, tsosLocalErrors(), and tsosLocalParameters().
{ using namespace std; cout << "Params my: " << params<D>() << endl; cout << " tsos: " << tsosLocalParameters() << endl; cout << " meas: " << measuredParams<D>() << endl; cout << "Errors my:\n" << errors<D>() << endl; cout << " tsos:\n" << tsosLocalErrors() << endl; cout << " meas:\n" << measuredErrors<D>() << endl; cout << "Projection:\n" << projection<D>() << endl; }
AlgebraicROOTObject<D,D>::SymMatrix& KfComponentsHolder::errors | ( | ) | [inline] |
Definition at line 57 of file KfComponentsHolder.h.
References funct::D, errors_, and size_.
Referenced by BaseSiTrackerRecHit2DLocalPos::getKfComponents(), HelpertRecHit2DLocalPos::getKfComponents(), GSSiTrackerRecHit2DLocalPos::getKfComponents(), BaseTrackerRecHit::getKfComponents1D(), BaseTrackerRecHit::getKfComponents2D(), and setup().
{ #ifdef Debug_KfComponentsHolder assert(size_ == D); #endif return * reinterpret_cast<typename AlgebraicROOTObject<D,D>::SymMatrix *>(errors_); }
void KfComponentsHolder::genericFill | ( | const TrackingRecHit & | hit | ) |
Fill in datamembers from a generic TrackingRecHit using the CLHEP matrices.
Definition at line 22 of file KfComponentsHolder.cc.
References TrackingRecHit::dimension(), Exception, and mergeVDriftHistosByStation::name.
Referenced by TrackingRecHit::getKfComponents().
{ switch (hit.dimension()) { case 1: genericFill_<1>(hit); break; case 2: genericFill_<2>(hit); break; case 3: genericFill_<3>(hit); break; case 4: genericFill_<4>(hit); break; case 5: genericFill_<5>(hit); break; default: throw cms::Exception("Rec hit of invalid dimension (not 1,2,3,4,5)") << "The dimension was " << hit.dimension() << ", type is " << typeid(hit).name() << "\n"; } }
void KfComponentsHolder::genericFill_ | ( | const TrackingRecHit & | hit | ) | [private] |
Definition at line 7 of file KfComponentsHolder.cc.
References TrackingRecHit::parameters(), TrackingRecHit::parametersError(), TrackingRecHit::projectionMatrix(), tsosLocalErrors_, and tsosLocalParameters_.
{ typedef typename AlgebraicROOTObject<D,5>::Matrix MatD5; typedef typename AlgebraicROOTObject<D,D>::SymMatrix SMatDD; typedef typename AlgebraicROOTObject<D>::Vector VecD; params<D>() = asSVector<D>(hit.parameters()); errors<D>() = asSMatrix<D>(hit.parametersError()); projection<D>() = asSMatrix<D,5>(hit.projectionMatrix()); const MatD5 & H = projection<D>(); measuredParams<D>() = H * (*tsosLocalParameters_); measuredErrors<D>() = ROOT::Math::Similarity(H, (*tsosLocalErrors_)); }
AlgebraicROOTObject<D,D>::SymMatrix& KfComponentsHolder::measuredErrors | ( | ) | [inline] |
Definition at line 92 of file KfComponentsHolder.h.
References funct::D, measuredErrors_, and size_.
Referenced by BaseSiTrackerRecHit2DLocalPos::getKfComponents(), GSSiTrackerRecHit2DLocalPos::getKfComponents(), BaseTrackerRecHit::getKfComponents1D(), BaseTrackerRecHit::getKfComponents2D(), and setup().
{ #ifdef Debug_KfComponentsHolder assert(size_ == D); #endif return * reinterpret_cast<typename AlgebraicROOTObject<D,D>::SymMatrix *>(measuredErrors_); }
AlgebraicROOTObject<D>::Vector& KfComponentsHolder::measuredParams | ( | ) | [inline] |
Definition at line 84 of file KfComponentsHolder.h.
References funct::D, measuredParams_, and size_.
Referenced by BaseSiTrackerRecHit2DLocalPos::getKfComponents(), GSSiTrackerRecHit2DLocalPos::getKfComponents(), BaseTrackerRecHit::getKfComponents1D(), BaseTrackerRecHit::getKfComponents2D(), and setup().
{ #ifdef Debug_KfComponentsHolder assert(size_ == D); #endif return * reinterpret_cast<typename AlgebraicROOTObject<D>::Vector *>(measuredParams_); }
AlgebraicROOTObject<D>::Vector& KfComponentsHolder::params | ( | ) | [inline] |
Definition at line 49 of file KfComponentsHolder.h.
References funct::D, params_, and size_.
Referenced by BaseSiTrackerRecHit2DLocalPos::getKfComponents(), GSSiTrackerRecHit2DLocalPos::getKfComponents(), BaseTrackerRecHit::getKfComponents1D(), BaseTrackerRecHit::getKfComponents2D(), and setup().
{ #ifdef Debug_KfComponentsHolder assert(size_ == D); #endif return * reinterpret_cast<typename AlgebraicROOTObject<D>::Vector *>(params_); }
AlgebraicROOTObject<D,5>::Matrix& KfComponentsHolder::projection | ( | ) | [inline] |
Definition at line 65 of file KfComponentsHolder.h.
References funct::D, projection_, and size_.
Referenced by BaseSiTrackerRecHit2DLocalPos::getKfComponents(), GSSiTrackerRecHit2DLocalPos::getKfComponents(), BaseTrackerRecHit::getKfComponents1D(), BaseTrackerRecHit::getKfComponents2D(), and setup().
{ #ifdef Debug_KfComponentsHolder assert(size_ == D); #endif return * reinterpret_cast<typename AlgebraicROOTObject<D,5>::Matrix *>(projection_); }
ProjectMatrix<double,5,D>& KfComponentsHolder::projFunc | ( | ) | [inline] |
Definition at line 73 of file KfComponentsHolder.h.
References funct::D, projFunc_, and size_.
Referenced by BaseSiTrackerRecHit2DLocalPos::getKfComponents(), BaseTrackerRecHit::getKfComponents2D(), and setup().
{ #ifdef Debug_KfComponentsHolder assert(size_ == D); #endif return * reinterpret_cast< ProjectMatrix<double,5,D> *>(projFunc_); }
void KfComponentsHolder::setup | ( | typename AlgebraicROOTObject< D >::Vector * | params, |
typename AlgebraicROOTObject< D, D >::SymMatrix * | errors, | ||
typename AlgebraicROOTObject< D, 5 >::Matrix * | projection, | ||
typename AlgebraicROOTObject< D >::Vector * | measuredParams, | ||
typename AlgebraicROOTObject< D, D >::SymMatrix * | measuredErrors, | ||
const AlgebraicVector5 & | tsosLocalParameters, | ||
const AlgebraicSymMatrix55 & | tsosLocalErrors | ||
) |
Definition at line 150 of file KfComponentsHolder.h.
References funct::D, errors(), errors_, measuredErrors(), measuredErrors_, measuredParams(), measuredParams_, params(), params_, projection(), projection_, projFunc_, size_, tsosLocalErrors(), tsosLocalErrors_, tsosLocalParameters(), and tsosLocalParameters_.
{ #ifdef Debug_KfComponentsHolder assert(size_ == 0); // which means it was uninitialized size_ = D; #endif static ProjectMatrix<double,5,D> dummy; params_ = params; errors_ = errors; projection_ = projection; projFunc_ = &dummy; measuredParams_ = measuredParams; measuredErrors_ = measuredErrors; tsosLocalParameters_ = & tsosLocalParameters; tsosLocalErrors_ = & tsosLocalErrors; }
void KfComponentsHolder::setup | ( | typename AlgebraicROOTObject< D >::Vector * | params, |
typename AlgebraicROOTObject< D, D >::SymMatrix * | errors, | ||
typename AlgebraicROOTObject< D, 5 >::Matrix * | projection, | ||
ProjectMatrix< double, 5, D > * | projFunc, | ||
typename AlgebraicROOTObject< D >::Vector * | measuredParams, | ||
typename AlgebraicROOTObject< D, D >::SymMatrix * | measuredErrors, | ||
const AlgebraicVector5 & | tsosLocalParameters, | ||
const AlgebraicSymMatrix55 & | tsosLocalErrors | ||
) |
Definition at line 124 of file KfComponentsHolder.h.
References funct::D, errors(), errors_, measuredErrors(), measuredErrors_, measuredParams(), measuredParams_, params(), params_, projection(), projection_, projFunc(), projFunc_, size_, tsosLocalErrors(), tsosLocalErrors_, tsosLocalParameters(), and tsosLocalParameters_.
{ #ifdef Debug_KfComponentsHolder assert(size_ == 0); // which means it was uninitialized size_ = D; #endif params_ = params; errors_ = errors; projection_ = projection; projFunc_ = projFunc; measuredParams_ = measuredParams; measuredErrors_ = measuredErrors; tsosLocalParameters_ = & tsosLocalParameters; tsosLocalErrors_ = & tsosLocalErrors; }
const AlgebraicSymMatrix55& KfComponentsHolder::tsosLocalErrors | ( | ) | const [inline] |
Definition at line 100 of file KfComponentsHolder.h.
References tsosLocalErrors_.
Referenced by dump(), BaseSiTrackerRecHit2DLocalPos::getKfComponents(), GSSiTrackerRecHit2DLocalPos::getKfComponents(), BaseTrackerRecHit::getKfComponents1D(), BaseTrackerRecHit::getKfComponents2D(), and setup().
{ return *tsosLocalErrors_; }
const AlgebraicVector5& KfComponentsHolder::tsosLocalParameters | ( | ) | const [inline] |
Definition at line 99 of file KfComponentsHolder.h.
References tsosLocalParameters_.
Referenced by dump(), BaseSiTrackerRecHit2DLocalPos::getKfComponents(), GSSiTrackerRecHit2DLocalPos::getKfComponents(), BaseTrackerRecHit::getKfComponents1D(), BaseTrackerRecHit::getKfComponents2D(), and setup().
{ return *tsosLocalParameters_; }
bool KfComponentsHolder::useProjFunc | ( | ) | const [inline] |
Definition at line 102 of file KfComponentsHolder.h.
References useProjFunc_.
{ return useProjFunc_;}
void * KfComponentsHolder::errors_ [private] |
Definition at line 110 of file KfComponentsHolder.h.
void * KfComponentsHolder::measuredErrors_ [private] |
Definition at line 110 of file KfComponentsHolder.h.
Referenced by measuredErrors(), and setup().
void * KfComponentsHolder::measuredParams_ [private] |
Definition at line 110 of file KfComponentsHolder.h.
Referenced by measuredParams(), and setup().
void* KfComponentsHolder::params_ [private] |
Definition at line 110 of file KfComponentsHolder.h.
void * KfComponentsHolder::projection_ [private] |
Definition at line 110 of file KfComponentsHolder.h.
Referenced by projection(), and setup().
void * KfComponentsHolder::projFunc_ [private] |
Definition at line 110 of file KfComponentsHolder.h.
Referenced by projFunc(), and setup().
uint16_t KfComponentsHolder::size_ [private] |
Definition at line 108 of file KfComponentsHolder.h.
Referenced by errors(), KfComponentsHolder(), measuredErrors(), measuredParams(), params(), projection(), projFunc(), and setup().
const AlgebraicSymMatrix55* KfComponentsHolder::tsosLocalErrors_ [private] |
Definition at line 112 of file KfComponentsHolder.h.
Referenced by genericFill_(), setup(), and tsosLocalErrors().
const AlgebraicVector5* KfComponentsHolder::tsosLocalParameters_ [private] |
Definition at line 111 of file KfComponentsHolder.h.
Referenced by genericFill_(), setup(), and tsosLocalParameters().
bool KfComponentsHolder::useProjFunc_ [private] |
Definition at line 114 of file KfComponentsHolder.h.
Referenced by doUseProjFunc(), and useProjFunc().