11#include <top/reconstruction_cpp/TOPTrack.h>
12#include <top/reconstruction_cpp/PDFConstructor.h>
13#include <framework/gearbox/Const.h>
14#include <framework/logging/Logger.h>
18#include <TMatrixDSym.h>
51 void setSteps(
double position,
double angle,
double time);
60 for (
size_t i = 0; i < std::min(parInit.size(),
m_parInit.size()); i++) {
72 for (
unsigned i = 0; i <
m_parNames.size(); i++) {
78 B2ERROR(
"TOP::ModuleAlignment::fixParameter: invalid parameter name '" << name <<
"'");
87 for (
unsigned i = 0; i <
m_parNames.size(); i++) {
93 B2ERROR(
"TOP::ModuleAlignment::releaseParameter: invalid parameter name '" << name <<
"'");
190 double getLogL(
const std::vector<double>& par,
bool& ok);
198 bool derivatives(std::vector<double>& first, TMatrixDSym& second);
Provides a type-safe way to pass members of the chargedStableSet set.
static const ChargedStable muon
muon particle
Alignment of a TOP module.
int m_numUsedTracks
number of tracks used
int getNumUsedTracks() const
Returns number of tracks used in current result.
TMatrixDSym m_U
matrix (neg.
const std::vector< double > & getParams() const
Returns alignment parameters.
int getNumTracks() const
Returns track counter.
void setModuleID(int moduleID)
Sets module ID.
bool derivatives(std::vector< double > &first, TMatrixDSym &second)
Calculates numerically first and second derivatives of log likelihood against the parameters.
TMatrixDSym m_COV
covariance matrix
std::vector< double > m_steps
step sizes
bool isValid() const
Checks if the results are valid.
void fixParameter(const std::string &name)
Fixes parameter with its name given as argument.
int m_numPhotons
number of photons used for log likelihood calculation
std::vector< bool > m_fixed
true if parameter is fixed
void setParameters(const std::vector< double > &parInit)
Sets initial values of parameters (overwrites current parameters!) Order is: translations in x,...
int m_numTracks
track counter
std::vector< std::string > m_parNames
parameter names
std::vector< float > getParameters() const
Returns alignment parameters.
std::vector< double > m_par
current parameter values
double getLogL(const std::vector< double > &par, bool &ok)
Returns log likelihood for given parameters Note: it changes helix parameters of TOPTrack object (m_t...
int getModuleID() const
Returns module ID.
Const::ChargedStable m_hypothesis
particle hypothesis
const std::vector< std::string > & getParameterNames() const
Returns alignment parameter names.
bool m_valid
validity of results
void setSteps(double position, double angle, double time)
Sets steps for numerical calculation of derivatives.
const TMatrixDSym & getErrorMatrix() const
Returns error matrix of alignment parameters Order is: translations in x, y, z, rotation angles aroun...
void releaseParameter(const std::string &name)
Release fixed parameter.
int iterate(TOPTrack &track, const Const::ChargedStable &hypothesis)
Run a single alignment iteration, on success update alignment parameters.
std::vector< double > m_parInit
initial parameter values
int invertMatrixU()
Inverts matrix m_U using Cholesky decomposition.
std::vector< double > m_maxDpar
maximal parameter changes in one iteration
std::vector< float > getErrors() const
Returns errors on alignment parameters.
void reset()
Reset the object.
TOPTrack * m_track
track parameters at TOP
PDFConstructor::EPDFOption m_opt
PDF option.
void releaseAllParameters()
Release all fixed parameters.
int getNumOfPhotons() const
Returns number of photons used for log likelihood calculation.
EPDFOption
Signal PDF construction options.
@ c_Rough
no dependence on y
Reconstructed track at TOP.
Abstract base class for different kinds of events.