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
Calorimeter
CaloUtils
src
CaloWeightInterpolator.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
//-----------------------------------------------------------------------
6
// File and Version Information:
7
// $Id: CaloWeightInterpolator.cxx,v 1.9 2009-01-27 09:09:15 gunal Exp $
8
//
9
// Description: see CaloWeightInterpolator.h
10
//
11
// Environment:
12
// Software developed for the ATLAS Detector at CERN LHC
13
//
14
// Author List:
15
// Sven Menke
16
//
17
//-----------------------------------------------------------------------
18
19
//-----------------------
20
// This Struct's Header --
21
//-----------------------
22
#include "
CaloUtils/CaloWeightInterpolator.h
"
23
//#include "CaloWeightInterpolator.h"
24
#include <iostream>
25
26
double
CaloWeightInterpolator::getWeight
(std::vector<double> &
w
,
27
std::vector<double> &
x
) {
28
// check input
29
if
(
w
.size() > 1 ) {
30
if
(
w
.size() != (
unsigned
long
)(1<<
x
.size()) ) {
31
std::cerr <<
"CaloWeightInterpolator::getWeight(): vectors have wrong dimension"
32
<< std::endl;
33
return
0;
34
}
35
if
(
x
[0] < 0 ||
x
[0] > 1 ) {
36
std::cerr <<
"CaloWeightInterpolator::getWeight(): coordinate "
<<
x
[0]
37
<<
" out of allowed range [0,1]"
38
<< std::endl;
39
return
0;
40
}
41
std::vector<double> w1(
w
.size()>>1);
42
std::vector<double>
x1
(
x
.size()-1);
43
std::copy
(
x
.begin()+1,
x
.end(),
x1
.begin());
44
for
(
unsigned
int
i
=0;
i
<w1.size();
i
++) {
45
w1[
i
] =
w
[2*
i
]+
x
[0]*(
w
[2*
i
+1]-
w
[2*
i
]);
46
}
47
return
getWeight
(w1,
x1
);
48
}
49
else
return
w
[0];
50
}
plotBeamSpotCompare.x1
x1
Definition:
plotBeamSpotCompare.py:216
x
#define x
CaloWeightInterpolator.h
lumiFormat.i
int i
Definition:
lumiFormat.py:85
calibdata.copy
bool copy
Definition:
calibdata.py:27
python.IoTestsLib.w
def w
Definition:
IoTestsLib.py:200
CaloWeightInterpolator::getWeight
static double getWeight(std::vector< double > &w, std::vector< double > &x)
Definition:
CaloWeightInterpolator.cxx:26
Generated on Sun Mar 23 2025 21:08:22 for ATLAS Offline Software by
1.8.18