Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Properties
Related Functions
:
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
v
w
x
z
Files
File List
File Members
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Variables
$
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Enumerations
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
v
x
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
GitLab
LXR
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
MuonSpectrometer
MuonCalib
MdtCalib
MdtCalibData
src
CalibParamSorter.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3
*/
4
#include <
MdtCalibData/CalibParamSorter.h
>
5
6
namespace
MuonCalib
{
7
8
CalibParamSorter::CalibParamSorter
(
double
_tol) :
9
m_tolerance{_tol}{}
10
11
int
CalibParamSorter::compare
(
const
std::vector<double>&
a
,
const
std::vector<double>&
b
)
const
{
12
if
(
a
.size() !=
b
.size())
return
a
.size() <
b
.size() ? -1 : 1;
13
for
(
unsigned
int
i
=0 ;
i
<
a
.size() ; ++
i
) {
14
const
double
d
=
a
[
i
] -
b
[
i
];
15
if
(std::abs(
d
) >
m_tolerance
) {
16
return
d
< 0. ? -1 : 1;
17
}
18
}
19
return
0;
20
}
21
int
CalibParamSorter::compare
(
const
CalibFunc
&
a
,
const
CalibFunc
&
b
)
const
{
22
if
(
a
.name() !=
b
.name())
return
a
.name() <
b
.name() ? -1 : 1;
23
return
compare
(
a
.parameters() ,
b
.parameters());
24
}
25
int
CalibParamSorter::compare
(
const
MdtRtRelation
&
a
,
const
MdtRtRelation
&
b
)
const
{
26
const
int
rtCmp =
compare
(*
a
.rt() , *
b
.rt());
27
if
(rtCmp)
return
rtCmp;
28
return
compare
(*
a
.rtRes(), *
b
.rtRes());
29
}
30
int
CalibParamSorter::compare
(
const
SingleTubeCalib
&
a
,
const
SingleTubeCalib
&
b
)
const
{
31
if
( std::abs(
a
.t0 -
b
.t0) >
m_tolerance
) {
32
return
a
.t0 <
b
.t0 ? -1 : 1;
33
}
34
if
(std::abs(
a
.adcCal -
b
.adcCal) >
m_tolerance
) {
35
return
a
.adcCal <
b
.adcCal ? - 1 : 1;
36
}
37
if
(
a
.statusCode !=
b
.statusCode) {
38
return
a
.statusCode <
b
.statusCode ? -1 : 1;
39
}
40
return
0;
41
}
42
43
bool
CalibParamSorter::operator()
(
const
SingleTubeCalib
*
a
,
const
SingleTubeCalib
*
b
)
const
{
44
return
compare
(*
a
, *
b
) < 0;
45
}
46
bool
CalibParamSorter::operator()
(
const
CalibFunc
*
a
,
const
CalibFunc
*
b
)
const
{
47
return
compare
(*
a
, *
b
) < 0;
48
}
49
bool
CalibParamSorter::operator()
(
const
MdtFullCalibData::RtRelationPtr
&
a
,
50
const
MdtFullCalibData::RtRelationPtr
&
b
)
const
{
51
return
compare
(*
a
, *
b
) < 0;
52
}
53
bool
CalibParamSorter::operator()
(
const
SingleTubeCalibPtr
&
a
,
const
SingleTubeCalibPtr
&
b
)
const
{
54
return
compare
(*
a
, *
b
) < 0;
55
}
56
bool
CalibParamSorter::operator()
(
const
MdtRtRelation
*
a
,
const
MdtRtRelation
*
b
)
const
{
57
return
compare
(*
a
, *
b
) < 0;
58
}
59
60
}
GeoModel::TransientConstSharedPtr< MdtRtRelation >
CalibParamSorter.h
MuonCalib::CalibParamSorter::CalibParamSorter
CalibParamSorter(double _tol)
Definition:
CalibParamSorter.cxx:8
hist_file_dump.d
d
Definition:
hist_file_dump.py:143
MuonCalib::CalibParamSorter::m_tolerance
double m_tolerance
Definition:
CalibParamSorter.h:34
MuonCalib::CalibParamSorter::compare
int compare(const std::vector< double > &a, const std::vector< double > &b) const
Definition:
CalibParamSorter.cxx:11
MuonCalib::MdtRtRelation
class which holds calibration constants per rt-region
Definition:
MdtRtRelation.h:19
lumiFormat.i
int i
Definition:
lumiFormat.py:85
MuonCalib
CscCalcPed - algorithm that finds the Cathode Strip Chamber pedestals from an RDO.
Definition:
CscCalcPed.cxx:22
plotBeamSpotMon.b
b
Definition:
plotBeamSpotMon.py:77
a
TList * a
Definition:
liststreamerinfos.cxx:10
MuonCalib::CalibParamSorter::operator()
bool operator()(const CalibFunc *a, const CalibFunc *b) const
Definition:
CalibParamSorter.cxx:46
MuonCalib::MdtTubeCalibContainer::SingleTubeCalib
Definition:
MdtTubeCalibContainer.h:19
MuonCalib::CalibFunc
generic interface for a calibration function.
Definition:
CalibFunc.h:33
Generated on Fri Mar 14 2025 21:07:55 for ATLAS Offline Software by
1.8.18