ATLAS Offline Software
Loading...
Searching...
No Matches
CaloSwGap_v2.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/CaloSwGap_v2.py
5# Created: Nov 2006, sss
6# Purpose: Gap correction, v2.
7#
8# This correction was derived by Scott Snyder using DC2 MC files,
9# reconstructed with 8.6.0. Electrons at 50, 100, and 200 GeV were used.
10#
11# This was added in LArClusterRec-02-05-27, in 9.4.0.
12#
13# More details:
14#
15# \def\brocket#1{\left\langle #1 \right\rangle}
16# This correction attempts to correct for the energy lost in the gap
17# between the cryostats. To improve the energy resolution in this
18# region, we look in the tile calorimeter scintillator
19# (TileGap3), and sum the energy in a rectangular region
20# of $\Delta\eta=\pm0.2$, $\Delta\phi=\pm2\pi/64$ around the EM cluster.
21# We form a corrected energy as a weighted sum:
22#
23# \begin{equation}
24# E' = aE_c + bE_s,
25# \end{equation}
26#
27# where $E_c$ and $E_s$ are the cluster and scintillator energies,
28# respectively. It is convenient to redefine the weights like this:
29#
30# \begin{equation}
31# E' = A(E_c + \alpha E_s),
32# \end{equation}
33#
34# The weights are defined as a function of $|\eta|$.
35#
36# To begin with, we need to define what we want the result of this
37# correction to be. We'd like to avoid having to use detailed MC
38# information about energy deposited in the dead material, both for
39# simplicity and also so that the same method may be used on test beam
40# (or even collider) data. We do this by fitting a function to the plot
41# of $R\equiv\Emeas/\Etrue$ over the range outside of the gap,
42# and interpolating it over the gap.
43# To be specific, we fit a quartic polynomial, over the regions
44# 0.1--0.75, 0.85--1.3, and 1.6--2.4. The result of this fit will
45# be denoted $\mu(|\eta|)$.
46#
47# To derive $A$ and $\alpha$ for a given sample, we can then write
48# (for each $|\eta|$ bin):
49#
50# \begin{equation}
51# A = {\mu \over \brocket{E_c} + \alpha\brocket{E_s}}
52# \end{equation}
53#
54# Then we can fix $\alpha$ by demanding that the uncertainty in
55# the corrected energy be a minimum:
56#
57# \begin{eqnarray}
58# s^2_{E'} &=& \brocket{{E'}^2} - \mu^2\\
59# &=& A^2\left[\brocket{E_c^2} + 2\alpha\brocket{E_cE_s} +
60# \alpha^2\brocket{E_s^2}\right] -\\
61# & &
62# A^2\left[\brocket{E_c}^2 + 2\alpha\brocket{E_c}\brocket{E_s} +
63# \alpha^2\brocket{E_s}^2\right].
64# \end{eqnarray}
65#
66# Note that $s^2_c = \brocket{E_c^2} - \brocket{E_c}^2$, etc., so:
67#
68# \begin{equation}
69# s^2_{E'} = A^2\left[s^2_c + \alpha^2s^2_s + 2\alpha\gamma\right],
70# \end{equation}
71#
72# where $\gamma = \brocket{E_cE_s} - \brocket{E_c}\brocket{E_s}$.
73#
74# Then,
75#
76# \begin{equation}
77# {\partial s^2\over\partial\alpha} =
78# 2A^2\left[ -{\brocket{E_s}\over\brocket{E_c} + \alpha\brocket{E_s}}
79# \left(s^2_c + \alpha^2s^2_s + 2\alpha\gamma\right)
80# + \alpha s^2_s + \gamma \right].
81# \end{equation}
82#
83# Setting this to zero yields
84#
85# \begin{equation}
86# \alpha = {\brocket{E_s}s^2_c - \brocket{E_c}\gamma \over
87# \brocket{E_c}s^2_s - \brocket{E_s}\gamma}.
88# \end{equation}
89#
90# In the region $|\eta|<1.35$,
91# there very little scintillator energy, so the large variation
92# of $\alpha$ here doesn't make much difference. Other than that,
93# $A$ and $\alpha$ are pretty much consistent across the three samples
94# except in the very center of the gap, $1.45<|\eta|<1.5$. Therefore,
95# we will average over all the energies and derive a single gap
96# correction. Any residual energy dependence will be folded into the
97# next correction.
98#
99# Specifically, we do this averaging by setting
100# %
101# \begin{equation}
102# A = \sum_i{\mu_i \over \brocket{E_{ci}} + \alpha\brocket{E_{si}}}
103# \end{equation}
104# %
105# and then
106# %
107# \begin{equation}
108# s^2_{E'} = A^2\sum_i\left[s^2_{ci} + \alpha^2s^2_{si} + 2\alpha\gamma_i\right].
109# \end{equation}
110#
111
112
113from CaloClusterCorrection.constants import CALOCORR_CLUSTER
114
115
116
118
119CaloSwGap_v2 = [
120 # escale wgapSci offset
121 [1.303750, 1.016806, 1.683127, 0.0],
122 [1.311250, 1.015786, 4.305477, 0.0],
123 [1.318750, 1.015267, 5.610438, 0.0],
124 [1.326250, 1.022010, 0.616439, 0.0],
125 [1.333750, 1.022342, 1.376083, 0.0],
126 [1.341250, 1.024709, 1.997833, 0.0],
127 [1.348750, 1.029334, 0.765594, 0.0],
128 [1.356250, 1.033014, 1.683585, 0.0],
129 [1.363750, 1.039184, 1.455713, 0.0],
130 [1.371250, 1.050692, 0.756170, 0.0],
131 [1.378750, 1.045414, 0.812620, 0.0],
132 [1.386250, 1.037649, 1.444074, 0.0],
133 [1.393750, 1.039127, 1.336271, 0.0],
134 [1.401250, 1.046041, 1.215431, 0.0],
135 [1.408750, 1.037376, 1.142844, 0.0],
136 [1.416250, 1.023183, 1.481310, 0.0],
137 [1.423750, 1.026816, 1.354458, 0.0],
138 [1.431250, 1.034325, 1.342707, 0.0],
139 [1.438750, 1.045756, 1.275463, 0.0],
140 [1.446250, 1.077950, 1.187051, 0.0],
141 [1.453750, 1.112825, 1.081919, 0.0],
142 [1.461250, 1.139116, 1.144534, 0.0],
143 [1.468750, 1.132502, 1.423852, 0.0],
144 [1.476250, 0.980396, 2.118332, 0.0],
145 [1.483750, 0.971699, 2.144619, 0.0],
146 [1.491250, 0.832878, 2.890122, 0.0],
147 [1.498750, 0.976646, 1.659909, 0.0],
148 [1.506250, 1.009499, 1.281173, 0.0],
149 [1.513750, 0.963686, 1.395732, 0.0],
150 [1.521250, 0.920715, 1.648667, 0.0],
151 [1.528750, 0.904699, 1.641731, 0.0],
152 [1.536250, 0.928021, 1.305559, 0.0],
153 [1.543750, 0.938568, 1.163320, 0.0],
154 [1.551250, 0.944110, 1.127526, 0.0],
155 [1.558750, 0.953431, 1.108617, 0.0],
156 [1.566250, 0.949993, 1.408784, 0.0],
157 [1.573750, 0.943903, 1.644857, 0.0],
158 [1.581250, 0.950200, 1.379264, 0.0],
159 [1.588750, 0.947081, 1.684241, 0.0],
160 [1.596250, 0.951890, 1.474423, 0.0]
161 ]
162
163
164
165
166
168 region = CALOCORR_CLUSTER
169 etamin_crack = 1.3
170 etamax_crack = 1.6
171 degree = 3
172 use_raw_eta = False
173 correction = CaloSwGap_v2