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
w
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
LArCalorimeter
LArRawConditions
src
LArWaveCumul.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
6
#include "
LArRawConditions/LArWaveCumul.h
"
7
#include <math.h>
8
9
10
void
LArWaveCumul::addEvent
(
int
delay
,
int
step
,
11
const
std::vector<double>& Samples )
12
{
13
const
unsigned
int
nSwave =
getSize
() ;
14
const
unsigned
int
nSevt = Samples.size() ;
15
for
(
unsigned
int
i
=0 ;
i
<nSevt ;
i
++ ) {
16
unsigned
int
k
=(
i
+1)*
step
-(
delay
+1);
17
if
(
k
<nSwave) {
18
double
evt
= Samples[
i
] ;
19
int
N
=
m_triggers
[
k
] ;
20
double
amp2 =
m_amplitudes
[
k
]*
m_amplitudes
[
k
];
21
double
sum2 = (
N
-1)*
m_errors
[
k
]*
m_errors
[
k
] +
N
*amp2;
22
23
double
sum
=
m_amplitudes
[
k
] *
N
;
24
m_amplitudes
[
k
] = (
sum
+
evt
) / (
N
+1) ;
25
double
arg
=
N
? ( ( sum2 +
evt
*
evt
) - (
N
+1)*
m_amplitudes
[
k
]*
m_amplitudes
[
k
] )/
N
: 0.;
26
27
// Can happen due to underflow if m_errors is zero and evt is
28
// exactly the same as m_amplitudes.
29
if
(
arg
< 0)
arg
= 0;
30
m_errors
[
k
] = sqrt(
arg
);
31
m_triggers
[
k
] =
N
+ 1 ;
32
33
}
34
}
35
}
36
37
38
39
void
LArWaveCumul::addAccumulatedEvent
(
int
delay
,
int
step
,
40
const
std::vector<double>& SamplesSum ,
41
const
std::vector<double>& Samples2Sum ,
42
unsigned
nTriggers )
43
{
44
if
(!nTriggers)
return
;
// there should be related warnings displayed by the LArLATOMEDecoder
45
const
unsigned
int
nSwave =
getSize
() ;
46
const
unsigned
int
nSevt = SamplesSum.size() ;
47
48
for
(
unsigned
int
i
=0 ;
i
<nSevt ;
i
++ ) {
49
50
unsigned
int
k
=(
i
+1)*
step
-(
delay
+1);
51
52
if
(
k
<nSwave ) {
53
54
int
N1
=
m_triggers
[
k
] ;
55
double
sum1 =
m_amplitudes
[
k
] *
N1
;
56
double
sum12 = (
N1
-1)*
m_errors
[
k
]*
m_errors
[
k
] +
N1
*
m_amplitudes
[
k
]*
m_amplitudes
[
k
] ;
57
58
int
N2
= nTriggers ;
59
double
sum2 = SamplesSum[
i
] ;
60
double
sum22 = Samples2Sum[
i
] ;
61
62
m_triggers
[
k
] =
N1
+
N2
;
63
m_amplitudes
[
k
] = (sum1+sum2)/
m_triggers
[
k
] ;
64
m_errors
[
k
] = std::sqrt(
std::max
(sum12+sum22-
m_amplitudes
[
k
]*
m_amplitudes
[
k
]*
m_triggers
[
k
], 0.)/(
m_triggers
[
k
]-1) ) ;
65
66
}
67
}
68
}
LArWave::m_amplitudes
std::vector< double > m_amplitudes
Definition:
LArWave.h:112
dqt_zlumi_pandas.N2
N2
Definition:
dqt_zlumi_pandas.py:325
LArWave::getSize
size_t getSize() const
number of time samples
Definition:
LArWave.h:62
LArWaveCumul::m_errors
std::vector< double > m_errors
Definition:
LArWaveCumul.h:89
max
constexpr double max()
Definition:
ap_fixedTest.cxx:33
JetTiledMap::N
@ N
Definition:
TiledEtaPhiMap.h:44
LArG4FSStartPointFilter.evt
evt
Definition:
LArG4FSStartPointFilter.py:42
LArWaveCumul::addEvent
void addEvent(int delay, int step, const std::vector< double > &Samples)
add in set of channel responses for a given step/delay
Definition:
LArWaveCumul.cxx:10
convertTimingResiduals.sum
sum
Definition:
convertTimingResiduals.py:55
lumiFormat.i
int i
Definition:
lumiFormat.py:85
dqt_zlumi_pandas.N1
int N1
Definition:
dqt_zlumi_pandas.py:322
delay
double delay(std::size_t d)
Definition:
JetTrigTimerTest.cxx:11
create_dcsc_inputs_sqlite.arg
list arg
Definition:
create_dcsc_inputs_sqlite.py:48
LArWaveCumul::m_triggers
std::vector< int > m_triggers
Definition:
LArWaveCumul.h:90
LArWaveCumul.h
LArCellBinning.step
step
Definition:
LArCellBinning.py:158
LArWaveCumul::addAccumulatedEvent
void addAccumulatedEvent(int delay, int step, const std::vector< double > &SamplesSum, const std::vector< double > &Samples2Sum, unsigned nTriggers)
used when building from LArAccumulatedDigits
Definition:
LArWaveCumul.cxx:39
fitman.k
k
Definition:
fitman.py:528
Generated on Wed May 28 2025 21:13:24 for ATLAS Offline Software by
1.8.18