![]() |
ATLAS Offline Software
|
#include <MatrixTool.h>
Public Types | |
| enum | SolveOption { NONE = 0 , SOLVE = 1 , SOLVE_FAST = 2 , DIRECT_SOLVE = 3 , DIRECT_SOLVE_FAST = 4 , DIRECT_SOLVE_CLUSTER = 5 , SOLVE_ROOT = 6 , SOLVE_CLHEP = 7 } |
Public Member Functions | |
| MatrixTool (const std::string &type, const std::string &name, const IInterface *parent) | |
| Constructor. | |
| virtual | ~MatrixTool () |
| Virtual destructor. | |
| StatusCode | initialize () |
| initialize | |
| StatusCode | finalize () |
| initialize | |
| StatusCode | allocateMatrix (int nDoF=0) |
| allocates memory for big matrix and big vector | |
| void | prepareBinaryFiles (int solveOption) |
| reads/writes matrix entries from/to binary files as necessary | |
| void | addFirstDerivatives (AlVec *vector) |
| adds first derivative to vector | |
| void | addFirstDerivatives (std::list< int, double > &derivatives) |
| adds first derivative to vector for only some entries | |
| void | addFirstDerivative (int irow, double firstderiv) |
| void | addSecondDerivatives (AlSymMatBase *matrix) |
| adds second derivatives to matrix | |
| void | addSecondDerivatives (std::list< std::pair< int, int >, double > &derivatives) |
| adds first derivative to vector for only some entries | |
| void | addSecondDerivative (int irow, int icol, double secondderiv) |
| bool | accumulateFromFiles () |
| accumulates derivates from files. | |
| bool | accumulateFromBinaries () |
| accumulates derivates from binary files | |
| int | solve () |
| solves for alignment parameters | |
| void | storeInTFile (const TString &filename) |
| Store Files in a tfile. | |
| bool | accumulateFromTFiles () |
| Store Files in a tfile. | |
| void | printModuleSolution (std::ostream &os, const AlignModule *module, const CLHEP::HepSymMatrix *cov) const |
| namespace { class RestoreIOSFlags { public: RestoreIOSFlags (std::ostream &os) : m_os(&os), m_flags(m_os->flags()), m_precision(m_os->precision()) {} ~RestoreIOSFlags() { m_os->flags(m_flags); m_os->precision(m_precision); } private: std::ostream *m_os; std::ios_base::fmtflags m_flags; std::streamsize m_precision; }; } | |
| void | printGlobalSolution (std::ostream &os, const CLHEP::HepSymMatrix *cov) |
| void | printGlobalSolution (std::ostream &os, const TMatrixDSym *cov) |
| ServiceHandle< StoreGateSvc > & | evtStore () |
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. | |
| const ServiceHandle< StoreGateSvc > & | detStore () const |
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc. | |
| virtual StatusCode | sysInitialize () override |
| Perform system initialization for an algorithm. | |
| virtual StatusCode | sysStart () override |
| Handle START transition. | |
| virtual std::vector< Gaudi::DataHandle * > | inputHandles () const override |
| Return this algorithm's input handles. | |
| virtual std::vector< Gaudi::DataHandle * > | outputHandles () const override |
| Return this algorithm's output handles. | |
| Gaudi::Details::PropertyBase & | declareProperty (Gaudi::Property< T, V, H > &t) |
| void | updateVHKA (Gaudi::Details::PropertyBase &) |
| MsgStream & | msg () const |
| bool | msgLvl (const MSG::Level lvl) const |
| void | addModule (int alignModuleIndex, int nAlignParam) |
| int | entryNumber (int alignModuleIndex) |
| void | setNHits (int n) |
| set module identifier | |
| int | nHits () const |
| void | setNTracks (int n) |
| set number of tracks | |
| int | nTracks () const |
| void | setNMeasurements (int n) |
| set number of measurements | |
| int | nMeasurements () const |
| virtual void | setLogStream (std::ostream *os) |
| sets the output stream for the logfile | |
Static Public Member Functions | |
| static const InterfaceID & | interfaceID () |
| Retrieve interface ID. | |
Protected Member Functions | |
| void | renounceArray (SG::VarHandleKeyArray &handlesArray) |
| remove all handles from I/O resolution | |
| std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > | renounce (T &h) |
| void | extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps) |
| Add StoreName to extra input/output deps as needed. | |
Protected Attributes | |
| std::ostream * | m_logStream |
| logfile output stream | |
| int | m_nHits |
| int | m_nTracks |
| int | m_nMeasurements |
Private Types | |
| typedef ServiceHandle< StoreGateSvc > | StoreGateSvc_t |
Private Member Functions | |
| int | solveROOT () |
| int | solveCLHEP () |
| int | solveLapack () |
| int | solveSparseEigen () |
| int | solveLocal () |
| StatusCode | spuriousRemoval () |
| void | postSolvingLapack (AlVec *dChi2, AlSymMat *d2Chi2, AlVec &w, AlMat &z, int size) |
| void | writeHitmap () |
| void | readHitmaps () |
| Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &) |
| specialization for handling Gaudi::Property<SG::VarHandleKey> | |
Static Private Member Functions | |
| static int | fillVecMods () |
Private Attributes | |
| ToolHandle< IAlignModuleTool > | m_alignModuleTool |
| AlSymMatBase * | m_bigmatrix |
| matrix to contain second derivative terms to be used for alignment | |
| AlVec * | m_bigvector |
| vector to contain first derivative terms to be used for alignment | |
| bool | m_useSparse |
| flag to use AlSpaMat for the big matrix (default is AlSymMat) | |
| bool | m_diagonalize |
| run diagonalization instead of inversion | |
| double | m_eigenvaluethreshold |
| cut on the minimum eigenvalue | |
| int | m_solveOption |
| solving option | |
| int | m_modcut |
| cut on the weak modes which number is <par_modcut | |
| int | m_minNumHits |
| cut on the minimum number of hits per module | |
| int | m_minNumTrks |
| cut on the minimum number of tracks per module | |
| float | m_pullcut |
| pull cut for the automatic weak mode removal method | |
| float | m_eigenvalueStep |
| eigenvalue step for the second pass in the automatic weak mode removal method | |
| float | m_Align_db_step |
| corr in the diagonal basis step for the third pass in the auto weak mode removal method | |
| bool | m_calDet |
| Compute bigmatrix's determinant ? | |
| bool | m_wSqMatrix |
| write a triangular matrix by default (true: square format) ? | |
| bool | m_writeMat |
| write big matrix and vector into files ? | |
| bool | m_writeMatTxt |
| also write big matrix and vector into txt files ? | |
| bool | m_writeEigenMat |
| write eigenvalues and eigenvectors into files ? | |
| bool | m_writeEigenMatTxt |
| also write eigenvalues and eigenvectors into txt files ? | |
| bool | m_writeModuleNames |
| write module name instead of Identifier to vector file | |
| bool | m_writeHitmap |
| write hitmap into file | |
| bool | m_writeHitmapTxt |
| write hitmap into text file | |
| bool | m_readHitmaps |
| accumulate hitymap from files | |
| bool | m_writeTFile |
| write out files to a root file | |
| bool | m_readTFiles |
| write out files to a root file | |
| bool | m_runLocal |
| Run solving using Local method. | |
| double | m_scale |
| scale for big matrix and vector normalization | |
| bool | m_scaleMatrix |
| scale matrix by number of hits before solving | |
| double | m_softEigenmodeCut |
| add constant to diagonal to effectively cut on weak eigenmodes | |
| bool | m_removeSpurious |
| run spurious removal | |
| bool | m_calculateFullCovariance |
| std::string | m_pathbin |
| path binary files (in/out) | |
| std::string | m_pathtxt |
| path ascii files (in/out) | |
| std::string | m_prefixName |
| prefix string to filenames | |
| std::string | m_tfileName |
| prefix string to filenames | |
| std::string | m_scalaMatName |
| Scalapack matrix name. | |
| std::string | m_scalaVecName |
| Scalapack vector name. | |
| std::vector< std::string > | m_inputMatrixFiles |
| input binary files containing matrix terms | |
| std::vector< std::string > | m_inputVectorFiles |
| input binary files containing vector terms | |
| std::vector< std::string > | m_inputHitmapFiles |
| input binary files containing the hitmaps | |
| std::vector< std::string > | m_inputTFiles |
| input binary files containing matrix terms | |
| std::vector< int > | m_activeIndices |
| vector of indices which pass the min-hits cut | |
| int | m_aNDoF |
| number of active DoF (size of m_activeIndices) | |
| int | m_maxReadErrors |
| maximum number of reading TFile errors | |
| bool | m_AlignIBLbutNotPixel |
| bool | m_AlignPixelbutNotIBL |
| bool | m_DeactivateSCT_ECA_LastDisk |
| bool | m_Remove_Pixel_Tx |
| bool | m_Remove_Pixel_Ty |
| bool | m_Remove_Pixel_Tz |
| bool | m_Remove_Pixel_Rx |
| bool | m_Remove_Pixel_Ry |
| bool | m_Remove_Pixel_Rz |
| bool | m_Remove_IBL_Tx |
| bool | m_Remove_IBL_Ty |
| bool | m_Remove_IBL_Tz |
| bool | m_Remove_IBL_Rx |
| bool | m_Remove_IBL_Ry |
| bool | m_Remove_IBL_Rz |
| StoreGateSvc_t | m_evtStore |
| Pointer to StoreGate (event store by default) | |
| StoreGateSvc_t | m_detStore |
| Pointer to StoreGate (detector store by default) | |
| std::vector< SG::VarHandleKeyArray * > | m_vhka |
| bool | m_varHandleArraysDeclared |
| std::map< int, int > | m_alignModuleMap |
| int | m_nentries |
Definition at line 55 of file MatrixTool.h.
|
privateinherited |
Definition at line 388 of file AthCommonDataStore.h.
| Enumerator | |
|---|---|
| NONE | not solve in any case (to be used when ipc) |
| SOLVE | solving after data accumulation (LAPACK) |
| SOLVE_FAST | Fast (Eigen method) solving after data accumulation. |
| DIRECT_SOLVE | direct solving (LAPACK), already available matrix & vector |
| DIRECT_SOLVE_FAST | direct Fast (Eigen method) solving, already available matrix & vector |
| DIRECT_SOLVE_CLUSTER | computation of alignment parameters from SCALAPAK already solved matrix |
| SOLVE_ROOT | computation using ROOT |
| SOLVE_CLHEP | computation using CLHEP |
Definition at line 58 of file MatrixTool.h.
| MatrixTool::MatrixTool | ( | const std::string & | type, |
| const std::string & | name, | ||
| const IInterface * | parent ) |
Constructor.
Definition at line 58 of file MatrixTool.cxx.
|
virtual |
Virtual destructor.
Definition at line 195 of file MatrixTool.cxx.
| bool MatrixTool::accumulateFromBinaries | ( | ) |
accumulates derivates from binary files
Definition at line 763 of file MatrixTool.cxx.
|
virtual |
accumulates derivates from files.
Flag decides if it is binary or TFiles
Implements Trk::IMatrixTool.
Definition at line 750 of file MatrixTool.cxx.
| bool MatrixTool::accumulateFromTFiles | ( | ) |
Store Files in a tfile.
Definition at line 957 of file MatrixTool.cxx.
|
virtual |
Implements Trk::IMatrixTool.
Definition at line 1609 of file MatrixTool.cxx.
|
virtual |
adds first derivative to vector
Implements Trk::IMatrixTool.
Definition at line 1589 of file MatrixTool.cxx.
|
virtual |
adds first derivative to vector for only some entries
Implements Trk::IMatrixTool.
Definition at line 1599 of file MatrixTool.cxx.
|
inlineinherited |
Definition at line 116 of file IMatrixTool.h.
|
virtual |
Implements Trk::IMatrixTool.
Definition at line 1615 of file MatrixTool.cxx.
|
virtual |
adds second derivatives to matrix
Implements Trk::IMatrixTool.
Definition at line 1594 of file MatrixTool.cxx.
|
virtual |
adds first derivative to vector for only some entries
Implements Trk::IMatrixTool.
Definition at line 1604 of file MatrixTool.cxx.
|
virtual |
allocates memory for big matrix and big vector
Implements Trk::IMatrixTool.
Definition at line 232 of file MatrixTool.cxx.
|
inlineprivateinherited |
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
|
inlineinherited |
Definition at line 145 of file AthCommonDataStore.h.
|
inlineinherited |
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
Definition at line 95 of file AthCommonDataStore.h.
|
inlineinherited |
Definition at line 118 of file IMatrixTool.h.
|
inlineinherited |
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Definition at line 85 of file AthCommonDataStore.h.
|
protectedinherited |
Add StoreName to extra input/output deps as needed.
use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given
|
staticprivate |
Definition at line 1759 of file MatrixTool.cxx.
| StatusCode MatrixTool::finalize | ( | ) |
initialize
Definition at line 223 of file MatrixTool.cxx.
| StatusCode MatrixTool::initialize | ( | ) |
initialize
Definition at line 202 of file MatrixTool.cxx.
|
overridevirtualinherited |
Return this algorithm's input handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
|
inlinestaticinherited |
Retrieve interface ID.
Definition at line 110 of file IMatrixTool.h.
|
inlineinherited |
Definition at line 24 of file AthCommonMsg.h.
|
inlineinherited |
Definition at line 30 of file AthCommonMsg.h.
|
inlineinherited |
Definition at line 84 of file IMatrixTool.h.
|
inlineinherited |
Definition at line 92 of file IMatrixTool.h.
|
inlineinherited |
Definition at line 88 of file IMatrixTool.h.
|
overridevirtualinherited |
Return this algorithm's output handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
|
private |
Definition at line 1958 of file MatrixTool.cxx.
|
virtual |
reads/writes matrix entries from/to binary files as necessary
Implements Trk::IMatrixTool.
Definition at line 260 of file MatrixTool.cxx.
| void MatrixTool::printGlobalSolution | ( | std::ostream & | os, |
| const CLHEP::HepSymMatrix * | cov ) |
Definition at line 1621 of file MatrixTool.cxx.
| void MatrixTool::printGlobalSolution | ( | std::ostream & | os, |
| const TMatrixDSym * | cov ) |
Definition at line 1668 of file MatrixTool.cxx.
| void MatrixTool::printModuleSolution | ( | std::ostream & | os, |
| const AlignModule * | module, | ||
| const CLHEP::HepSymMatrix * | cov ) const |
namespace { class RestoreIOSFlags { public: RestoreIOSFlags (std::ostream &os) : m_os(&os), m_flags(m_os->flags()), m_precision(m_os->precision()) {} ~RestoreIOSFlags() { m_os->flags(m_flags); m_os->precision(m_precision); } private: std::ostream *m_os; std::ios_base::fmtflags m_flags; std::streamsize m_precision; }; }
Definition at line 1706 of file MatrixTool.cxx.
|
private |
Definition at line 2455 of file MatrixTool.cxx.
|
inlineprotectedinherited |
Definition at line 380 of file AthCommonDataStore.h.
|
inlineprotectedinherited |
remove all handles from I/O resolution
Definition at line 364 of file AthCommonDataStore.h.
|
inlinevirtualinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
virtual |
solves for alignment parameters
Implements Trk::IMatrixTool.
Definition at line 1268 of file MatrixTool.cxx.
|
private |
Definition at line 391 of file MatrixTool.cxx.
|
private |
Definition at line 1765 of file MatrixTool.cxx.
|
private |
Definition at line 633 of file MatrixTool.cxx.
|
private |
Definition at line 265 of file MatrixTool.cxx.
|
private |
Definition at line 2284 of file MatrixTool.cxx.
|
private |
Definition at line 1866 of file MatrixTool.cxx.
| void MatrixTool::storeInTFile | ( | const TString & | filename | ) |
Store Files in a tfile.
Definition at line 862 of file MatrixTool.cxx.
|
overridevirtualinherited |
Perform system initialization for an algorithm.
We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.
Reimplemented in asg::AsgMetadataTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and DerivationFramework::CfAthAlgTool.
|
overridevirtualinherited |
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
|
inlineinherited |
Definition at line 308 of file AthCommonDataStore.h.
|
private |
Definition at line 2418 of file MatrixTool.cxx.
|
private |
vector of indices which pass the min-hits cut
Definition at line 209 of file MatrixTool.h.
|
private |
corr in the diagonal basis step for the third pass in the auto weak mode removal method
Definition at line 162 of file MatrixTool.h.
|
private |
Definition at line 214 of file MatrixTool.h.
|
privateinherited |
Definition at line 105 of file IMatrixTool.h.
|
private |
Definition at line 142 of file MatrixTool.h.
|
private |
Definition at line 215 of file MatrixTool.h.
|
private |
number of active DoF (size of m_activeIndices)
Definition at line 210 of file MatrixTool.h.
|
private |
matrix to contain second derivative terms to be used for alignment
Definition at line 145 of file MatrixTool.h.
|
private |
vector to contain first derivative terms to be used for alignment
Definition at line 148 of file MatrixTool.h.
|
private |
Definition at line 188 of file MatrixTool.h.
|
private |
Compute bigmatrix's determinant ?
Definition at line 164 of file MatrixTool.h.
|
private |
Definition at line 216 of file MatrixTool.h.
|
privateinherited |
Pointer to StoreGate (detector store by default)
Definition at line 393 of file AthCommonDataStore.h.
|
private |
run diagonalization instead of inversion
Definition at line 153 of file MatrixTool.h.
|
private |
eigenvalue step for the second pass in the automatic weak mode removal method
Definition at line 161 of file MatrixTool.h.
|
private |
cut on the minimum eigenvalue
Definition at line 154 of file MatrixTool.h.
|
privateinherited |
Pointer to StoreGate (event store by default)
Definition at line 390 of file AthCommonDataStore.h.
|
private |
input binary files containing the hitmaps
Definition at line 205 of file MatrixTool.h.
|
private |
input binary files containing matrix terms
Definition at line 202 of file MatrixTool.h.
|
private |
input binary files containing matrix terms
Definition at line 207 of file MatrixTool.h.
|
private |
input binary files containing vector terms
Definition at line 203 of file MatrixTool.h.
|
protectedinherited |
logfile output stream
Definition at line 98 of file IMatrixTool.h.
|
private |
maximum number of reading TFile errors
Definition at line 212 of file MatrixTool.h.
|
private |
cut on the minimum number of hits per module
Definition at line 158 of file MatrixTool.h.
|
private |
cut on the minimum number of tracks per module
Definition at line 159 of file MatrixTool.h.
|
private |
cut on the weak modes which number is <par_modcut
Definition at line 157 of file MatrixTool.h.
|
privateinherited |
Definition at line 106 of file IMatrixTool.h.
|
protectedinherited |
Definition at line 100 of file IMatrixTool.h.
|
protectedinherited |
Definition at line 102 of file IMatrixTool.h.
|
protectedinherited |
Definition at line 101 of file IMatrixTool.h.
|
private |
path binary files (in/out)
Definition at line 190 of file MatrixTool.h.
|
private |
path ascii files (in/out)
Definition at line 191 of file MatrixTool.h.
|
private |
prefix string to filenames
Definition at line 192 of file MatrixTool.h.
|
private |
pull cut for the automatic weak mode removal method
Definition at line 160 of file MatrixTool.h.
|
private |
accumulate hitymap from files
Definition at line 174 of file MatrixTool.h.
|
private |
write out files to a root file
Definition at line 177 of file MatrixTool.h.
|
private |
Definition at line 228 of file MatrixTool.h.
|
private |
Definition at line 229 of file MatrixTool.h.
|
private |
Definition at line 230 of file MatrixTool.h.
|
private |
Definition at line 225 of file MatrixTool.h.
|
private |
Definition at line 226 of file MatrixTool.h.
|
private |
Definition at line 227 of file MatrixTool.h.
|
private |
Definition at line 221 of file MatrixTool.h.
|
private |
Definition at line 222 of file MatrixTool.h.
|
private |
Definition at line 223 of file MatrixTool.h.
|
private |
Definition at line 218 of file MatrixTool.h.
|
private |
Definition at line 219 of file MatrixTool.h.
|
private |
Definition at line 220 of file MatrixTool.h.
|
private |
run spurious removal
Definition at line 186 of file MatrixTool.h.
|
private |
Run solving using Local method.
Definition at line 179 of file MatrixTool.h.
|
private |
Scalapack matrix name.
Definition at line 197 of file MatrixTool.h.
|
private |
Scalapack vector name.
Definition at line 198 of file MatrixTool.h.
|
private |
scale for big matrix and vector normalization
Definition at line 181 of file MatrixTool.h.
|
private |
scale matrix by number of hits before solving
Definition at line 182 of file MatrixTool.h.
|
private |
add constant to diagonal to effectively cut on weak eigenmodes
Definition at line 184 of file MatrixTool.h.
|
private |
solving option
Definition at line 156 of file MatrixTool.h.
|
private |
prefix string to filenames
Definition at line 194 of file MatrixTool.h.
|
private |
flag to use AlSpaMat for the big matrix (default is AlSymMat)
Definition at line 151 of file MatrixTool.h.
|
privateinherited |
Definition at line 399 of file AthCommonDataStore.h.
|
privateinherited |
Definition at line 398 of file AthCommonDataStore.h.
|
private |
write eigenvalues and eigenvectors into files ?
Definition at line 168 of file MatrixTool.h.
|
private |
also write eigenvalues and eigenvectors into txt files ?
Definition at line 169 of file MatrixTool.h.
|
private |
write hitmap into file
Definition at line 172 of file MatrixTool.h.
|
private |
write hitmap into text file
Definition at line 173 of file MatrixTool.h.
|
private |
write big matrix and vector into files ?
Definition at line 166 of file MatrixTool.h.
|
private |
also write big matrix and vector into txt files ?
Definition at line 167 of file MatrixTool.h.
|
private |
write module name instead of Identifier to vector file
Definition at line 170 of file MatrixTool.h.
|
private |
write out files to a root file
Definition at line 176 of file MatrixTool.h.
|
private |
write a triangular matrix by default (true: square format) ?
Definition at line 165 of file MatrixTool.h.