Belle II Software development
|
Class for easier manipulation with global derivatives (and their labels) More...
#include <GlobalDerivatives.h>
Public Member Functions | |
GlobalDerivatives (int dim=2) | |
Constructor for empty derivative matrix and label vector. | |
GlobalDerivatives (const std::pair< std::vector< int >, TMatrixD > &globals) | |
Constructor from pair of the vector and the matrix. | |
GlobalDerivatives (const std::vector< int > &labels, const TMatrixD &derivs) | |
constructor from label vector and derivative matrix | |
operator std::pair< std::vector< int >, TMatrixD > () | |
Convenient operator to allow to pass the object directly from RecoHit to globalDerivatives() WARNING: causes zero labels to be removed. | |
operator std::vector< int > () | |
Convenient operator to pass only labels (non-zero) | |
operator TMatrixD () | |
Covenient operator to pass only derivatives (for non-zero labels) | |
const std::vector< int > & | getLabels () const |
Get stored lables (includes zeros) | |
const TMatrixD & | getDerivatives () const |
Return the derivative matrix (includes columns with zero labels) | |
void | add (const std::pair< std::vector< int >, TMatrixD > &globals) |
Add another set of global labels and derivatives. | |
void | add (int paramLabel, std::vector< double > dResiduals_dParam) |
Add one parameter - label and the corresponding residual derivative. | |
void | add (int paramLabel, double drudp) |
Add derivative of local U residual w.r.t. | |
Static Public Member Functions | |
static std::pair< std::vector< int >, TMatrixD > | passGlobals (std::pair< std::vector< int >, TMatrixD > globals) |
Static convenient function to remove columns with zero labels (make error in Pede btw.) TODO: refactore interface: return value, params <-> | |
Private Attributes | |
std::pair< std::vector< int >, TMatrixD > | m_globals {{}, TMatrixD()} |
The global labels and derivatives matrix. | |
Class for easier manipulation with global derivatives (and their labels)
Allows to simply add, merge and pass global derivatives matrix and global label vector in RecoHit. For lables = 0 removes given columns from derivative matrix (e.g. save disc space for parameters you do not want to calibrate)
Definition at line 27 of file GlobalDerivatives.h.
|
inlineexplicit |
Constructor for empty derivative matrix and label vector.
dim | number of matrix rows (number of local residuals in virtual plane) Usually 2 (also for 1 dim measurement, u/v selected via precision matrix) |
Definition at line 32 of file GlobalDerivatives.h.
|
explicit |
Constructor from pair of the vector and the matrix.
Definition at line 17 of file GlobalDerivatives.cc.
GlobalDerivatives | ( | const std::vector< int > & | labels, |
const TMatrixD & | derivs | ||
) |
constructor from label vector and derivative matrix
Definition at line 23 of file GlobalDerivatives.cc.
void add | ( | const std::pair< std::vector< int >, TMatrixD > & | globals | ) |
Add another set of global labels and derivatives.
Definition at line 29 of file GlobalDerivatives.cc.
void add | ( | int | paramLabel, |
double | drudp | ||
) |
Add derivative of local U residual w.r.t.
global parameter Global derivative versus V residual is set to zero. For (u, v) measurement use add(p, {dru/dp, drv/dp}.
Definition at line 61 of file GlobalDerivatives.cc.
void add | ( | int | paramLabel, |
std::vector< double > | dResiduals_dParam | ||
) |
Add one parameter - label and the corresponding residual derivative.
paramLabel | label of the global parameter to calibrate |
dResiduals_dParam | vector od derivatives of local residual (U, v) versus global parameter |
Definition at line 50 of file GlobalDerivatives.cc.
|
inline |
Return the derivative matrix (includes columns with zero labels)
Definition at line 47 of file GlobalDerivatives.h.
|
inline |
|
inline |
Convenient operator to allow to pass the object directly from RecoHit to globalDerivatives() WARNING: causes zero labels to be removed.
Definition at line 39 of file GlobalDerivatives.h.
|
inline |
Convenient operator to pass only labels (non-zero)
Definition at line 41 of file GlobalDerivatives.h.
|
inline |
Covenient operator to pass only derivatives (for non-zero labels)
Definition at line 43 of file GlobalDerivatives.h.
|
static |
Static convenient function to remove columns with zero labels (make error in Pede btw.) TODO: refactore interface: return value, params <->
Definition at line 67 of file GlobalDerivatives.cc.
|
private |
The global labels and derivatives matrix.
Definition at line 63 of file GlobalDerivatives.h.