ATLAS Offline Software
Loading...
Searching...
No Matches
CaloSwCorrections.py
Go to the documentation of this file.
1# Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
2
3#
4# File: CaloClusterCorrection/python/CaloSwCorrections.py
5# Created: Nov 2006, sss
6# Purpose: Top-level configuration file for EM cluster corrections.
7#
8# The main entry point here is make_CaloSwCorrectionsCfg, which returns
9# ComponentAccumulator with
10# a list of correction tools. It can be used either `le menu' --- selecting
11# a predefined list of correction tools, or `a la carte' --- explicitly
12# specifying the list of tools you want to run.
13#
14# The simplest way of using it is like this:
15#
16# ca = make_CaloSwCorrectionsCfg (flags, key)
17#
18# Here, `key' is a string that denotes the type of cluster which you
19# are correcting. It should be something like `ele55' for 5x5 electrons,
20# `gam35' for 3x5 photons, etc. If this argument is defaulted, `ele55'
21# will be used.
22#
23# Tools should have unique names. If you are using the same corrections
24# multiple times (in offline and in trigger, for example), you should
25# specify the `suffix' argument to make them unique. This is a string
26# that will be added to the end of the tool names.
27#
28# By default, the latest version of the corrections appropriate to the
29# geometry being used will be chosen. You can override this selection
30# by supplying the `version' argument. It may also be overridden
31# with Calo.ClusterCorrection.CaloSwWhichCorrection.
32# For the list of known version
33# names, see the variable `CaloSwCorrection_versions' below.
34# In particular, using version `none' turns off the corrections.
35#
36# Each individual correction has a version as well, independent
37# of the version of the overall correction list. You can override
38# the version to be used for individual correction by adding
39# parameters of the form CORRECTION_version. For example:
40#
41# make_CaloSwCorrectionsCfg (flags ,key, version='v4', lwc_version='v3')
42#
43# uses the `v4' corrections, except that we use version `v3' of the
44# layer weight corrections. You can also specify CORRECTION_key
45# to override the key setting for an individual correction,
46# and CORRECTION_XXX to override any individual parameter
47# of a correction. For example:
48#
49# make_CaloSwCorrectionsCfg (flags, key, lwc_degree=2)
50#
51# makes the full standard set of corrections, except that the interpolation
52# degree for the layer weights correction is changed to 2.
53#
54# You can explicitly specify a list of corrections to run with the
55# `corrlist' argument. For example,
56#
57# make_CaloSwCorrectionsCfg (flags, key, corrlist=[[layers], [update], [gap]])
58#
59# runs only the `layers', `update', and `gap' corrections. The names
60# used here, like `layers' should be functions defined with this
61# signature:
62#
63# def layers (flags, cells_name, suffix, version, key, source, **kw):
64#
65# Definitions for all the standard corrections are contained in this file.
66# Note that the names of these functions are what are used to recognize
67# the CORRNAME in additional arguments of the form CORRNAME_XXX.
68#
69# If you just give the corrections without an explicit version
70# (as in the example above), then what we do is this. We first
71# find the correction list we would use if the corrlist argument
72# had not been specified (the `vcorrlist'). For each correction
73# in the corrlist with no specified version, we look in the vcorrlist
74# for a matching correction. If we find one, the version from the
75# vcorrlist is used. Otherwise, the most recent version of the
76# correction is used.
77#
78# The version of a correction in the corrlist may be explicitly
79# specified as the second element in the list. Additional parameter
80# settings may be specified as following (name, value) tuples
81# in the list. For example:
82#
83# make_CaloSwCorrectionsCfg (flags,
84# key, corrlist=[[layers],
85# [update],
86# [gap, 'v3', ('degree', 2)]])
87#
88# says to use version `v3' of the gap correction, and in addition,
89# to override the interpolation degree to be 2.
90#
91# If the parameter `weighting' is set to True, then the standard correction
92# list will be augmented so that cells will be weighted to avoid
93# double-counting the energy of cells that are in more than one cluster.
94# This may also be enabled by adding the string `_wt' to the end
95# of the correction version name, or by setting the
96# Calo.ClusterCorrections.doSlidingWindowCellWeights flag.
97#
98# Similarly, if the parameter `remdup' is set to True, then the standard
99# correction list will be augmented so that if there are multiple clusters
100# too close together, all but one will be removed.
101# This may also be enabled by adding the string `_remdup' to the end
102# of the correction version name, or by setting the
103# Calo.ClusterCorrection.doSlidingWindowRemoveDuplicates flag.
104#
105# Also, if the parameter `rembad' is set to True, then the standard
106# correction list will be augmented so that clusters deemed to be
107# bad (below an energy threshold) will be removed.
108# This may also be enabled by adding the string `_rembad' to the end
109# of the correction version name, or by setting the
110# Calo.ClusterCorrection.doSlidingWindowRemoveBad flag.
111#
112# There are three ways in which a correction can get configured: from
113# job options, from pool, or from cool. You can specify which ones
114# to use by adding the `source' argument to make_CaloSwCorrectionsCfg.
115# This is one of the following (defined in constants.py):
116#
117# - CALOCORR_JO: Configure from job options
118# - CALOCORR_POOL: Configure from a pool file
119# - CALOCORR_COOL: Configure from cool.
120#
121# The name of a pool file defined in the dictionary of poolfiles.py
122# may also be used.
123#
124# This parameter may be specified as a list of any of these values; in that
125# case, all the possibilities will be tried in order. The default is taken
126# from Calo.ClusterCorrection.defaultSource
127# if it hasn't been explicitly set. The usual setting is to try first
128# cool, then pool, then job options. (Note that there are a couple
129# corrections which are not saved to pool/cool and can thus only
130# be initialized from job options.)
131#
132# You may also override the source for an individual correction
133# by adding an argument with a name of the form CORRECTION_source.
134# The value of this may be anything that could be specified for source;
135# in addition, you may explicitly specify a job options parameter class to use
136# with a string of the form `MODULE.NAME'.
137#
138
139import re
140
141from CaloClusterCorrection.CaloComputeSWcellWeights \
142 import make_CaloComputeSWcellWeights
143from CaloClusterCorrection.CaloSwLayers import make_CaloSwLayers
144from CaloClusterCorrection.CaloSwRfac import make_CaloSwRfac
145from CaloClusterCorrection.CaloSwEtaoff import make_CaloSwEtaoff
146from CaloClusterCorrection.CaloSwPhioff import make_CaloSwPhioff
147from CaloClusterCorrection.CaloSwEtamod import make_CaloSwEtamod
148from CaloClusterCorrection.CaloSwPhimod import make_CaloSwPhimod
149from CaloClusterCorrection.CaloSwClusterUpdate \
150 import make_CaloSwClusterUpdate
151from CaloClusterCorrection.CaloSwGap import make_CaloSwGap
152from CaloClusterCorrection.CaloSwLongWeights import make_CaloSwLongWeights
153from CaloClusterCorrection.CaloSwCalibHitsCalibration import make_CaloSwCalibHitsCalibration
154from CaloClusterCorrection.CaloSwDeadOTX_ps import make_CaloSwDeadOTX_ps
155from CaloClusterCorrection.CaloSwDeadOTX_back import make_CaloSwDeadOTX_back
156from CaloClusterCorrection.CaloSwTransitionRegionsCorr import make_CaloSwTransitionRegionsCorr
157from CaloClusterCorrection.CaloClusterListBadChannel import make_CaloClusterListBadChannel
158from CaloClusterCorrection.CaloSwClcon import make_CaloSwClcon
159from CaloClusterCorrection.CaloSwTime import make_CaloSwTime
160from CaloClusterCorrection.constants import \
161 CALOCORR_SW, EMB1, EME1, EMB2, EME2
162from CaloClusterCorrection.common import CaloClusterCorrSetup
163
164from CaloClusterCorrection.CaloClusterRemoveDuplicates import make_CaloClusterRemoveDuplicates
165from CaloClusterCorrection.CaloClusterRemoveBad import make_CaloClusterRemoveBad
166
167
168
175
176def layers (flags, cells_name, *args, **kw):
177 return make_CaloSwLayers (flags, None, *args, cells_name=cells_name, **kw)
178
179def weight (flags, cells_name, *args, **kw):
180 return make_CaloComputeSWcellWeights (flags, None, *args, **kw)
181
182def rfac (flags, cells_name, *args, **kw):
183 return make_CaloSwRfac (flags, None, *args, **kw)
184
185def etaoff_b1 (flags, cells_name, *args, **kw):
186 return make_CaloSwEtaoff (flags, EMB1, None, *args, **kw)
187
188def etaoff_b2 (flags, cells_name, *args, **kw):
189 return make_CaloSwEtaoff (flags, EMB2, None, *args, **kw)
190
191def etaoff_e1 (flags, cells_name, *args, **kw):
192 return make_CaloSwEtaoff (flags, EME1, None, *args, **kw)
193
194def etaoff_e2 (flags, cells_name, *args, **kw):
195 return make_CaloSwEtaoff (flags, EME2, None, *args, **kw)
196
197def phioff_b2 (flags, cells_name, *args, **kw):
198 return make_CaloSwPhioff (flags, EMB2, None, *args, **kw)
199
200def phioff_e2 (flags, cells_name, *args, **kw):
201 return make_CaloSwPhioff (flags, EME2, None, *args, **kw)
202
203def phimod (flags, cells_name, *args, **kw):
204 return make_CaloSwPhimod (flags, None, *args, **kw)
205
206def etamod (flags, cells_name, *args, **kw):
207 return make_CaloSwEtamod (flags, None, *args, **kw)
208
209def update (flags, cells_name, *args, **kw):
210 return make_CaloSwClusterUpdate (flags, None, *args, **kw)
211
212def gap (flags, cells_name, *args, **kw):
213 return make_CaloSwGap (flags, None, *args, cells_name=cells_name, **kw)
214
215def lwc (flags, cells_name, *args, **kw):
216 return make_CaloSwLongWeights (flags, None, *args, **kw)
217
218def calhits (flags, cells_name, *args, **kw):
219 return make_CaloSwCalibHitsCalibration (flags, None, *args, **kw)
220
221def trcorr (flags, cells_name, *args, **kw):
222 return make_CaloSwTransitionRegionsCorr (flags, None, *args, **kw)
223
224def deadOTXps (flags, cells_name, *args, **kw):
225 return make_CaloSwDeadOTX_ps (flags, None, *args, **kw )
226
227def deadOTXback (flags, cells_name, *args, **kw):
228 return make_CaloSwDeadOTX_back (flags, None, *args, **kw )
229
230def clcon (flags, cells_name, *args, **kw):
231 return make_CaloSwClcon (flags, None, *args, **kw)
232
233def removeduplicates (flags, cells_name, *args, **kw):
234 return make_CaloClusterRemoveDuplicates (flags, None, *args, **kw)
235
236def removebad (flags, cells_name, *args, **kw):
237 return make_CaloClusterRemoveBad (flags, None, *args, **kw)
238
239def listBadChannel (flags, cells_name, *args, **kw):
240 return make_CaloClusterListBadChannel (flags, CALOCORR_SW, None, *args, **kw)
241
242def time (flags, cells_name, *args, **kw):
243 return make_CaloSwTime (flags, None, *args, **kw)
244
245
246
249
250def _version_match (version, fragment):
251 pat = '(_' + fragment + ')(_|$)'
252 m = re.search (pat, version)
253 ret = False
254 if m:
255 ret = True
256 version = version[:m.start(1)] + version[m.end(1):]
257 return (ret, version)
258
259
260class CaloSwCorrectionsSetup (CaloClusterCorrSetup):
261
262 name = "EM sliding-window"
263 version_override_flag_name = 'caloSwWhichCorrection'
264 correction_generation_flag_name = 'caloSwGeneration'
265 # There was a -13, but it apparently didn't get written to DBs.
266 # Next should be -14.
267 correction_generation_default = "00-02-12"
268
269
271 versions = {
272
273 # A special case: disable all corrections except those
274 # technically required.
275 'none' : [[layers, 100],
276 [update, 300]
277 ],
278
279 # The original Geant3-based corrections, translated from
280 # the original Fortran reconstruction code.
281 'g3' : [[layers, 100],
282 [etaoff_b2, 'g3', 201],
283 [etaoff_e2, 'g3', 202],
284 [phioff_b2, 'g3', 203],
285 [phioff_e2, 'g3', 204],
286 [etaoff_b1, 'g3', 205],
287 [etaoff_e1, 'g3', 206],
288 [phimod, 'g3', 250],
289 [etamod, 'g3', 251],
290 [update, 'dont_update_e', 300],
291 [clcon, 'g3', 410],
292 [gap, 'g3', 420],
293 [time, 801]],
294
295 # This is the same as what was in 10.0.0.
296 # This uses the old layer weights correction, from release 9,
297 # which were for a single cluster size only.
298 # An additional eta- and E-dependent correction is made
299 # before the layer weights correction; this correction was
300 # tuned to make the Ereco/Etrue ratios come out to 1.
301 # It was tuned on DC2 single-electron samples at energies
302 # of 50, 100, and 200 GeV; simple Gaussian fits were used
303 # to extract the peak positions.
304 'DC2' : [[layers, 100],
305 [etaoff_b2, 'v2', 201],
306 [etaoff_e2, 'v2', 202],
307 [phioff_b2, 'v2', 203],
308 [phioff_e2, 'v2', 204],
309 [etaoff_b1, 'v2', 205],
310 [etaoff_e1, 'v2', 206],
311 [phimod, 'v2', 250],
312 [etamod, 'v2', 251],
313 [update, 'dont_update_e', 300],
314 [gap, 'v2', 401],
315 [clcon, 'dc2', 410],
316 [lwc, 'old', 450],
317 [time, 801]],
318
319 # This scheme uses the new layer weight corrections from Stathes,
320 # based on 9.0.4 MC. These are now evaluated for multiple
321 # cluster sizes. In addition, there is a final
322 # eta- and E-dependent correction made after the layer weights
323 # correction, tuned to make the Ereco/Etrue ratios come out to 1.
324 # It was tuned on DC2 single-electron samples at energies
325 # of 20, 50, 100, 200, 500, and 1000 GeV. Double Gaussian fits
326 # were used to extract the peak positions.
327 'DC2new' : [[layers, 100],
328 [etaoff_b2, 'v2', 201],
329 [etaoff_e2, 'v2', 202],
330 [phioff_b2, 'v2', 203],
331 [phioff_e2, 'v2', 204],
332 [etaoff_b1, 'v2', 205],
333 [etaoff_e1, 'v2', 206],
334 [phimod, 'v2', 250],
335 [etamod, 'v2', 251],
336 [update, 'dont_update_e', 300],
337 [gap, 'v2', 401],
338 [lwc, '904', 450],
339 [clcon, 'dc2new', 480],
340 [time, 801]],
341
342 # This scheme uses the new layer weight corrections from Stathes,
343 # based on 9.0.4 MC. No additional correction were applied.
344 # Between the DC2 and 9.0.4 samples, there is approximately a 1%
345 # difference observed in the endcap; there may also be a several
346 # percent difference in the gap region. That's why we have separate
347 # options for DC2 and for Rome.
348 'Rome' : [[layers, 100],
349 [etaoff_b2, 'v2', 201],
350 [etaoff_e2, 'v2', 202],
351 [phioff_b2, 'v2', 203],
352 [phioff_e2, 'v2', 204],
353 [etaoff_b1, 'v2', 205],
354 [etaoff_e1, 'v2', 206],
355 [phimod, 'v2', 250],
356 [etamod, 'v2', 251],
357 [update, 'dont_update_e', 300],
358 [gap, 'v2', 401],
359 [lwc, '904gap', 450],
360 [time, 801]],
361
362 # This scheme uses the new layer weight corrections from Stathes,
363 # based on 11.0.41 MC. No additional correction were applied.
364 'DC3-02' : [[layers, 100],
365 [etaoff_b2, 'v2', 201],
366 [etaoff_e2, 'v2', 202],
367 [phioff_b2, 'v2', 203],
368 [phioff_e2, 'v2', 204],
369 [etaoff_b1, 'v2', 205],
370 [etaoff_e1, 'v2', 206],
371 [phimod, 'v2', 250],
372 [etamod, 'v2', 251],
373 [update, 'dont_update_e', 300],
374 [gap, 'v3', 401],
375 [lwc, 'v3', 450],
376 [time, 801]],
377
378 # This scheme has new position corrections, which are now evaluated
379 # for multiple cluster sizes and separately for electrons and photons.
380 # The energy corrections for electrons are the same as DC3-02,
381 # but new corrections have been added for photons.
382 # The modulation corrections are the same as before, except that
383 # they have been moved to the end.
384 'DC3-02-V3' : [[layers, 100],
385 [rfac, 'v3', 150],
386 [etaoff_b1, 'v3', 201],
387 [etaoff_e1, 'v3', 202],
388 [etaoff_b2, 'v3', 203],
389 [etaoff_e2, 'v3', 204],
390 [phioff_b2, 'v3', 205],
391 [phioff_e2, 'v3', 206],
392 [update, 300],
393 [gap, 'v3_1', 401],
394 [lwc, 'v3_1', 450],
395 [phimod, 'v3', 501],
396 [etamod, 'v3', 502],
397 [time, 801]],
398
399 # For 12.0.4.
400 # Corrections have been rederived using 12.0.3 simulation
401 # and reconstruction. Modulation corrections have not yet
402 # been rederived.
403 'v4' : [[layers, 100],
404 [rfac, 'v4', 150],
405 [etaoff_b1, 'v4', 201],
406 [etaoff_e1, 'v4', 202],
407 [etaoff_b2, 'v4', 203],
408 [etaoff_e2, 'v4', 204],
409 [phioff_b2, 'v4', 205],
410 [phioff_e2, 'v4', 206],
411 [update, 300],
412 [gap, 'v4', 401],
413 [lwc, 'v4', 450],
414 [phimod, 'v4', 501],
415 [etamod, 'v4', 502],
416 [time, 801],
417 [listBadChannel, 820]],
418
419 # Same as v4, except for the eta offset; the depth used
420 # to derive this correction is replaced by the optimized one,
421 # and large-statistics samples are used for the 50 and 100 GeV points.
422 'v4_1' : [[layers, 100],
423 [rfac, 'v4', 150],
424 [etaoff_b1, 'v4_1', 201],
425 [etaoff_e1, 'v4_1', 202],
426 [etaoff_b2, 'v4_1', 203],
427 [etaoff_e2, 'v4_1', 204],
428 [phioff_b2, 'v4', 205],
429 [phioff_e2, 'v4', 206],
430 [update, 300],
431 [gap, 'v4', 401],
432 [lwc, 'v4', 450],
433 [phimod, 'v4', 501],
434 [etamod, 'v4', 502],
435 [time, 801],
436 [listBadChannel, 820]],
437
438 # Same as v4, except that the layer weights correction is replaced
439 # by an energy correction derived from calibration hits.
440 'v4_calh' : [[layers, 100],
441 [rfac, 'v4', 150],
442 [etaoff_b1, 'v4', 201],
443 [etaoff_e1, 'v4', 202],
444 [etaoff_b2, 'v4', 203],
445 [etaoff_e2, 'v4', 204],
446 [phioff_b2, 'v4', 205],
447 [phioff_e2, 'v4', 206],
448 [update, 300],
449 [gap, 'v4', 401],
450 [calhits, 'v1', 450],
451 [phimod, 'v4', 501],
452 [etamod, 'v4', 502],
453 [time, 801],
454 [listBadChannel, 820]],
455
456 # Includes updated calhits correction, the v4_1 etaoff correction,
457 # and the new trcorr correction.
458 'v4_1_calh' : [[layers, 100],
459 [rfac, 'v4', 150],
460 [etaoff_b1, 'v4_1', 201],
461 [etaoff_e1, 'v4_1', 202],
462 [etaoff_b2, 'v4_1', 203],
463 [etaoff_e2, 'v4_1', 204],
464 [phioff_b2, 'v4', 205],
465 [phioff_e2, 'v4', 206],
466 [update, 300],
467 [gap, 'v4', 401],
468 [calhits, 'v2', 450],
469 [trcorr, 'v1', 451],
470 [phimod, 'v4', 501],
471 [etamod, 'v4', 502],
472 [time, 801],
473 [listBadChannel, 820]],
474
475 # Layer weights correction updated for release 14.0.0 geometry
476 # (ATLAS-CSC-05-00-00). Other corrections still based on 12.
477 'v5_lwc' : [[layers, 100],
478 [rfac, 'v4', 150],
479 [etaoff_b1, 'v4_1', 201],
480 [etaoff_e1, 'v4_1', 202],
481 [etaoff_b2, 'v4_1', 203],
482 [etaoff_e2, 'v4_1', 204],
483 [phioff_b2, 'v4', 205],
484 [phioff_e2, 'v4', 206],
485 [update, 300],
486 [gap, 'v4', 401],
487 [lwc, 'v5', 450],
488 [phimod, 'v4', 501],
489 [etamod, 'v4', 502],
490 [time, 801],
491 [listBadChannel, 820]],
492
493 # Layer weights correction updated for geometry
494 # (ATLAS-CSC-05-00-00). Other corrections still based on 12.
495 'v6_lwc' : [[layers, 100],
496 [rfac, 'v4', 150],
497 [etaoff_b1, 'v4_1', 201],
498 [etaoff_e1, 'v4_1', 202],
499 [etaoff_b2, 'v4_1', 203],
500 [etaoff_e2, 'v4_1', 204],
501 [phioff_b2, 'v4', 205],
502 [phioff_e2, 'v4', 206],
503 [update, 300],
504 [gap, 'v4', 401],
505 [lwc, 'v6', 450],
506 [phimod, 'v4', 501],
507 [etamod, 'v4', 502],
508 [time, 801],
509 [listBadChannel, 820]],
510
511
512 # Calibration hits and transition region corrections updated
513 # for release 14.0.0 geometry (ATLAS-CSC-05-00-00).
514 # Other corrections still based on 12.
515 'v5_calh' : [[layers, 100],
516 [rfac, 'v4', 150],
517 [etaoff_b1, 'v4_1', 201],
518 [etaoff_e1, 'v4_1', 202],
519 [etaoff_b2, 'v4_1', 203],
520 [etaoff_e2, 'v4_1', 204],
521 [phioff_b2, 'v4', 205],
522 [phioff_e2, 'v4', 206],
523 [update, 300],
524 [gap, 'v4', 401],
525 [calhits, 'v5', 450],
526 [trcorr, 'v5', 451],
527 [phimod, 'v4', 501],
528 [etamod, 'v4', 502],
529 [time, 801],
530 [listBadChannel, 820]],
531
532 # Same as v5_calh, except for some fixes at eta=0 and eta=0.8.
533 'v5_1_calh' : [[layers, 100],
534 [rfac, 'v4', 150],
535 [etaoff_b1, 'v4_1', 201],
536 [etaoff_e1, 'v4_1', 202],
537 [etaoff_b2, 'v4_1', 203],
538 [etaoff_e2, 'v4_1', 204],
539 [phioff_b2, 'v4', 205],
540 [phioff_e2, 'v4', 206],
541 [update, 300],
542 [gap, 'v4', 401],
543 [calhits, 'v5_1', 450],
544 [trcorr, 'v5_1', 451],
545 [phimod, 'v4', 501],
546 [etamod, 'v4', 502],
547 [time, 801],
548 [listBadChannel, 820]],
549
550 # Calibration hits correction using release 14 geometry
551 # (ATLAS-CSC-05-00-00).
552 # Now have separate calibration hits corrections for
553 # converted and unconverted photons.
554 # Other corrections still based on 12.
555 'v6_calh' : [[layers, 100],
556 [rfac, 'v4', 150],
557 [etaoff_b1, 'v4_1', 201],
558 [etaoff_e1, 'v4_1', 202],
559 [etaoff_b2, 'v4_1', 203],
560 [etaoff_e2, 'v4_1', 204],
561 [phioff_b2, 'v4', 205],
562 [phioff_e2, 'v4', 206],
563 [update, 300],
564 [gap, 'v4', 401],
565 [calhits, 'v6', 450],
566 [trcorr, 'v5_1', 451],
567 [phimod, 'v4', 501],
568 [etamod, 'v4', 502],
569 [time, 801],
570 [listBadChannel, 820]],
571
572 # Same as v6_calh, except that the signs of the phi offset correction
573 # and the phase terms in the phi modulation correction are flipped
574 # in the barrel. This because the orientation of the accordions
575 # is backwards in the MC in that region.
576 'v6data_calh' : [[layers, 100],
577 [rfac, 'v4', 150],
578 [etaoff_b1, 'v4_1', 201],
579 [etaoff_e1, 'v4_1', 202],
580 [etaoff_b2, 'v4_1', 203],
581 [etaoff_e2, 'v4_1', 204],
582 [phioff_b2, 'v4data', 205],
583 [phioff_e2, 'v4data', 206],
584 [update, 300],
585 [gap, 'v4', 401],
586 [calhits, 'v6', 450],
587 [trcorr, 'v5_1', 451],
588 [phimod, 'v4data', 501],
589 [etamod, 'v4', 502],
590 [time, 801],
591 [listBadChannel, 820]],
592
593 # Same as v6_calh, except that the signs of the phi offset correction
594 # and the phase terms in the phi modulation correction are flipped
595 # in the barrel. This because the orientation of the accordions
596 # is backwards in the MC in that region.
597 # Also, the out-of-cone correction for calibration hits
598 # is increased by the DATA-MC difference as estimated with W events
599 'v6dataleak_calh' : [[layers, 100],
600 [rfac, 'v4', 150],
601 [etaoff_b1, 'v4_1', 201],
602 [etaoff_e1, 'v4_1', 202],
603 [etaoff_b2, 'v4_1', 203],
604 [etaoff_e2, 'v4_1', 204],
605 [phioff_b2, 'v4data', 205],
606 [phioff_e2, 'v4data', 206],
607 [update, 300],
608 [gap, 'v4', 401],
609 [calhits, 'v6leakdata', 450],
610 [trcorr, 'v5_1', 451],
611 [phimod, 'v4data', 501],
612 [etamod, 'v4', 502],
613 [time, 801],
614 [listBadChannel, 820]],
615
616 # Calibration hits correction using release 14 geometry
617 # (ATLAS-CSC-05-00-00).
618 # Corrections for dead OTX added
619 # Other corrections still based on 12.
620 'v7_calh' : [[layers, 100],
621 [rfac, 'v4', 150],
622 [etaoff_b1, 'v4_1', 201],
623 [etaoff_e1, 'v4_1', 202],
624 [etaoff_b2, 'v4_1', 203],
625 [etaoff_e2, 'v4_1', 204],
626 [phioff_b2, 'v4', 205],
627 [phioff_e2, 'v4', 206],
628 [update, 300],
629 [gap, 'v4', 401],
630 [calhits, 'v6', 450],
631 [trcorr, 'v5_1', 451],
632 [deadOTXps, 'v1' , 460],
633 [deadOTXback,'v1' , 461],
634 [phimod, 'v4', 501],
635 [etamod, 'v4', 502],
636 [time, 801],
637 [listBadChannel, 820]],
638
639 # Same as v7_calh, except that the signs of the phi offset correction
640 # and the phase terms in the phi modulation correction are flipped
641 # in the barrel. This because the orientation of the accordions
642 # is backwards in the MC in that region.
643 'v7data_calh' : [[layers, 100],
644 [rfac, 'v4', 150],
645 [etaoff_b1, 'v4_1', 201],
646 [etaoff_e1, 'v4_1', 202],
647 [etaoff_b2, 'v4_1', 203],
648 [etaoff_e2, 'v4_1', 204],
649 [phioff_b2, 'v4data', 205],
650 [phioff_e2, 'v4data', 206],
651 [update, 300],
652 [gap, 'v4', 401],
653 [calhits, 'v6', 450],
654 [trcorr, 'v5_1', 451],
655 [deadOTXps, 'v1' , 460],
656 [deadOTXback,'v1' , 461],
657 [phimod, 'v4data', 501],
658 [etamod, 'v4', 502],
659 [time, 801],
660 [listBadChannel, 820]],
661
662 # Same as v7_calh, except that the signs of the phi offset correction
663 # and the phase terms in the phi modulation correction are flipped
664 # in the barrel. This because the orientation of the accordions
665 # is backwards in the MC in that region.
666 # Also, the out-of-cone correction for calibration hits
667 # is increased by the DATA-MC difference as estimated with W events
668 'v7dataleak_calh' : [[layers, 100],
669 [rfac, 'v4', 150],
670 [etaoff_b1, 'v4_1', 201],
671 [etaoff_e1, 'v4_1', 202],
672 [etaoff_b2, 'v4_1', 203],
673 [etaoff_e2, 'v4_1', 204],
674 [phioff_b2, 'v4data', 205],
675 [phioff_e2, 'v4data', 206],
676 [update, 300],
677 [gap, 'v4', 401],
678 [calhits, 'v6leakdata', 450],
679 [trcorr, 'v5_1', 451],
680 [deadOTXps, 'v1' , 460],
681 [deadOTXback,'v1' , 461],
682 [phimod, 'v4data', 501],
683 [etamod, 'v4', 502],
684 [time, 801],
685 [listBadChannel, 820]],
686
687 # Same as v7_calh + Update of the calibration hit correction from v6 to v8 (derived from ATLAS-GEO-16) for MC
688 'v8_calh' : [[layers, 100],
689 [rfac, 'v4', 150],
690 [etaoff_b1, 'v4_1', 201],
691 [etaoff_e1, 'v4_1', 202],
692 [etaoff_b2, 'v4_1', 203],
693 [etaoff_e2, 'v4_1', 204],
694 [phioff_b2, 'v4', 205],
695 [phioff_e2, 'v4', 206],
696 [update, 300],
697 [gap, 'v4', 401],
698 [calhits, 'v8', 450],
699 [trcorr, 'v5_1', 451],
700 [deadOTXps, 'v1' , 460],
701 [deadOTXback,'v1' , 461],
702 [phimod, 'v4' , 501],
703 [etamod, 'v4', 502],
704 [time, 801],
705 [listBadChannel, 820]],
706
707
708 # Same as v7dataleak_calh + Update of the calibration hit correction from v6 to v8 (derived from ATLAS-GEO-16) for MC
709 'v8dataleak_calh' : [[layers, 100],
710 [rfac, 'v4', 150],
711 [etaoff_b1, 'v4_1', 201],
712 [etaoff_e1, 'v4_1', 202],
713 [etaoff_b2, 'v4_1', 203],
714 [etaoff_e2, 'v4_1', 204],
715 [phioff_b2, 'v4data', 205],
716 [phioff_e2, 'v4data', 206],
717 [update, 300],
718 [gap, 'v4', 401],
719 [calhits, 'v8leakdata', 450],
720 [trcorr, 'v5_1', 451],
721 [deadOTXps, 'v1' , 460],
722 [deadOTXback,'v1' , 461],
723 [phimod, 'v4data', 501],
724 [etamod, 'v4', 502],
725 [time, 801],
726 [listBadChannel, 820]],
727
728 # Same as v8_calh + Update of the calibration hit correction from v8 to v9 (derived from ATLAS-GEO-18-01) for MC
729 'v9_calh' : [[layers, 100],
730 [rfac, 'v4', 150],
731 [etaoff_b1, 'v4_1', 201],
732 [etaoff_e1, 'v4_1', 202],
733 [etaoff_b2, 'v4_1', 203],
734 [etaoff_e2, 'v4_1', 204],
735 [phioff_b2, 'v4', 205],
736 [phioff_e2, 'v4', 206],
737 [update, 300],
738 [gap, 'v4', 401],
739 [calhits, 'v9', 450],
740 [trcorr, 'v5_1', 451],
741 [deadOTXps, 'v1' , 460],
742 [deadOTXback,'v1' , 461],
743 [phimod, 'v4' , 501],
744 [etamod, 'v4', 502],
745 [time, 801],
746 [listBadChannel, 820]],
747
748
749 # Same as v8dataleak_calh + Update of the calibration hit correction from v8 to v9 (derived from ATLAS-GEO-18-01) for MC
750 # Out-of-cone leakage correction still tuned to data
751 'v9dataleak_calh' : [[layers, 100],
752 [rfac, 'v4', 150],
753 [etaoff_b1, 'v4_1', 201],
754 [etaoff_e1, 'v4_1', 202],
755 [etaoff_b2, 'v4_1', 203],
756 [etaoff_e2, 'v4_1', 204],
757 [phioff_b2, 'v4data', 205],
758 [phioff_e2, 'v4data', 206],
759 [update, 300],
760 [gap, 'v4', 401],
761 [calhits, 'v9leakdata', 450],
762 [trcorr, 'v5_1', 451],
763 [deadOTXps, 'v1' , 460],
764 [deadOTXback,'v1' , 461],
765 [phimod, 'v4data', 501],
766 [etamod, 'v4', 502],
767 [time, 801],
768 [listBadChannel, 820]],
769
770 # v9_calh + new gap correction.
771 'v10_calh' : [[layers, 100],
772 [rfac, 'v4', 150],
773 [etaoff_b1, 'v4_1', 201],
774 [etaoff_e1, 'v4_1', 202],
775 [etaoff_b2, 'v4_1', 203],
776 [etaoff_e2, 'v4_1', 204],
777 [phioff_b2, 'v4', 205],
778 [phioff_e2, 'v4', 206],
779 [update, 300],
780 [gap, 'v5', 401],
781 [calhits, 'v9', 450],
782 [trcorr, 'v5_1', 451],
783 [deadOTXps, 'v1' , 460],
784 [deadOTXback,'v1' , 461],
785 [phimod, 'v4' , 501],
786 [etamod, 'v4', 502],
787 [time, 801],
788 [listBadChannel, 820]],
789
790 # v9dataleak_calh + new gap correction.
791 'v10dataleak_calh' : [[layers, 100],
792 [rfac, 'v4', 150],
793 [etaoff_b1, 'v4_1', 201],
794 [etaoff_e1, 'v4_1', 202],
795 [etaoff_b2, 'v4_1', 203],
796 [etaoff_e2, 'v4_1', 204],
797 [phioff_b2, 'v4data', 205],
798 [phioff_e2, 'v4data', 206],
799 [update, 300],
800 [gap, 'v5', 401],
801 [calhits, 'v9leakdata', 450],
802 [trcorr, 'v5_1', 451],
803 [deadOTXps, 'v1' , 460],
804 [deadOTXback,'v1' , 461],
805 [phimod, 'v4data', 501],
806 [etamod, 'v4', 502],
807 [time, 801],
808 [listBadChannel, 820]],
809
810 # v9_calh + new phi-dependent gap correction.
811 'v11_calh' : [[layers, 100],
812 [rfac, 'v4', 150],
813 [etaoff_b1, 'v4_1', 201],
814 [etaoff_e1, 'v4_1', 202],
815 [etaoff_b2, 'v4_1', 203],
816 [etaoff_e2, 'v4_1', 204],
817 [phioff_b2, 'v4', 205],
818 [phioff_e2, 'v4', 206],
819 [update, 300],
820 [gap, 'v6', 401],
821 [calhits, 'v9', 450],
822 [trcorr, 'v5_1', 451],
823 [deadOTXps, 'v1' , 460],
824 [deadOTXback,'v1' , 461],
825 [phimod, 'v4' , 501],
826 [etamod, 'v4', 502],
827 [time, 801],
828 [listBadChannel, 820]],
829
830 # v9dataleak_calh + new phi-dependent gap correction.
831 'v11dataleak_calh' : [[layers, 100],
832 [rfac, 'v4', 150],
833 [etaoff_b1, 'v4_1', 201],
834 [etaoff_e1, 'v4_1', 202],
835 [etaoff_b2, 'v4_1', 203],
836 [etaoff_e2, 'v4_1', 204],
837 [phioff_b2, 'v4data', 205],
838 [phioff_e2, 'v4data', 206],
839 [update, 300],
840 [gap, 'v6', 401],
841 [calhits, 'v9leakdata', 450],
842 [trcorr, 'v5_1', 451],
843 [deadOTXps, 'v1' , 460],
844 [deadOTXback,'v1' , 461],
845 [phimod, 'v4data', 501],
846 [etamod, 'v4', 502],
847 [time, 801],
848 [listBadChannel, 820]],
849
850
851 # No energy corrections, except for gap.
852 'v11_noecorr' : [[layers, 100],
853 [rfac, 'v4', 150],
854 [etaoff_b1, 'v4_1', 201],
855 [etaoff_e1, 'v4_1', 202],
856 [etaoff_b2, 'v4_1', 203],
857 [etaoff_e2, 'v4_1', 204],
858 [phioff_b2, 'v4', 205],
859 [phioff_e2, 'v4', 206],
860 [update, 300],
861 [gap, 'v6', 401],
862 [time, 801],
863 [listBadChannel, 820]],
864
865 # No energy corrections, except for gap.
866 # phi offset correction sense flipped for data.
867 'v11phiflip_noecorr' : [[layers, 100],
868 [rfac, 'v4', 150],
869 [etaoff_b1, 'v4_1', 201],
870 [etaoff_e1, 'v4_1', 202],
871 [etaoff_b2, 'v4_1', 203],
872 [etaoff_e2, 'v4_1', 204],
873 [phioff_b2, 'v4data', 205],
874 [phioff_e2, 'v4data', 206],
875 [update, 300],
876 [gap, 'v6', 401],
877 [time, 801],
878 [listBadChannel, 820]],
879
880 # Updated with new position corrections from Ewan Hill.
881 # This version was derived from mc12, and so has the negative
882 # part of the calorimeter in the wrong phi direction.
883 # v11_calh + updated rfac, phioff, etaoff: v5.
884 'v12_calh' : [[layers, 100],
885 [rfac, 'v5', 150],
886 [etaoff_b1, 'v5', 201],
887 [etaoff_e1, 'v5', 202],
888 [etaoff_b2, 'v5', 203],
889 [etaoff_e2, 'v5', 204],
890 [phioff_b2, 'v5', 205],
891 [phioff_e2, 'v5', 206],
892 [update, 300],
893 [gap, 'v6', 401],
894 [calhits, 'v9', 450],
895 [trcorr, 'v5_1', 451],
896 [deadOTXps, 'v1' , 460],
897 [deadOTXback,'v1' , 461],
898 [phimod, 'v4' , 501],
899 [etamod, 'v4', 502],
900 [time, 801],
901 [listBadChannel, 820]],
902
903 # Same as v12_calh, but with the sense of phi flipped
904 # in the negative calorimeter. This could be used for mc14.
905 'v12phiflip_calh' : [
906 [layers, 100],
907 [rfac, 'v5', 150],
908 [etaoff_b1, 'v5', 201],
909 [etaoff_e1, 'v5', 202],
910 [etaoff_b2, 'v5', 203],
911 [etaoff_e2, 'v5', 204],
912 [phioff_b2, 'v5data', 205],
913 [phioff_e2, 'v5data', 206],
914 [update, 300],
915 [gap, 'v6', 401],
916 [calhits, 'v9', 450],
917 [trcorr, 'v5_1', 451],
918 [deadOTXps, 'v1' , 460],
919 [deadOTXback,'v1' , 461],
920 [phimod, 'v4' , 501],
921 [etamod, 'v4', 502],
922 [time, 801],
923 [listBadChannel, 820]],
924
925 # Same as v12_calh, but with the sense of phi flipped
926 # in the negative calorimeter and with the OOC adjusted
927 # for the DATA-MC difference as estimated with W events.
928 # This is for data.
929 'v12dataleak_calh' : [
930 [layers, 100],
931 [rfac, 'v5', 150],
932 [etaoff_b1, 'v5', 201],
933 [etaoff_e1, 'v5', 202],
934 [etaoff_b2, 'v5', 203],
935 [etaoff_e2, 'v5', 204],
936 [phioff_b2, 'v5data', 205],
937 [phioff_e2, 'v5data', 206],
938 [update, 300],
939 [gap, 'v6', 401],
940 [calhits, 'v9leakdata', 450],
941 [trcorr, 'v5_1', 451],
942 [deadOTXps, 'v1' , 460],
943 [deadOTXback,'v1' , 461],
944 [phimod, 'v4' , 501],
945 [etamod, 'v4', 502],
946 [time, 801],
947 [listBadChannel, 820]],
948
949
950 # Updated with new position corrections from Ewan Hill.
951 # No energy corrections except for gap.
952 # This version was derived from mc12, and so has the negative
953 # part of the calorimeter in the wrong phi direction.
954 'v12_noecorr' : [[layers, 100],
955 [rfac, 'v5', 150],
956 [etaoff_b1, 'v5', 201],
957 [etaoff_e1, 'v5', 202],
958 [etaoff_b2, 'v5', 203],
959 [etaoff_e2, 'v5', 204],
960 [phioff_b2, 'v5', 205],
961 [phioff_e2, 'v5', 206],
962 [update, 300],
963 [gap, 'v6', 401],
964 [time, 801],
965 [listBadChannel, 820]],
966
967
968 # Same as v12_noecorr, but with the sense of phi flipped
969 # in the negative calorimeter. This could be used for mc14
970 # or for data.
971 'v12phiflip_noecorr' : [
972 [layers, 100],
973 [rfac, 'v5', 150],
974 [etaoff_b1, 'v5', 201],
975 [etaoff_e1, 'v5', 202],
976 [etaoff_b2, 'v5', 203],
977 [etaoff_e2, 'v5', 204],
978 [phioff_b2, 'v5data', 205],
979 [phioff_e2, 'v5data', 206],
980 [update, 300],
981 [gap, 'v6', 401],
982 [time, 801],
983 [listBadChannel, 820]],
984
985 # Same as v12phiflip_noecorr but remove also the gap correction, i.e only position corrections are applied
986 'v12phiflip_noecorrnogap' : [
987 [layers, 100],
988 [rfac, 'v5', 150],
989 [etaoff_b1, 'v5', 201],
990 [etaoff_e1, 'v5', 202],
991 [etaoff_b2, 'v5', 203],
992 [etaoff_e2, 'v5', 204],
993 [phioff_b2, 'v5data', 205],
994 [phioff_e2, 'v5data', 206],
995 [update, 300],
996 [time, 801],
997 [listBadChannel, 820]],
998
999 # Same as v12phiflip_noecorr but for use with superclustering:
1000 # Don't build layers from cells, and don't apply energy corrections.
1001 'v12phiflip_supercluster' : [
1002 [rfac, 'v5', 150],
1003 [etaoff_b1, 'v5', 201],
1004 [etaoff_e1, 'v5', 202],
1005 [etaoff_b2, 'v5', 203],
1006 [etaoff_e2, 'v5', 204],
1007 [phioff_b2, 'v5data', 205],
1008 [phioff_e2, 'v5data', 206],
1009 [update, 300],
1010 [time, 801],
1011 [listBadChannel, 820]],
1012
1013 # Layer weights correction for Atlfast2 simulation
1014 # with ATLAS-CSC-05-00-00 geometry (14.0.0).
1015 'v1_atlfast' : [[layers, 100],
1016 [rfac, 'v4', 150],
1017 [etaoff_b1, 'v4_1', 201],
1018 [etaoff_e1, 'v4_1', 202],
1019 [etaoff_b2, 'v4_1', 203],
1020 [etaoff_e2, 'v4_1', 204],
1021 [phioff_b2, 'v4', 205],
1022 [phioff_e2, 'v4', 206],
1023 [update, 300],
1024 [lwc, 'atlfast_v1', 450],
1025 [phimod, 'v4', 501],
1026 [etamod, 'v4', 502],
1027 [time, 801],
1028 [listBadChannel, 820]],
1029
1030 # Layer weights correction for low energy photons from pi0, to apply to 3x5 clusters seeded by Emtopo
1031 'pi0_v1_lwc' : [[layers, 100],
1032 [update, 300],
1033 [lwc, 'pi0_v1', 450],
1034 [time, 801],
1035 [listBadChannel, 820]],
1036
1037 'pi0_v2_noc' : [[layers, 100],
1038 [update, 300],
1039 [time, 801],
1040 [listBadChannel, 820]],
1041
1042
1043 # Define the list of correction tools to run when
1044 # hierarchical tagging is used.
1045 # All tools that may possibly be used for these corrections
1046 # should be listed here. Tools that are not configured
1047 # from the database should have the proper order and
1048 # version (if any); tools that are configured from the
1049 # database should not have order set and should have the
1050 # version set to `@'.
1051 # The ordering of tools in this list has no significance.
1052 '@' : [[layers, 100],
1053 [rfac, '@'],
1054 [etaoff_b1, '@'],
1055 [etaoff_e1, '@'],
1056 [etaoff_b2, '@'],
1057 [etaoff_e2, '@'],
1058 [phioff_b2, '@'],
1059 [phioff_e2, '@'],
1060 [update, '@'],
1061 [gap, '@'],
1062 [lwc, '@'],
1063 [calhits, '@'],
1064 [deadOTXps, '@'],
1065 [deadOTXback,'@'],
1066 [clcon, '@'],
1067 [trcorr, '@'],
1068 [phimod, '@'],
1069 [etamod, '@'],
1070 [time, 801],
1071 [listBadChannel, 820],
1072 ],
1073 }
1074
1075 # Alias for the newest correction.
1076 newest_version = '@GLOBAL'
1077
1078
1079
1091 geom_versions = [
1092 # Use global tag by default for real data.
1093 ['data-*' , '@GLOBAL'],
1094
1095 ['DC1*' , 'DC2new'],
1096 ['DC2*' , 'DC2new'],
1097 ['ATLAS-00*' , 'DC2new'],
1098 ['ATLAS-DC2*' , 'DC2new'],
1099 ['ATLAS-01*' , 'Rome'],
1100 ['Rome*' , 'Rome'],
1101 ['ATLAS-Rome*' , 'Rome'],
1102 ['DC3*' , 'DC3-02-V3'],
1103 ['ATLAS-DC3*' , 'DC3-02-V3'],
1104 ['CSC*' , 'v4_1_calh'],
1105 ['ATLAS-CSC-00*' , 'v4_1_calh'],
1106 ['ATLAS-CSC-01*' , 'v4_1_calh'],
1107 ['ATLAS-CSC-02*' , 'v4_1_calh'],
1108 ['ATLAS-CSC-03*' , 'v4_1_calh'],
1109 ['ATLAS-CSC-04*' , 'v4_1_calh'],
1110 ['ATLAS-CSC-05*' , 'v6_calh'],
1111 #['ATLAS-GEO-*' , '@GLOBAL'],
1112 ['ATLAS-GEO-*' , newest_version],
1113 #['ATLAS-GEO-*' , 'v11_calh'],
1114 ['ATLAS-GEONF-*' , '@GLOBAL'],
1115 ['ATLAS-GEONSF-*' , '@GLOBAL'],
1116 ['ATLAS-Comm-*' , newest_version],
1117 ['ATLAS-CommNF-*' , newest_version],
1118 ['ATLAS-Commissioning-*' , newest_version],
1119 ]
1120
1121
1122
1125 def make_corrections (self, flags, **kw_in):
1126 kw = flags.Calo.ClusterCorrection.caloSwCorrectionArgs
1127 kw.update (kw_in)
1128
1129 for kk in ['weighting', 'remdup', 'rembad']:
1130 if kk in kw:
1131 setattr (self, kk, kw[kk])
1132 del kw[kk]
1133
1134 return CaloClusterCorrSetup.make_corrections (self, flags, **kw)
1135
1136
1137 def lookup_version (self, flags, version, corrclass):
1138 # Special cases:
1139 # If the version name includes `_wt', turn on weighting.
1140 (self.weighting, version) = _version_match (version, 'wt')
1141
1142 # If the version name includes `_remdup',
1143 # turn on duplicate removal.
1144 (self.remdup, version) = _version_match (version, 'remdup')
1145
1146 # If the version name includes `_rembad',
1147 # turn on bad cluster removal.
1148 (self.rembad, version) = _version_match (version, 'rembad')
1149
1150 # Now, find the standard list of corrections to use.
1151 (vcorrlist, version) = CaloClusterCorrSetup.lookup_version (self,
1152 flags,
1153 version,
1154 corrclass)
1155
1156 # Check global flags.
1157 if flags.Calo.ClusterCorrection.doSlidingWindowCellWeights:
1158 self.weighting = 1
1159 if flags.Calo.ClusterCorrection.doSlidingWindowRemoveDuplicates:
1160 self.remdup = 1
1161 if flags.Calo.ClusterCorrection.doSlidingWindowRemoveBad:
1162 self.rembad = 1
1163
1164 # If weighting or rembad is turned on, make the appropriate additions
1165 # to the list.
1166 if self.weighting or self.rembad:
1167 ilayers = None
1168 for (i, c) in enumerate (vcorrlist):
1169 if c[0] == layers:
1170 ilayers = i
1171 break
1172 if ilayers is not None:
1173 vcorrlist = vcorrlist[:]
1174 if self.rembad:
1175 vcorrlist.insert (ilayers + 1, [removebad, 121])
1176 if self.weighting:
1177 vcorrlist.insert (ilayers + 1, [layers, 'wt', 102])
1178 vcorrlist.insert (ilayers + 1, [weight, 101])
1179
1180 # If remdup is turned on, make the appropriate additions
1181 # to the list.
1182 if self.remdup:
1183 vcorrlist = vcorrlist[:]
1184 vcorrlist.append ([removeduplicates, 901])
1185
1186 return (vcorrlist, version)
1187
1188
1189 def __init__ (self):
1190 self.weighting = False
1191 self.remdup = False
1192 self.rembad = False
1193 return
1194
1195
1196CaloSwCorrections = CaloSwCorrectionsSetup()
1197
1198
1199
1202
1203#
1204# Create and return a CA of correction tools.
1205# FLAGS are the configuration flags.
1206# KEY is a string that specifies the correction type.
1207# SUFFIX is a string to add to the end of each tool name.
1208# VERSION specifies which version of corrections to use.
1209# CORRLIST can be used to explicitly specify which corrections to run.
1210# CELLS_NAME is the SG key to use to find the calorimeter cells,
1211# for those corrections that require it.
1212# SOURCE specifies the source(s) from which tools are configured.
1213# See above for details.
1214# None means to use the default.
1215# If WEIGHTING is true, then cells are weighted to avoid
1216# double-counting energy for cells that are shared between clusters.
1217# If REMDUP is true, then in groups of clusters that are very close
1218# together, we drop all but one.
1219#
1220# For more detailed information, see the comments at the start of this file.
1221#
1223 key = None,
1224 suffix = '',
1225 version = None,
1226 corrlist = None,
1227 cells_name = None,
1228 source = None,
1229 weighting = False,
1230 remdup = False,
1231 rembad = False,
1232 **kw):
1233 return CaloSwCorrections.make_corrections (flags,
1234 corrclass = CALOCORR_SW,
1235 key = key,
1236 suffix = suffix,
1237 version = version,
1238 corrlist = corrlist,
1239 cells_name = cells_name,
1240 source = source,
1241 weighting = weighting,
1242 remdup = remdup,
1243 rembad = rembad,
1244 **kw)
make_corrections(self, flags, **kw_in)
Code to handle cell weighting.
lookup_version(self, flags, version, corrclass)
etaoff_b1(flags, cells_name, *args, **kw)
etaoff_b2(flags, cells_name, *args, **kw)
gap(flags, cells_name, *args, **kw)
phimod(flags, cells_name, *args, **kw)
removeduplicates(flags, cells_name, *args, **kw)
_version_match(version, fragment)
The class responsible for making the corrections.
phioff_b2(flags, cells_name, *args, **kw)
phioff_e2(flags, cells_name, *args, **kw)
make_CaloSwCorrectionsCfg(flags, key=None, suffix='', version=None, corrlist=None, cells_name=None, source=None, weighting=False, remdup=False, rembad=False, **kw)
Main entry point to create a list of correction tools.
etamod(flags, cells_name, *args, **kw)
removebad(flags, cells_name, *args, **kw)
weight(flags, cells_name, *args, **kw)
deadOTXps(flags, cells_name, *args, **kw)
trcorr(flags, cells_name, *args, **kw)
lwc(flags, cells_name, *args, **kw)
update(flags, cells_name, *args, **kw)
deadOTXback(flags, cells_name, *args, **kw)
listBadChannel(flags, cells_name, *args, **kw)
time(flags, cells_name, *args, **kw)
calhits(flags, cells_name, *args, **kw)
clcon(flags, cells_name, *args, **kw)
rfac(flags, cells_name, *args, **kw)
etaoff_e2(flags, cells_name, *args, **kw)
layers(flags, cells_name, *args, **kw)
Here we define wrapper functions to set up all of the standard corrections.
etaoff_e1(flags, cells_name, *args, **kw)