ATLAS Offline Software
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
CaloSwCorrections.CaloSwCorrectionsSetup Class Reference
Inheritance diagram for CaloSwCorrections.CaloSwCorrectionsSetup:
Collaboration diagram for CaloSwCorrections.CaloSwCorrectionsSetup:

Public Member Functions

def make_corrections (self, flags, **kw_in)
 Code to handle cell weighting. More...
 
def lookup_version (self, flags, version, corrclass)
 
def __init__ (self)
 

Public Attributes

 weighting
 
 remdup
 
 rembad
 

Static Public Attributes

string name = "EM sliding-window"
 
string version_override_flag_name = 'caloSwWhichCorrection'
 
string correction_generation_flag_name = 'caloSwGeneration'
 
string correction_generation_default = "00-02-12"
 
dictionary versions
 This is the list of all known correction versions. More...
 
string newest_version = '@GLOBAL'
 
list geom_versions
 Mapping between detector description version and the appropriate correction version. More...
 

Detailed Description

Definition at line 260 of file CaloSwCorrections.py.

Constructor & Destructor Documentation

◆ __init__()

def CaloSwCorrections.CaloSwCorrectionsSetup.__init__ (   self)

Definition at line 1189 of file CaloSwCorrections.py.

1189  def __init__ (self):
1190  self.weighting = False
1191  self.remdup = False
1192  self.rembad = False
1193  return
1194 

Member Function Documentation

◆ lookup_version()

def CaloSwCorrections.CaloSwCorrectionsSetup.lookup_version (   self,
  flags,
  version,
  corrclass 
)

Definition at line 1137 of file CaloSwCorrections.py.

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 

◆ make_corrections()

def CaloSwCorrections.CaloSwCorrectionsSetup.make_corrections (   self,
  flags,
**  kw_in 
)

Code to handle cell weighting.

Definition at line 1125 of file CaloSwCorrections.py.

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 

Member Data Documentation

◆ correction_generation_default

string CaloSwCorrections.CaloSwCorrectionsSetup.correction_generation_default = "00-02-12"
static

Definition at line 267 of file CaloSwCorrections.py.

◆ correction_generation_flag_name

string CaloSwCorrections.CaloSwCorrectionsSetup.correction_generation_flag_name = 'caloSwGeneration'
static

Definition at line 264 of file CaloSwCorrections.py.

◆ geom_versions

list CaloSwCorrections.CaloSwCorrectionsSetup.geom_versions
static
Initial value:
= [
# Use global tag by default for real data.
['data-*' , '@GLOBAL'],
['DC1*' , 'DC2new'],
['DC2*' , 'DC2new'],
['ATLAS-00*' , 'DC2new'],
['ATLAS-DC2*' , 'DC2new'],
['ATLAS-01*' , 'Rome'],
['Rome*' , 'Rome'],
['ATLAS-Rome*' , 'Rome'],
['DC3*' , 'DC3-02-V3'],
['ATLAS-DC3*' , 'DC3-02-V3'],
['CSC*' , 'v4_1_calh'],
['ATLAS-CSC-00*' , 'v4_1_calh'],
['ATLAS-CSC-01*' , 'v4_1_calh'],
['ATLAS-CSC-02*' , 'v4_1_calh'],
['ATLAS-CSC-03*' , 'v4_1_calh'],
['ATLAS-CSC-04*' , 'v4_1_calh'],
['ATLAS-CSC-05*' , 'v6_calh'],
#['ATLAS-GEO-*' , '@GLOBAL'],
['ATLAS-GEO-*' , newest_version],
#['ATLAS-GEO-*' , 'v11_calh'],
['ATLAS-GEONF-*' , '@GLOBAL'],
['ATLAS-GEONSF-*' , '@GLOBAL'],
['ATLAS-Comm-*' , newest_version],
['ATLAS-CommNF-*' , newest_version],
['ATLAS-Commissioning-*' , newest_version],
]

Mapping between detector description version and the appropriate correction version.

Anything not listed here gets the most recent correction.

These are first matched against a string of the form DATASOURCE-GEOM; if that doesn't match, we try just GEOM.

Note: By default, these will be converted to hierarchical tags if we read from cool. To disable this, start the version name with ‘NOHIER#’.

Definition at line 1091 of file CaloSwCorrections.py.

◆ name

string CaloSwCorrections.CaloSwCorrectionsSetup.name = "EM sliding-window"
static

Definition at line 262 of file CaloSwCorrections.py.

◆ newest_version

string CaloSwCorrections.CaloSwCorrectionsSetup.newest_version = '@GLOBAL'
static

Definition at line 1076 of file CaloSwCorrections.py.

◆ rembad

CaloSwCorrections.CaloSwCorrectionsSetup.rembad

Definition at line 1162 of file CaloSwCorrections.py.

◆ remdup

CaloSwCorrections.CaloSwCorrectionsSetup.remdup

Definition at line 1160 of file CaloSwCorrections.py.

◆ version_override_flag_name

string CaloSwCorrections.CaloSwCorrectionsSetup.version_override_flag_name = 'caloSwWhichCorrection'
static

Definition at line 263 of file CaloSwCorrections.py.

◆ versions

dictionary CaloSwCorrections.CaloSwCorrectionsSetup.versions
static

This is the list of all known correction versions.

Definition at line 271 of file CaloSwCorrections.py.

◆ weighting

CaloSwCorrections.CaloSwCorrectionsSetup.weighting

Definition at line 1158 of file CaloSwCorrections.py.


The documentation for this class was generated from the following file:
python.processes.powheg.ZZ.ZZ.__init__
def __init__(self, base_directory, **kwargs)
Constructor: all process options are set here.
Definition: ZZ.py:18