CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Attributes
TkFittedLasBeam Class Reference

#include <TkFittedLasBeam.h>

Inheritance diagram for TkFittedLasBeam:
TkLasBeam

Public Types

typedef float Scalar
 
- Public Types inherited from TkLasBeam
typedef std::vector< SiStripLaserRecHit2D >::const_iterator const_iterator
 

Public Member Functions

const AlgebraicMatrixderivatives () const
 matrix of local derivatives: columns are parameters, rows are hits More...
 
unsigned int firstFixedParameter () const
 
const std::vector< Scalar > & parameters () const
 parallel to derivatives() More...
 
const AlgebraicSymMatrixparametersCov () const
 covariance of first n=firstFixedParameter() parameters() More...
 
unsigned int parametrisation () const
 the parametrisation type used (0 means undefined...) More...
 
void setParameters (unsigned int parametrisation, const std::vector< Scalar > &params, const AlgebraicSymMatrix &paramCovariance, const AlgebraicMatrix &derivatives, unsigned int firstFixedParam, float chi2)
 
 TkFittedLasBeam ()
 
 TkFittedLasBeam (const TkLasBeam &lasBeam)
 
 ~TkFittedLasBeam () override
 
- Public Member Functions inherited from TkLasBeam
std::vector< SiStripLaserRecHit2D >::const_iterator begin (void) const
 access iterator to the collection of hits More...
 
std::vector< SiStripLaserRecHit2D >::const_iterator end (void) const
 access iterator to the collection of hits More...
 
unsigned int getBeamId (void) const
 return the full beam identifier More...
 
unsigned int getBeamNumber (void) const
 returns the beam number (10^1 digit of beamId) More...
 
const std::vector< SiStripLaserRecHit2D > & getData (void) const
 access the collection of hits More...
 
bool isAlignmentTube (void) const
 true if this is an AT beam (from 10^2 digit of beamId) More...
 
bool isRing6 (void) const
 true if this beam hits TEC R6 (last digit of beamId) More...
 
bool isTecInternal (int side=0) const
 true if this is a TEC internal beam (from 10^2 digit of beamId). side parameter: -1 = ask if TEC-, 1 = TEC+, 0 = any tec, don't care More...
 
void push_back (const SiStripLaserRecHit2D &aHit)
 insert a hit in the data vector More...
 
 TkLasBeam ()
 
 TkLasBeam (unsigned int aBeamId)
 
virtual ~TkLasBeam ()
 

Private Attributes

float chi2_
 first non-free parameter in (local) fit More...
 
AlgebraicMatrix derivatives_
 cov. matrix of 'free' params. (dim=firstFixedParameter_) More...
 
unsigned int firstFixedParameter_
 derivatives with respect to parameters_ More...
 
AlgebraicSymMatrix paramCovariance_
 beam parameters (depend on parameterisation_) More...
 
std::vector< Scalarparameters_
 type of parameterisation (0 means undefined) More...
 
unsigned int parametrisation_
 

Detailed Description

$)

Author
Gero Flucke
Date
May 2009 last update on
Date
2009/07/27 12:44:16

by

Author
flucke

An extension of the 'TkLasBeam' containing information about a track model fit to the laser hits. Documentation in TkLasTrackBasedInterface TWiki

Definition at line 18 of file TkFittedLasBeam.h.

Member Typedef Documentation

typedef float TkFittedLasBeam::Scalar

Definition at line 20 of file TkFittedLasBeam.h.

Constructor & Destructor Documentation

TkFittedLasBeam::TkFittedLasBeam ( )

Definition at line 6 of file TkFittedLasBeam.cc.

7 {
8 }
TkFittedLasBeam::TkFittedLasBeam ( const TkLasBeam lasBeam)

Definition at line 10 of file TkFittedLasBeam.cc.

10  : TkLasBeam(lasBeam)
11 {
12 }
TkLasBeam()
Definition: TkLasBeam.h:18
TkFittedLasBeam::~TkFittedLasBeam ( )
inlineoverride

Definition at line 24 of file TkFittedLasBeam.h.

24 {} // anyway virtual since inherited...

Member Function Documentation

const AlgebraicMatrix& TkFittedLasBeam::derivatives ( void  ) const
inline

matrix of local derivatives: columns are parameters, rows are hits

Definition at line 33 of file TkFittedLasBeam.h.

References derivatives_.

Referenced by MillePedeAlignmentAlgorithm::addLasBeam(), firstFixedParameter(), and setParameters().

33 { return derivatives_;}
AlgebraicMatrix derivatives_
cov. matrix of &#39;free&#39; params. (dim=firstFixedParameter_)
unsigned int TkFittedLasBeam::firstFixedParameter ( ) const
inline

index of first parameter and its derivative that was not fixed in the fit, but might be free in a global fit, e.g. within millepede

Definition at line 36 of file TkFittedLasBeam.h.

References vertices_cff::chi2, derivatives(), firstFixedParameter_, parametrisation(), and setParameters().

