ATLAS Offline Software
TileCalorimeter
TileMonitoring
python
TileTBBeamChambersCalibration.py
Go to the documentation of this file.
1
#
2
# Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3
#
4
'''
5
@file TileBeamChambersCalibration.py
6
@brief Python configuration of calibration for TileTB beam chambers
7
'''
8
9
def
getBeamChambersCalibrations
(run):
10
'''
11
This function returns TileTB beam chambers calbirations
12
13
This function supposed to be used for beam chambers calibrations
14
for the following algorithms: TileTBBeamMonitorAlgorithm, TileTBAANtuple
15
'''
16
17
calibrations = {}
18
if
run < 2110000:
19
# It is not supposed to be used for these runs
20
return
calibrations
21
22
calibrations[
'BC1Z'
] = 17348.8
23
calibrations[
'BC1Z_0'
] = 17348.8
24
calibrations[
'BC1Z_90'
] = 15594.05
25
calibrations[
'BC1Z_min90'
] = 15571.8
26
27
calibrations[
'BC2Z'
] = 4404.2
28
calibrations[
'BC2Z_0'
] = 4420.7
29
calibrations[
'BC2Z_90'
] = 2649.45
30
calibrations[
'BC2Z_min90'
] = 2627.2
31
32
if
run <= 2110503:
33
# September TB2021
34
calibrations[
'BC1HorizontalOffset'
] = calibrations[
'BC1X1'
] = -0.156736
35
calibrations[
'BC1HorizontalSlope'
] = calibrations[
'BC1X2'
] = -0.178455
36
calibrations[
'BC1VerticalOffset'
] = calibrations[
'BC1Y1'
] = -0.452977
37
calibrations[
'BC1VerticalSlope'
] = calibrations[
'BC1Y2'
] = -0.17734
38
39
calibrations[
'BC2HorizontalOffset'
] = calibrations[
'BC2X1'
] = 2.88152
40
calibrations[
'BC2HorizontalSlope'
] = calibrations[
'BC2X2'
] = -0.187192
41
calibrations[
'BC2VerticalOffset'
] = calibrations[
'BC2Y1'
] = -1.79832
42
calibrations[
'BC2VerticalSlope'
] = calibrations[
'BC2Y2'
] = -0.190846
43
elif
run <= 2200000:
44
# November TB2021
45
calibrations[
'BC1HorizontalOffset'
] = calibrations[
'BC1X1'
] = -0.0107769
46
calibrations[
'BC1HorizontalSlope'
] = calibrations[
'BC1X2'
] = -0.178204
47
calibrations[
'BC1VerticalOffset'
] = calibrations[
'BC1Y1'
] = -0.625063
48
calibrations[
'BC1VerticalSlope'
] = calibrations[
'BC1Y2'
] = -0.178842
49
50
calibrations[
'BC2HorizontalOffset'
] = calibrations[
'BC2X1'
] = 0.746517
51
calibrations[
'BC2HorizontalSlope'
] = calibrations[
'BC2X2'
] = -0.176083
52
calibrations[
'BC2VerticalOffset'
] = calibrations[
'BC2Y1'
] = 0.49177
53
calibrations[
'BC2VerticalSlope'
] = calibrations[
'BC2Y2'
] = -0.18221
54
elif
run <= 2310000:
55
# June TB2022
56
calibrations[
'BC1HorizontalOffset'
] = calibrations[
'BC1X1'
] = -0.566211
57
calibrations[
'BC1HorizontalSlope'
] = calibrations[
'BC1X2'
] = -0.0513049
58
calibrations[
'BC1VerticalOffset'
] = calibrations[
'BC1Y1'
] = 1.15376
59
calibrations[
'BC1VerticalSlope'
] = calibrations[
'BC1Y2'
] = -0.0514167
60
61
calibrations[
'BC2HorizontalOffset'
] = calibrations[
'BC2X1'
] = -0.163869
62
calibrations[
'BC2HorizontalSlope'
] = calibrations[
'BC2X2'
] = -0.0523055
63
calibrations[
'BC2VerticalOffset'
] = calibrations[
'BC2Y1'
] = -0.0602012
64
calibrations[
'BC2VerticalSlope'
] = calibrations[
'BC2Y2'
] = -0.0532108
65
elif
run <= 2410000:
66
# July TB2023
67
calibrations[
'BC1HorizontalOffset'
] = calibrations[
'BC1X1'
] = 2.465295
68
calibrations[
'BC1HorizontalSlope'
] = calibrations[
'BC1X2'
] = -0.072135
69
calibrations[
'BC1VerticalOffset'
] = calibrations[
'BC1Y1'
] = 2.127854
70
calibrations[
'BC1VerticalSlope'
] = calibrations[
'BC1Y2'
] = -0.073442
71
72
calibrations[
'BC2HorizontalOffset'
] = calibrations[
'BC2X1'
] = -0.317171
73
calibrations[
'BC2HorizontalSlope'
] = calibrations[
'BC2X2'
] = -0.075384
74
calibrations[
'BC2VerticalOffset'
] = calibrations[
'BC2Y1'
] = 1.875657
75
calibrations[
'BC2VerticalSlope'
] = calibrations[
'BC2Y2'
] = -0.076717
76
else
:
77
# May TB2024
78
calibrations[
'BC1HorizontalOffset'
] = calibrations[
'BC1X1'
] = 3.095518
79
calibrations[
'BC1HorizontalSlope'
] = calibrations[
'BC1X2'
] = -0.070485
80
calibrations[
'BC1VerticalOffset'
] = calibrations[
'BC1Y1'
] = 1.324992
81
calibrations[
'BC1VerticalSlope'
] = calibrations[
'BC1Y2'
] = -0.071980
82
83
calibrations[
'BC2HorizontalOffset'
] = calibrations[
'BC2X1'
] = -0.114170
84
calibrations[
'BC2HorizontalSlope'
] = calibrations[
'BC2X2'
] = -0.070819
85
calibrations[
'BC2VerticalOffset'
] = calibrations[
'BC2Y1'
] = -0.001407
86
calibrations[
'BC2VerticalSlope'
] = calibrations[
'BC2Y2'
] = -0.072557
87
88
89
return
calibrations
90
91
92
def
updateBeamChambersCalibrations
(alg, run):
93
'''
94
This function updates TileTB beam chambers calbirations for the algorithm
95
96
This function supposed to be used for beam chambers calibrations
97
for the following algorithms: TileTBBeamMonitorAlgorithm, TileTBAANtuple
98
'''
99
100
# Setup logs
101
from
AthenaCommon.Constants
import
INFO
102
from
AthenaCommon.Logging
import
logging
103
log = logging.getLogger(
'updateBeamChambersCalibrations'
)
104
log.setLevel(INFO)
105
106
calibrations =
getBeamChambersCalibrations
(run)
107
for
k
in
calibrations:
108
if
hasattr(alg, k):
109
log.info(f
'{alg.name}.{k}={calibrations[k]}'
)
110
setattr(alg, k, calibrations[k])
TileTBBeamChambersCalibration.getBeamChambersCalibrations
def getBeamChambersCalibrations(run)
Definition:
TileTBBeamChambersCalibration.py:9
Constants
some useful constants -------------------------------------------------—
TileTBBeamChambersCalibration.updateBeamChambersCalibrations
def updateBeamChambersCalibrations(alg, run)
Definition:
TileTBBeamChambersCalibration.py:92
Generated on Sun Dec 22 2024 21:20:02 for ATLAS Offline Software by
1.8.18