ATLAS Offline Software
MuonSpectrometer
MuonReconstruction
MuonRecEvent
MuonRIO_OnTrack
src
MuonEtaPhiRIO_OnTrackErrorScaling.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3
*/
4
#include "
MuonRIO_OnTrack/MuonEtaPhiRIO_OnTrackErrorScaling.h
"
5
#include <iostream>
6
7
const
char
*
const
MuonEtaPhiRIO_OnTrackErrorScaling::s_names
[
MuonEtaPhiRIO_OnTrackErrorScaling::kNParamTypes
]={
8
"Phi"
,
9
"Eta"
10
};
11
12
namespace
{
13
inline
double
square(
double
a
) {
return
a
*
a
; }
14
}
15
16
CLID
MuonEtaPhiRIO_OnTrackErrorScaling::clid
()
const
{
17
return
ClassID_traits<CondCont<MuonEtaPhiRIO_OnTrackErrorScaling>
>
::ID
();
18
}
19
20
bool
MuonEtaPhiRIO_OnTrackErrorScaling::postProcess
() {
21
checkParameters
(
"MuonEtaPhiRIO_OnTrackErrorScaling"
,
kNParamTypes
,
s_names
, 2);
22
return
true
;
23
}
24
25
Amg::MatrixX
MuonEtaPhiRIO_OnTrackErrorScaling::getScaledCovariance
(
Amg::MatrixX
&& cov_input,
26
const
Trk::ParamDefs
measuredCoord)
const
27
{
28
Amg::MatrixX
newCov(std::move(cov_input));
29
double
a
,
b
= 0.0;
30
if
(measuredCoord ==
Trk::distPhi
) {
31
a
=
params
()[
kPhi
][0];
32
b
=
params
()[
kPhi
][1];
33
}
else
if
(measuredCoord ==
Trk::distEta
) {
34
a
=
params
()[
kEta
][0];
35
b
=
params
()[
kEta
][1];
36
}
else
{
37
throw
std::runtime_error(
"Invalid measured coordinate. Only Trk::distPhi and Trk::distEta are supported."
);
38
}
39
newCov(0,0) *= square(
a
);
40
newCov(0,0) += square(
b
);
41
return
newCov;
42
}
43
44
MuonEtaPhiRIO_OnTrackErrorScaling::clid
virtual CLID clid() const override final
Definition:
MuonEtaPhiRIO_OnTrackErrorScaling.cxx:16
Amg::MatrixX
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
Definition:
EventPrimitives.h:27
ID
std::vector< Identifier > ID
Definition:
CalibHitIDCheck.h:24
MuonEtaPhiRIO_OnTrackErrorScaling::postProcess
virtual bool postProcess() override final
Definition:
MuonEtaPhiRIO_OnTrackErrorScaling.cxx:20
MuonEtaPhiRIO_OnTrackErrorScaling::getScaledCovariance
Amg::MatrixX getScaledCovariance(Amg::MatrixX &&cov_input, const Trk::ParamDefs measuredCoord) const
Definition:
MuonEtaPhiRIO_OnTrackErrorScaling.cxx:25
Trk::ParamDefs
ParamDefs
Definition:
ParamDefs.h:32
MuonEtaPhiRIO_OnTrackErrorScaling::kEta
@ kEta
Definition:
MuonEtaPhiRIO_OnTrackErrorScaling.h:21
MuonEtaPhiRIO_OnTrackErrorScaling::kPhi
@ kPhi
Definition:
MuonEtaPhiRIO_OnTrackErrorScaling.h:20
MuonEtaPhiRIO_OnTrackErrorScaling.h
Trk::distEta
@ distEta
readout for silicon
Definition:
ParamDefs.h:51
ClassID_traits
Default, invalid implementation of ClassID_traits.
Definition:
Control/AthenaKernel/AthenaKernel/ClassID_traits.h:40
CLID
uint32_t CLID
The Class ID type.
Definition:
Event/xAOD/xAODCore/xAODCore/ClassID_traits.h:47
Trk::distPhi
@ distPhi
Definition:
ParamDefs.h:50
MuonEtaPhiRIO_OnTrackErrorScaling::kNParamTypes
@ kNParamTypes
Definition:
MuonEtaPhiRIO_OnTrackErrorScaling.h:22
plotBeamSpotMon.b
b
Definition:
plotBeamSpotMon.py:77
a
TList * a
Definition:
liststreamerinfos.cxx:10
RIO_OnTrackErrorScaling::checkParameters
void checkParameters(const char *label, unsigned int n_paramter_sets, const char *const *param_names, unsigned int n_paramters) const
Convenience function to check whether the number of parameters is correct.
Definition:
RIO_OnTrackErrorScaling.cxx:14
MuonEtaPhiRIO_OnTrackErrorScaling::s_names
static const char *const s_names[kNParamTypes]
Definition:
MuonEtaPhiRIO_OnTrackErrorScaling.h:30
RIO_OnTrackErrorScaling::params
std::vector< std::vector< double > > & params()
Definition:
RIO_OnTrackErrorScaling.h:29
Generated on Thu Nov 7 2024 21:21:56 for ATLAS Offline Software by
1.8.18