Referenced by MillePedeAlignmentAlgorithm::addLasBeam().

36 { return firstFixedParameter_;}
unsigned int firstFixedParameter_
derivatives with respect to parameters_
const std::vector<Scalar>& TkFittedLasBeam::parameters ( void  ) const
inline
const AlgebraicSymMatrix& TkFittedLasBeam::parametersCov ( ) const
inline

covariance of first n=firstFixedParameter() parameters()

Definition at line 31 of file TkFittedLasBeam.h.

References paramCovariance_.

31 {return paramCovariance_;}
AlgebraicSymMatrix paramCovariance_
beam parameters (depend on parameterisation_)
unsigned int TkFittedLasBeam::parametrisation ( ) const
inline

the parametrisation type used (0 means undefined...)

Definition at line 27 of file TkFittedLasBeam.h.

References parametrisation_.

Referenced by firstFixedParameter(), and setParameters().

27 { return parametrisation_;}
unsigned int parametrisation_
void TkFittedLasBeam::setParameters ( unsigned int  parametrisation,
const std::vector< Scalar > &  params,
const AlgebraicSymMatrix paramCovariance,
const AlgebraicMatrix derivatives,
unsigned int  firstFixedParam,
float  chi2 
)

set parameterisation (0=undefined), derivatives, chi^2 etc:

  • 'params' and 'derivatives' must be parallel,
  • 'covariance' contains the free part, i.e. has size 'firstFixedParam'
  • obeye firstFixedParam <= params.size() throws if inconsistent

Definition at line 15 of file TkFittedLasBeam.cc.

References vertices_cff::chi2, chi2_, derivatives(), derivatives_, Exception, firstFixedParameter_, TkLasBeam::getData(), paramCovariance_, parameters_, parametrisation(), and parametrisation_.

Referenced by firstFixedParameter(), and TkLasBeamFitter::fitBeam().

20 {
22  parameters_ = params;
23  paramCovariance_ = paramCovariance;
25  firstFixedParameter_ = firstFixedParam;
26  chi2_ = chi2;
27 
28  // check integrity
29  if (parameters_.size() != static_cast<unsigned int>(derivatives_.num_col()) // # parameters
30  || static_cast<unsigned int>(derivatives_.num_row()) != this->getData().size() // # hits
31  || firstFixedParameter_ > parameters_.size() // index 'fixed' might be the
32  || static_cast<unsigned int>(paramCovariance_.num_row()) != firstFixedParameter_) {
33  throw cms::Exception("BadInput")
34  << "[TkFittedLasBeam::setParameters] with inconsistent sizes: (parametrisation "
35  << parametrisation << "):\n"
36  << parameters_.size() << " parameters,\n"
37  << derivatives_.num_row() << "x" << derivatives_.num_col() << " derivatives,\n"
38  << "firstFixed = " << firstFixedParameter_ << " (i.e. "
39  << static_cast<int>(parameters_.size()) - static_cast<int>(firstFixedParameter_)
40  << " global parameters),\n" // cast on line before to allow difference to be < 0, [un]signed!
41  << "cov. matrix size " << paramCovariance_.num_row() << ".\n";
42  }
43 }
const AlgebraicMatrix & derivatives() const
matrix of local derivatives: columns are parameters, rows are hits
unsigned int parametrisation_
unsigned int parametrisation() const
the parametrisation type used (0 means undefined...)
AlgebraicSymMatrix paramCovariance_
beam parameters (depend on parameterisation_)
unsigned int firstFixedParameter_
derivatives with respect to parameters_
const std::vector< SiStripLaserRecHit2D > & getData(void) const
access the collection of hits
Definition: TkLasBeam.h:28
std::vector< Scalar > parameters_
type of parameterisation (0 means undefined)
float chi2_
first non-free parameter in (local) fit
AlgebraicMatrix derivatives_
cov. matrix of &#39;free&#39; params. (dim=firstFixedParameter_)

Member Data Documentation

float TkFittedLasBeam::chi2_
private

first non-free parameter in (local) fit

Definition at line 55 of file TkFittedLasBeam.h.

Referenced by setParameters().

AlgebraicMatrix TkFittedLasBeam::derivatives_
private

cov. matrix of 'free' params. (dim=firstFixedParameter_)

Definition at line 53 of file TkFittedLasBeam.h.

Referenced by derivatives(), and setParameters().

unsigned int TkFittedLasBeam::firstFixedParameter_
private

derivatives with respect to parameters_

Definition at line 54 of file TkFittedLasBeam.h.

Referenced by firstFixedParameter(), and setParameters().

AlgebraicSymMatrix TkFittedLasBeam::paramCovariance_
private

beam parameters (depend on parameterisation_)

Definition at line 52 of file TkFittedLasBeam.h.

Referenced by parametersCov(), and setParameters().

std::vector<Scalar> TkFittedLasBeam::parameters_
private
unsigned int TkFittedLasBeam::parametrisation_
private

Definition at line 50 of file TkFittedLasBeam.h.

Referenced by parametrisation(), and setParameters().