![]() |
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 | |
| PublicToolHandle< IAlignModuleTool > | m_alignModuleTool |
| AlSymMatBase * | m_bigmatrix = nullptr |
| matrix to contain second derivative terms to be used for alignment | |
| AlVec * | m_bigvector = nullptr |
| vector to contain first derivative terms to be used for alignment | |
| Gaudi::Property< bool > | m_useSparse {this, "UseSparse", false} |
| flag to use AlSpaMat for the big matrix (default is AlSymMat) | |
| Gaudi::Property< bool > | m_diagonalize |
| Gaudi::Property< double > | m_eigenvaluethreshold {this, "EigenvalueThreshold", 0., "cut on the minimum eigenvalue"} |
| Gaudi::Property< int > | m_solveOption {this, "SolveOption", NONE, "solving option"} |
| Gaudi::Property< int > | m_modcut |
| Gaudi::Property< int > | m_minNumHits |
| Gaudi::Property< int > | m_minNumTrks |
| Gaudi::Property< float > | m_pullcut |
| Gaudi::Property< float > | m_eigenvalueStep |
| Gaudi::Property< float > | m_Align_db_step |
| Gaudi::Property< bool > | m_calDet |
| Gaudi::Property< bool > | m_wSqMatrix |
| Gaudi::Property< bool > | m_writeMat |
| Gaudi::Property< bool > | m_writeMatTxt |
| Gaudi::Property< bool > | m_writeEigenMat |
| Gaudi::Property< bool > | m_writeEigenMatTxt |
| Gaudi::Property< bool > | m_writeModuleNames |
| Gaudi::Property< bool > | m_writeHitmap |
| Gaudi::Property< bool > | m_writeHitmapTxt |
| Gaudi::Property< bool > | m_readHitmaps |
| Gaudi::Property< bool > | m_writeTFile |
| Gaudi::Property< bool > | m_readTFiles |
| Gaudi::Property< bool > | m_runLocal |
| double | m_scale = -1. |
| scale for big matrix and vector normalization | |
| Gaudi::Property< bool > | m_scaleMatrix |
| Gaudi::Property< double > | m_softEigenmodeCut |
| Gaudi::Property< double > | m_removeSpurious |
| Gaudi::Property< double > | m_calculateFullCovariance |
| Gaudi::Property< std::string > | m_pathbin |
| Gaudi::Property< std::string > | m_pathtxt |
| Gaudi::Property< std::string > | m_prefixName |
| Gaudi::Property< std::string > | m_tfileName {this, "TFileName", "AlignmentTFile.root", "prefix string to filenames"} |
| Gaudi::Property< std::string > | m_scalaMatName {this, "ScalapackMatrixName", "eigenvectors.bin", "Scalapack matrix name"} |
| Gaudi::Property< std::string > | m_scalaVecName {this, "ScalapackVectorName", "eigenvalues.bin", "Scalapack vector name"} |
| Gaudi::Property< std::vector< std::string > > | m_inputMatrixFiles |
| Gaudi::Property< std::vector< std::string > > | m_inputVectorFiles |
| Gaudi::Property< std::vector< std::string > > | m_inputHitmapFiles |
| Gaudi::Property< std::vector< std::string > > | m_inputTFiles |
| std::vector< int > | m_activeIndices {} |
| vector of indices which pass the min-hits cut | |
| int | m_aNDoF = 0 |
| number of active DoF (size of m_activeIndices) | |
| Gaudi::Property< int > | m_maxReadErrors |
| Gaudi::Property< bool > | m_AlignIBLbutNotPixel {this, "AlignIBLbutNotPixel", false} |
| Gaudi::Property< bool > | m_AlignPixelbutNotIBL {this, "AlignPixelbutNotIBL", false} |
| Gaudi::Property< bool > | m_DeactivateSCT_ECA_LastDisk {this, "DeactivateSCT_ECA_LastDisk", false} |
| Gaudi::Property< bool > | m_Remove_Pixel_Tx {this, "Remove_Pixel_Tx", false} |
| Gaudi::Property< bool > | m_Remove_Pixel_Ty {this, "Remove_Pixel_Ty", false} |
| Gaudi::Property< bool > | m_Remove_Pixel_Tz {this, "Remove_Pixel_Tz", false} |
| Gaudi::Property< bool > | m_Remove_Pixel_Rx {this, "Remove_Pixel_Rx", false} |
| Gaudi::Property< bool > | m_Remove_Pixel_Ry {this, "Remove_Pixel_Ry", false} |
| Gaudi::Property< bool > | m_Remove_Pixel_Rz {this, "Remove_Pixel_Rz", false} |
| Gaudi::Property< bool > | m_Remove_IBL_Tx {this, "Remove_IBL_Tx", false} |
| Gaudi::Property< bool > | m_Remove_IBL_Ty {this, "Remove_IBL_Ty", false} |
| Gaudi::Property< bool > | m_Remove_IBL_Tz {this, "Remove_IBL_Tz", false} |
| Gaudi::Property< bool > | m_Remove_IBL_Rx {this, "Remove_IBL_Rx", false} |
| Gaudi::Property< bool > | m_Remove_IBL_Ry {this, "Remove_IBL_Ry", false} |
| Gaudi::Property< bool > | m_Remove_IBL_Rz {this, "Remove_IBL_Rz", false} |
| 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 67 of file MatrixTool.cxx.
| bool MatrixTool::accumulateFromBinaries | ( | ) |
accumulates derivates from binary files
Definition at line 635 of file MatrixTool.cxx.
|
virtual |
accumulates derivates from files.
Flag decides if it is binary or TFiles
Implements Trk::IMatrixTool.
Definition at line 622 of file MatrixTool.cxx.
| bool MatrixTool::accumulateFromTFiles | ( | ) |
Store Files in a tfile.
Definition at line 829 of file MatrixTool.cxx.
|
virtual |
Implements Trk::IMatrixTool.
Definition at line 1481 of file MatrixTool.cxx.
|
virtual |
adds first derivative to vector
Implements Trk::IMatrixTool.
Definition at line 1461 of file MatrixTool.cxx.
|
virtual |
adds first derivative to vector for only some entries
Implements Trk::IMatrixTool.
Definition at line 1471 of file MatrixTool.cxx.
|
inlineinherited |
Definition at line 116 of file IMatrixTool.h.
|
virtual |
Implements Trk::IMatrixTool.
Definition at line 1487 of file MatrixTool.cxx.
|
virtual |
adds second derivatives to matrix
Implements Trk::IMatrixTool.
Definition at line 1466 of file MatrixTool.cxx.
|
virtual |
adds first derivative to vector for only some entries
Implements Trk::IMatrixTool.
Definition at line 1476 of file MatrixTool.cxx.
|
virtual |
allocates memory for big matrix and big vector
Implements Trk::IMatrixTool.
Definition at line 104 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 1631 of file MatrixTool.cxx.
| StatusCode MatrixTool::finalize | ( | ) |
initialize
Definition at line 95 of file MatrixTool.cxx.
| StatusCode MatrixTool::initialize | ( | ) |
initialize
Definition at line 74 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 1830 of file MatrixTool.cxx.
|
virtual |
reads/writes matrix entries from/to binary files as necessary
Implements Trk::IMatrixTool.
Definition at line 132 of file MatrixTool.cxx.
| void MatrixTool::printGlobalSolution | ( | std::ostream & | os, |
| const CLHEP::HepSymMatrix * | cov ) |
Definition at line 1493 of file MatrixTool.cxx.
| void MatrixTool::printGlobalSolution | ( | std::ostream & | os, |
| const TMatrixDSym * | cov ) |
Definition at line 1540 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 1578 of file MatrixTool.cxx.
|
private |
Definition at line 2327 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 1140 of file MatrixTool.cxx.
|
private |
Definition at line 263 of file MatrixTool.cxx.
|
private |
Definition at line 1637 of file MatrixTool.cxx.
|
private |
Definition at line 505 of file MatrixTool.cxx.
|
private |
Definition at line 137 of file MatrixTool.cxx.
|
private |
Definition at line 2156 of file MatrixTool.cxx.
|
private |
Definition at line 1738 of file MatrixTool.cxx.
| void MatrixTool::storeInTFile | ( | const TString & | filename | ) |
Store Files in a tfile.
Definition at line 734 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 2290 of file MatrixTool.cxx.
|
private |
|
private |
Definition at line 171 of file MatrixTool.h.
|
private |
Definition at line 255 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 257 of file MatrixTool.h.
|
private |
number of active DoF (size of m_activeIndices)
Definition at line 249 of file MatrixTool.h.
|
private |
matrix to contain second derivative terms to be used for alignment
Definition at line 146 of file MatrixTool.h.
|
private |
vector to contain first derivative terms to be used for alignment
Definition at line 149 of file MatrixTool.h.
|
private |
Definition at line 214 of file MatrixTool.h.
|
private |
Definition at line 174 of file MatrixTool.h.
|
private |
Definition at line 260 of file MatrixTool.h.
|
privateinherited |
Pointer to StoreGate (detector store by default)
Definition at line 393 of file AthCommonDataStore.h.
|
private |
Definition at line 154 of file MatrixTool.h.
|
private |
Definition at line 169 of file MatrixTool.h.
|
private |
Definition at line 156 of file MatrixTool.h.
|
privateinherited |
Pointer to StoreGate (event store by default)
Definition at line 390 of file AthCommonDataStore.h.
|
private |
Definition at line 240 of file MatrixTool.h.
|
private |
Definition at line 233 of file MatrixTool.h.
|
private |
Definition at line 244 of file MatrixTool.h.
|
private |
Definition at line 236 of file MatrixTool.h.
|
protectedinherited |
logfile output stream
Definition at line 98 of file IMatrixTool.h.
|
private |
Definition at line 251 of file MatrixTool.h.
|
private |
Definition at line 163 of file MatrixTool.h.
|
private |
Definition at line 165 of file MatrixTool.h.
|
private |
Definition at line 161 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 |
Definition at line 218 of file MatrixTool.h.
|
private |
Definition at line 220 of file MatrixTool.h.
|
private |
Definition at line 222 of file MatrixTool.h.
|
private |
Definition at line 167 of file MatrixTool.h.
|
private |
Definition at line 193 of file MatrixTool.h.
|
private |
Definition at line 198 of file MatrixTool.h.
|
private |
Definition at line 275 of file MatrixTool.h.
|
private |
Definition at line 276 of file MatrixTool.h.
|
private |
Definition at line 277 of file MatrixTool.h.
|
private |
Definition at line 272 of file MatrixTool.h.
|
private |
Definition at line 273 of file MatrixTool.h.
|
private |
Definition at line 274 of file MatrixTool.h.
|
private |
Definition at line 267 of file MatrixTool.h.
|
private |
Definition at line 268 of file MatrixTool.h.
|
private |
Definition at line 269 of file MatrixTool.h.
|
private |
Definition at line 264 of file MatrixTool.h.
|
private |
Definition at line 265 of file MatrixTool.h.
|
private |
Definition at line 266 of file MatrixTool.h.
|
private |
Definition at line 211 of file MatrixTool.h.
|
private |
Definition at line 201 of file MatrixTool.h.
|
private |
Definition at line 228 of file MatrixTool.h.
|
private |
Definition at line 230 of file MatrixTool.h.
|
private |
scale for big matrix and vector normalization
Definition at line 204 of file MatrixTool.h.
|
private |
Definition at line 205 of file MatrixTool.h.
|
private |
Definition at line 208 of file MatrixTool.h.
|
private |
Definition at line 159 of file MatrixTool.h.
|
private |
Definition at line 225 of file MatrixTool.h.
|
private |
flag to use AlSpaMat for the big matrix (default is AlSymMat)
Definition at line 152 of file MatrixTool.h.
|
privateinherited |
Definition at line 399 of file AthCommonDataStore.h.
|
privateinherited |
Definition at line 398 of file AthCommonDataStore.h.
|
private |
Definition at line 182 of file MatrixTool.h.
|
private |
Definition at line 184 of file MatrixTool.h.
|
private |
Definition at line 189 of file MatrixTool.h.
|
private |
Definition at line 191 of file MatrixTool.h.
|
private |
Definition at line 178 of file MatrixTool.h.
|
private |
Definition at line 180 of file MatrixTool.h.
|
private |
Definition at line 186 of file MatrixTool.h.
|
private |
Definition at line 196 of file MatrixTool.h.
|
private |
Definition at line 176 of file MatrixTool.h.