ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Tracking
TrkAlignment
TrkAlignGenTools
src
IPCMatrixTool.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
// IPCMatrixTool.cxx
6
7
// AlgTool for creating big matrix and vector, manipulation of entries, and
8
// solving for alignment parameters
9
// Robert Harrington, started 1/5/08 based on SiGlobalChi2Align
10
11
#include "GaudiKernel/StatusCode.h"
12
#include "GaudiKernel/MsgStream.h"
13
#include "GaudiKernel/AlgTool.h"
14
15
#include "
TrkAlignGenTools/IPCMatrixTool.h
"
16
17
#include "
TrkAlgebraUtils/IPCMat.h
"
18
19
#include <string>
20
21
namespace
Trk
{
22
23
//_______________________________________________________________________
24
IPCMatrixTool::IPCMatrixTool
(
const
std::string&
type
,
const
std::string& name,
25
const
IInterface* parent)
26
:
AthAlgTool
(
type
,name,parent)
27
{
28
declareInterface<IMatrixTool>(
this
);
29
30
m_logStream
=
nullptr
;
31
}
32
33
//_______________________________________________________________________
34
IPCMatrixTool::~IPCMatrixTool
()
35
{
36
if
(
nullptr
!=
m_ipcmat
)
delete
m_ipcmat
;
37
m_ipcmat
=
nullptr
;
38
39
}
40
41
//_______________________________________________________________________
42
StatusCode
IPCMatrixTool::initialize
()
43
{
44
msg
(MSG::DEBUG) <<
"initialize() of IPCMatrixTool"
<<
endmsg
;
45
46
return
StatusCode::SUCCESS;
47
}
48
49
//_______________________________________________________________________
50
StatusCode
IPCMatrixTool::finalize
()
51
{
52
msg
(MSG::DEBUG) <<
"finalize() of IPCMatrixTool"
<<
endmsg
;
53
54
return
StatusCode::SUCCESS;
55
}
56
57
//_______________________________________________________________________
58
StatusCode
IPCMatrixTool::allocateMatrix
(
int
nDoF)
59
{
60
61
if
(
nullptr
!=
m_ipcmat
)
ATH_MSG_ERROR
(
"IPCMat already exists!"
);
62
m_ipcmat
=
new
IPCMat
(msgSvc());
63
64
if
(
m_ipcmat
->init()!=StatusCode::SUCCESS) {
65
ATH_MSG_ERROR
(
"Failed to initialize ipcmat "
);
66
return
StatusCode::FAILURE;
67
}
else
68
ATH_MSG_INFO
(
"Success allocating ipcmatrix"
);
69
70
if
(
m_ipcmat
->allocate(nDoF)!=StatusCode::SUCCESS) {
71
ATH_MSG_ERROR
(
"Failed to allocate matrix of size "
<< nDoF);
72
return
StatusCode::FAILURE;
73
}
else
74
ATH_MSG_INFO
(
"Success allocating ipcvector"
);
75
76
return
StatusCode::SUCCESS;
77
}
78
79
//_______________________________________________________________________
80
void
IPCMatrixTool::prepareBinaryFiles
(
int
)
81
{
82
83
}
84
85
//_______________________________________________________________________
86
bool
IPCMatrixTool::accumulateFromFiles
()
87
{
88
89
return
false
;
90
}
91
92
//_______________________________________________________________________
93
int
IPCMatrixTool::solve
()
94
{
95
96
return
-1;
97
}
98
99
//_______________________________________________________________________
100
void
IPCMatrixTool::addFirstDerivatives
(
AlVec
* )
101
{
102
}
103
104
//________________________________________________________________________
105
void
IPCMatrixTool::addSecondDerivatives
(
AlSymMatBase
* )
106
{
107
}
108
109
//________________________________________________________________________
110
void
IPCMatrixTool::addFirstDerivatives
(std::list<int,double>& )
111
{
112
}
113
114
//________________________________________________________________________
115
void
IPCMatrixTool::addSecondDerivatives
(std::list<std::pair<int,int>,
double
> & )
116
{
117
}
118
119
}
// end of namespace
endmsg
#define endmsg
Definition
AnalysisConfig_Ntuple.cxx:61
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition
AthMsgStreamMacros.h:33
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition
AthMsgStreamMacros.h:31
IPCMat.h
IPCMatrixTool.h
AthAlgTool::AthAlgTool
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
Definition
AthAlgTool.cxx:16
AthCommonMsg< AlgTool >::msg
MsgStream & msg() const
Definition
AthCommonMsg.h:24
Trk::AlSymMatBase
contains the base implementation for handling symmertic matrices
Definition
AlSymMatBase.h:38
Trk::AlVec
Definition
AlVec.h:26
Trk::IMatrixTool::m_logStream
std::ostream * m_logStream
logfile output stream
Definition
IMatrixTool.h:98
Trk::IPCMat
Definition
IPCMat.h:37
Trk::IPCMatrixTool::addSecondDerivatives
void addSecondDerivatives(AlSymMatBase *matrix)
adds second derivatives to matrix
Definition
IPCMatrixTool.cxx:105
Trk::IPCMatrixTool::initialize
StatusCode initialize()
initialize
Definition
IPCMatrixTool.cxx:42
Trk::IPCMatrixTool::IPCMatrixTool
IPCMatrixTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor.
Definition
IPCMatrixTool.cxx:24
Trk::IPCMatrixTool::addFirstDerivatives
void addFirstDerivatives(AlVec *vector)
adds first derivative to vector
Definition
IPCMatrixTool.cxx:100
Trk::IPCMatrixTool::accumulateFromFiles
bool accumulateFromFiles()
accumulates from files
Definition
IPCMatrixTool.cxx:86
Trk::IPCMatrixTool::prepareBinaryFiles
void prepareBinaryFiles(int solveOption)
reads/writes matrix entries from/to binary files as necessary
Definition
IPCMatrixTool.cxx:80
Trk::IPCMatrixTool::~IPCMatrixTool
virtual ~IPCMatrixTool()
Virtual destructor.
Definition
IPCMatrixTool.cxx:34
Trk::IPCMatrixTool::solve
int solve()
solves for alignment parameters
Definition
IPCMatrixTool.cxx:93
Trk::IPCMatrixTool::m_ipcmat
IPCMat * m_ipcmat
Pointer to IPCMat, used for parallel processing.
Definition
IPCMatrixTool.h:79
Trk::IPCMatrixTool::allocateMatrix
StatusCode allocateMatrix(int nDoF)
allocates memory for IPC matrix and vector
Definition
IPCMatrixTool.cxx:58
Trk::IPCMatrixTool::finalize
StatusCode finalize()
initialize
Definition
IPCMatrixTool.cxx:50
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition
FakeTrackBuilder.h:9
type
Generated on
for ATLAS Offline Software by
1.17.0