Alignment of a TOP module: core of the method is coded in fortran.
More...
#include <TOPalign.h>
|
|
| TOPalign () |
| | Constructor.
|
| |
| void | setModuleID (int moduleID) |
| | Sets module ID. More...
|
| |
| void | setSteps (double position, double angle, double time, double refind) |
| | Sets steps for numerical calculation of derivatives. More...
|
| |
| void | setGrid (int NP, int NC) |
| | Sets grid for averaging of time-of-propagation in analytic PDF. 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, t0, dn/n. More...
|
| |
| void | fixParameter (const std::string &name) |
| | Fixes parameter with its name given as argument. More...
|
| |
| void | unfixParameter (const std::string &name) |
| | Unfixes parameter with its name given as argument. More...
|
| |
|
void | unfixAll () |
| | Unfixes all parameters.
|
| |
| int | iterate (const TOPtrack &track, const Const::ChargedStable &hypothesis) |
| | Run a single iteration. More...
|
| |
|
void | reset () |
| | Reset the object.
|
| |
| int | getModuleID () const |
| | Returns module ID. More...
|
| |
| const std::vector< float > & | getParameters () const |
| | Returns alignment parameters. More...
|
| |
| const std::vector< std::string > & | getParameterNames () const |
| | Returns alignment parameter names. More...
|
| |
| std::vector< float > | getErrors () const |
| | Returns errors on alignment parameters. More...
|
| |
| const std::vector< float > & | getErrorMatrix () const |
| | Returns error matrix of alignment parameters. 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...
|
| |
|
|
static void | clearData () |
| | Clear data list.
|
| |
| static int | addData (int moduleID, int pixelID, double time, double timeError) |
| | Add data. More...
|
| |
| static void | setPhotonYields (double bkgPerModule, double scaleN0=1) |
| | Sets expected photon yields. More...
|
| |
|
|
int | m_moduleID = 0 |
| | module ID
|
| |
|
int | m_opt = 0 |
| | PDF option (=rough)
|
| |
|
int | m_NP = 0 |
| | grid for averaging: number of emission points along track
|
| |
|
int | m_NC = 0 |
| | grid for averaging: number of Cerenkov angles
|
| |
|
std::vector< std::string > | m_parNames |
| | parameter names
|
| |
|
std::vector< float > | m_parInit |
| | initial parameter values
|
| |
|
std::vector< float > | m_par |
| | current parameter values
|
| |
|
std::vector< float > | m_steps |
| | step sizes
|
| |
|
std::vector< float > | m_maxDpar |
| | maximal parameter changes in one iteration
|
| |
|
std::vector< bool > | m_fixed |
| | true if parameter is fixed
|
| |
|
std::vector< float > | m_COV |
| | covariance matrix
|
| |
|
int | m_numTracks = 0 |
| | track counter
|
| |
|
int | m_numUsedTracks = 0 |
| | number of tracks used
|
| |
|
bool | m_valid = false |
| | validity of results
|
| |
|
int | m_numPhotons = 0 |
| | number of photons used for log likelihood calculation
|
| |
| std::vector< double > | m_U |
| | matrix (neg. More...
|
| |
Alignment of a TOP module: core of the method is coded in fortran.
Definition at line 38 of file TOPalign.h.
◆ addData()
| int addData |
( |
int |
moduleID, |
|
|
int |
pixelID, |
|
|
double |
time, |
|
|
double |
timeError |
|
) |
| |
|
static |
Add data.
- Parameters
-
| moduleID | module ID |
| pixelID | pixel ID (e.g. software channel, 1-based) |
| time | TBC and local T0 corrected time in [ns] |
| timeError | time uncertainty in [ns] |
- Returns
- data size (or 0/negative on error)
Definition at line 78 of file TOPalign.cc.
83 float t = (float) time;
84 float terr = (float) timeError;
85 data_put_(&moduleID, &pixelID, &t, &terr, &status);
88 B2WARNING(
"addData: no space available in /TOP_DATA/");
91 B2ERROR(
"addData: invalid module ID."
92 <<
LogVar(
"moduleID", moduleID + 1));
95 B2ERROR(
"addData: invalid pixel ID."
96 <<
LogVar(
"pixelID", pixelID + 1));
99 B2DEBUG(100,
"addData: digit should already be masked-out (different masks used?)");
◆ fixParameter()
| void fixParameter |
( |
const std::string & |
name | ) |
|
|
inline |
Fixes parameter with its name given as argument.
- Parameters
-
Definition at line 111 of file TOPalign.h.
111 : invalid parameter name
'" << name << "'");
118 void unfixParameter(const std::string& name)
120 for (unsigned i = 0; i < m_parNames.size(); i++) {
◆ getErrorMatrix()
| const std::vector<float>& getErrorMatrix |
( |
| ) |
const |
|
inline |
Returns error matrix of alignment parameters.
- Returns
- error matrix (N x N symmetric matrix as a std::vector of N*N components)
Definition at line 188 of file TOPalign.h.
◆ getErrors()
| std::vector< float > getErrors |
( |
| ) |
const |
Returns errors on alignment parameters.
Order is: translations in x, y, z, rotation angles around x, y, z, t0, dn/n
- Returns
- errors
Definition at line 183 of file TOPalign.cc.
◆ getModuleID()
| int getModuleID |
( |
| ) |
const |
|
inline |
Returns module ID.
- Returns
- module ID
Definition at line 162 of file TOPalign.h.
◆ getNumOfPhotons()
| int getNumOfPhotons |
( |
| ) |
const |
|
inline |
Returns number of photons used for log likelihood calculation.
- Returns
- number of photons or -1 if track doesn't hit the bar (no log likelihood)
Definition at line 212 of file TOPalign.h.
◆ getNumTracks()
| int getNumTracks |
( |
| ) |
const |
|
inline |
Returns track counter.
- Returns
- number of tracks
Definition at line 194 of file TOPalign.h.
◆ getNumUsedTracks()
| int getNumUsedTracks |
( |
| ) |
const |
|
inline |
Returns number of tracks used in current result.
- Returns
- number of tracks
Definition at line 200 of file TOPalign.h.
◆ getParameterNames()
| const std::vector<std::string>& getParameterNames |
( |
| ) |
const |
|
inline |
Returns alignment parameter names.
- Returns
- parameter names
Definition at line 175 of file TOPalign.h.
◆ getParameters()
| const std::vector<float>& getParameters |
( |
| ) |
const |
|
inline |
Returns alignment parameters.
Order is: translations in x, y, z, rotation angles around x, y, z, t0, dn/n
- Returns
- parameters
Definition at line 169 of file TOPalign.h.
◆ isValid()
Checks if the results are valid.
- Returns
- true if results valid
Definition at line 206 of file TOPalign.h.
◆ iterate()
Run a single iteration.
- Parameters
-
| track | track parameters |
| hypothesis | particle hypothesis |
- Returns
- error status (0 = OK, < 0 no track hit, > 0 matrix not pos. definite)
Definition at line 114 of file TOPalign.cc.
◆ setGrid()
| void setGrid |
( |
int |
NP, |
|
|
int |
NC |
|
) |
| |
|
inline |
Sets grid for averaging of time-of-propagation in analytic PDF.
- Parameters
-
| NP | number of emission points along track |
| NC | number of Cerenkov angles |
Definition at line 88 of file TOPalign.h.
◆ setModuleID()
| void setModuleID |
( |
int |
moduleID | ) |
|
|
inline |
Sets module ID.
- Parameters
-
Definition at line 72 of file TOPalign.h.
◆ setParameters()
| void setParameters |
( |
const std::vector< double > & |
parInit | ) |
|
|
inline |
Sets initial values of parameters (overwrites current parameters!) Order is: translations in x, y, z, rotation angles around x, y, z, t0, dn/n.
- Parameters
-
Definition at line 99 of file TOPalign.h.
◆ setPhotonYields()
| void setPhotonYields |
( |
double |
bkgPerModule, |
|
|
double |
scaleN0 = 1 |
|
) |
| |
|
static |
Sets expected photon yields.
- Parameters
-
| bkgPerModule | estimation for minimal number of background hits |
| scaleN0 | scale factor for figure-of-merit N0 |
Definition at line 106 of file TOPalign.cc.
◆ setSteps()
| void setSteps |
( |
double |
position, |
|
|
double |
angle, |
|
|
double |
time, |
|
|
double |
refind |
|
) |
| |
Sets steps for numerical calculation of derivatives.
- Parameters
-
| position | step size for translations [cm] |
| angle | step size for rotations [radians] |
| time | step size for T0 [ns] |
| refind | step size for refractive index scale factor |
Definition at line 59 of file TOPalign.cc.
◆ unfixParameter()
| void unfixParameter |
( |
const std::string & |
name | ) |
|
|
inline |
Unfixes parameter with its name given as argument.
- Parameters
-
Definition at line 126 of file TOPalign.h.
◆ m_U
matrix (neg.
sum of second derivatives)
Definition at line 233 of file TOPalign.h.
The documentation for this class was generated from the following files: