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

◆ Scalar

typedef float TkFittedLasBeam::Scalar

Definition at line 20 of file TkFittedLasBeam.h.

Constructor & Destructor Documentation

◆ TkFittedLasBeam() [1/2]

TkFittedLasBeam::TkFittedLasBeam ( )

Definition at line 6 of file TkFittedLasBeam.cc.

6 {}

◆ TkFittedLasBeam() [2/2]

TkFittedLasBeam::TkFittedLasBeam ( const TkLasBeam lasBeam)

Definition at line 8 of file TkFittedLasBeam.cc.

8 : TkLasBeam(lasBeam) {}
TkLasBeam()
Definition: TkLasBeam.h:16

◆ ~TkFittedLasBeam()

TkFittedLasBeam::~TkFittedLasBeam ( )
inlineoverride

Definition at line 24 of file TkFittedLasBeam.h.

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

Member Function Documentation

◆ derivatives()

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(), and setParameters().

33 { return derivatives_; }
AlgebraicMatrix derivatives_
cov. matrix of &#39;free&#39; params. (dim=firstFixedParameter_)

◆ 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 firstFixedParameter_.

Referenced by MillePedeAlignmentAlgorithm::addLasBeam().

36 { return firstFixedParameter_; }
unsigned int firstFixedParameter_
derivatives with respect to parameters_

◆ parameters()

const std::vector<Scalar>& TkFittedLasBeam::parameters ( void  ) const
inline

parallel to derivatives()

Definition at line 29 of file TkFittedLasBeam.h.

References parameters_.

Referenced by MillePedeAlignmentAlgorithm::addLasBeam().

29 { return parameters_; }
std::vector< Scalar > parameters_
type of parameterisation (0 means undefined)

◆ parametersCov()

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_)

◆ parametrisation()

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 setParameters().

27 { return parametrisation_; }
unsigned int parametrisation_

◆ setParameters()

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 11 of file TkFittedLasBeam.cc.

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

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

◆ chi2_

float TkFittedLasBeam::chi2_
private

first non-free parameter in (local) fit

Definition at line 56 of file TkFittedLasBeam.h.

Referenced by setParameters().

◆ derivatives_

AlgebraicMatrix TkFittedLasBeam::derivatives_
private

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

Definition at line 54 of file TkFittedLasBeam.h.

Referenced by derivatives(), and setParameters().

◆ firstFixedParameter_

unsigned int TkFittedLasBeam::firstFixedParameter_
private

derivatives with respect to parameters_

Definition at line 55 of file TkFittedLasBeam.h.

Referenced by firstFixedParameter(), and setParameters().

◆ paramCovariance_

AlgebraicSymMatrix TkFittedLasBeam::paramCovariance_
private

beam parameters (depend on parameterisation_)

Definition at line 53 of file TkFittedLasBeam.h.

Referenced by parametersCov(), and setParameters().

◆ parameters_

std::vector<Scalar> TkFittedLasBeam::parameters_
private

◆ parametrisation_

unsigned int TkFittedLasBeam::parametrisation_
private

Definition at line 51 of file TkFittedLasBeam.h.

Referenced by parametrisation(), and setParameters().