ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Calorimeter
CaloClusterCorrection
python
CaloSwPhioff_v5data.py
Go to the documentation of this file.
1
# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
2
3
#
4
# File: CaloClusterCorrection/python/CaloSwPhioff_v5_data.py
5
# Created: Sep 2010, sss
6
# Purpose: Phi position corrections, v5, data version.
7
#
8
# It turns out that the direction of the accordions is backwards in the MC
9
# in the barrel.
10
# So the correction required in the data is opposite that of the MC.
11
# So this correction is identical to _v5, except that the sign is flipped
12
# in the barrel.
13
#
14
15
from
CaloClusterCorrection.constants
import
EMB2, EME2
16
from
CaloClusterCorrection.CaloSwPhioff_v5
import
\
17
CaloSwPhioff_v5_b2_parms, CaloSwPhioff_v5_e2_parms
18
19
20
class
CaloSwPhioff_v5data_b2_parms
:
21
pass
22
23
24
def
_flip_phi2
(corr2):
25
return
[[eta, -off]
for
(eta,off)
in
corr2]
26
def
_flip_phi1
(corr1):
27
return
[
_flip_phi2
(c)
for
c
in
corr1]
28
def
_flip_phi
(corr):
29
return
dict([[k,
_flip_phi1
(v)]
for
k,v
in
corr.items()])
30
31
32
def
_copy_parms
(src, dst):
33
for
(k, v)
in
src.__dict__.items():
34
if
k[0] ==
'_'
:
continue
35
if
k ==
'correction'
:
36
v = _flip_phi (v)
37
setattr (dst, k, v)
38
return
39
40
_copy_parms (CaloSwPhioff_v5_b2_parms, CaloSwPhioff_v5data_b2_parms)
41
42
43
CaloSwPhioff_v5data_parms = { EMB2 : CaloSwPhioff_v5data_b2_parms,
44
EME2 : CaloSwPhioff_v5_e2_parms,
45
}
46
47
CaloSwPhioff_v5data.CaloSwPhioff_v5data_b2_parms
Definition
CaloSwPhioff_v5data.py:20
CaloSwPhioff_v5data._flip_phi
_flip_phi(corr)
Definition
CaloSwPhioff_v5data.py:28
CaloSwPhioff_v5data._copy_parms
_copy_parms(src, dst)
Definition
CaloSwPhioff_v5data.py:32
CaloSwPhioff_v5data._flip_phi1
_flip_phi1(corr1)
Definition
CaloSwPhioff_v5data.py:26
CaloSwPhioff_v5data._flip_phi2
_flip_phi2(corr2)
Definition
CaloSwPhioff_v5data.py:24
Generated on
for ATLAS Offline Software by
1.17.0