Belle II Software
release-08-01-10
|
Alignment of a TOP module. More...
#include <ModuleAlignment.h>
Public Member Functions | |
ModuleAlignment (PDFConstructor::EPDFOption opt=PDFConstructor::c_Rough) | |
Constructor. More... | |
void | setModuleID (int moduleID) |
Sets module ID. More... | |
void | setSteps (double position, double angle, double time) |
Sets steps for numerical calculation of derivatives. More... | |
void | setParameters (const std::vector< double > &parInit) |
Sets initial values of parameters (overwrites current parameters!) Order is: translations in x, y, z, rotation angles around x, y, z, module T0. More... | |
void | fixParameter (const std::string &name) |
Fixes parameter with its name given as argument. More... | |
void | releaseParameter (const std::string &name) |
Release fixed parameter. More... | |
void | releaseAllParameters () |
Release all fixed parameters. | |
int | iterate (TOPTrack &track, const Const::ChargedStable &hypothesis) |
Run a single alignment iteration, on success update alignment parameters. More... | |
void | reset () |
Reset the object. | |
int | getModuleID () const |
Returns module ID. More... | |
const std::vector< std::string > & | getParameterNames () const |
Returns alignment parameter names. More... | |
const std::vector< double > & | getParams () const |
Returns alignment parameters. More... | |
std::vector< float > | getParameters () const |
Returns alignment parameters. More... | |
std::vector< float > | getErrors () const |
Returns errors on alignment parameters. More... | |
const TMatrixDSym & | getErrorMatrix () const |
Returns error matrix of alignment parameters Order is: translations in x, y, z, rotation angles around x, y, z, module T0. More... | |
int | getNumTracks () const |
Returns track counter. More... | |
int | getNumUsedTracks () const |
Returns number of tracks used in current result. More... | |
bool | isValid () const |
Checks if the results are valid. More... | |
int | getNumOfPhotons () const |
Returns number of photons used for log likelihood calculation. More... | |
Private Member Functions | |
double | getLogL (const std::vector< double > &par, bool &ok) |
Returns log likelihood for given parameters Note: it changes helix parameters of TOPTrack object (m_track) More... | |
bool | derivatives (std::vector< double > &first, TMatrixDSym &second) |
Calculates numerically first and second derivatives of log likelihood against the parameters. More... | |
int | invertMatrixU () |
Inverts matrix m_U using Cholesky decomposition. More... | |
Private Attributes | |
int | m_moduleID = 0 |
module ID | |
PDFConstructor::EPDFOption | m_opt = PDFConstructor::c_Rough |
PDF option. | |
std::vector< std::string > | m_parNames |
parameter names | |
std::vector< double > | m_parInit |
initial parameter values | |
std::vector< double > | m_par |
current parameter values | |
std::vector< double > | m_steps |
step sizes | |
std::vector< double > | m_maxDpar |
maximal parameter changes in one iteration | |
std::vector< bool > | m_fixed |
true if parameter is fixed | |
TMatrixDSym | m_COV |
covariance matrix | |
int | m_numTracks = 0 |
track counter | |
int | m_numUsedTracks = 0 |
number of tracks used | |
int | m_numPhotons = 0 |
number of photons used for log likelihood calculation | |
bool | m_valid = false |
validity of results | |
TMatrixDSym | m_U |
matrix (neg. More... | |
TOPTrack * | m_track = 0 |
track parameters at TOP | |
Const::ChargedStable | m_hypothesis = Const::muon |
particle hypothesis | |
Alignment of a TOP module.
Definition at line 30 of file ModuleAlignment.h.
Constructor.
opt | PDF construction option |
Definition at line 25 of file ModuleAlignment.cc.
|
private |
Calculates numerically first and second derivatives of log likelihood against the parameters.
first | a vector of first derivatives [out] |
second | a matrix of second derivatives [out] |
Definition at line 141 of file ModuleAlignment.cc.
|
inline |
Fixes parameter with its name given as argument.
name | parameter name |
Definition at line 70 of file ModuleAlignment.h.
|
inline |
Returns error matrix of alignment parameters Order is: translations in x, y, z, rotation angles around x, y, z, module T0.
Definition at line 155 of file ModuleAlignment.h.
std::vector< float > getErrors | ( | ) | const |
Returns errors on alignment parameters.
Order is: translations in x, y, z, rotation angles around x, y, z, module T0
Definition at line 109 of file ModuleAlignment.cc.
|
private |
Returns log likelihood for given parameters Note: it changes helix parameters of TOPTrack object (m_track)
par | parameters |
ok | status [out] |
Definition at line 119 of file ModuleAlignment.cc.
|
inline |
|
inline |
Returns number of photons used for log likelihood calculation.
Definition at line 179 of file ModuleAlignment.h.
|
inline |
|
inline |
Returns number of tracks used in current result.
Definition at line 167 of file ModuleAlignment.h.
|
inline |
Returns alignment parameter names.
Definition at line 127 of file ModuleAlignment.h.
std::vector< float > getParameters | ( | ) | const |
Returns alignment parameters.
Order is: translations in x, y, z, rotation angles around x, y, z, module T0
Definition at line 102 of file ModuleAlignment.cc.
|
inline |
Returns alignment parameters.
Order is: translations in x, y, z, rotation angles around x, y, z, module T0
Definition at line 134 of file ModuleAlignment.h.
|
private |
Inverts matrix m_U using Cholesky decomposition.
Definition at line 198 of file ModuleAlignment.cc.
|
inline |
Checks if the results are valid.
Definition at line 173 of file ModuleAlignment.h.
int iterate | ( | TOPTrack & | track, |
const Const::ChargedStable & | hypothesis | ||
) |
Run a single alignment iteration, on success update alignment parameters.
track | track parameters |
hypothesis | particle hypothesis |
Definition at line 56 of file ModuleAlignment.cc.
|
inline |
Release fixed parameter.
name | parameter name |
Definition at line 85 of file ModuleAlignment.h.
|
inline |
|
inline |
Sets initial values of parameters (overwrites current parameters!) Order is: translations in x, y, z, rotation angles around x, y, z, module T0.
parInit | initial values |
Definition at line 58 of file ModuleAlignment.h.
void setSteps | ( | double | position, |
double | angle, | ||
double | time | ||
) |
Sets steps for numerical calculation of derivatives.
position | step size for translations [cm] |
angle | step size for rotations [radians] |
time | step size for module T0 [ns] |
Definition at line 44 of file ModuleAlignment.cc.
|
private |