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

Static Public Member Functions

def overrideFolder (flags)
 
def calibration_dict (flags, dbtag="")
 
def getCalibDBParams (flags, finder, mainparam, input, onlyCellWeight=False, isMC=False)
 

Static Public Attributes

dictionary calibdicV14
 
dictionary calibdicV13
 
dictionary calibdicV12
 
list loaded_folder = []
 
bool forceOverrideFolder = False
 

Detailed Description

Definition at line 33 of file StandardCellWeightCalib.py.

Member Function Documentation

◆ calibration_dict()

def StandardCellWeightCalib.H1Calibration.calibration_dict (   flags,
  dbtag = "" 
)
static

Definition at line 107 of file StandardCellWeightCalib.py.

107  def calibration_dict(flags, dbtag=""):
108  #-- DB tag provided
109  if dbtag != "":
110  calibdic = {
111  "Cone4Topo" : "CaloH1WeightsCone4Topo-"+dbtag,
112  "Cone4Tower" : "CaloH1WeightsCone4Tower-"+dbtag,
113  "ConeTopo" : "CaloH1WeightsConeTopo-"+dbtag,
114  "ConeTower" : "CaloH1WeightsConeTower-"+dbtag,
115  "Kt4Topo" : "CaloH1WeightsKt4Topo-"+dbtag,
116  "Kt4Tower" : "CaloH1WeightsKt4Tower-"+dbtag,
117  "Kt6Topo" : "CaloH1WeightsKt6Topo-"+dbtag,
118  "Kt6Tower" : "CaloH1WeightsKt6Tower-"+dbtag
119  }
120  return calibdic
121  #-- default extraction
122  else:
123  ddv = flags.GeoModel.AtlasVersion
124  #-- establish relation between detector description and calibration
125  if ddv.startswith("ATLAS-CSC"):
126  if ddv >= "ATLAS-CSC-01-00-01":
127  return H1Calibration.calibdicV13
128  else:
129  return H1Calibration.calibdicV12
130  elif ddv.startswith("ATLAS-Comm"):
131  return H1Calibration.calibdicV13
132  else:
133  return H1Calibration.calibdicV14

◆ getCalibDBParams()

def StandardCellWeightCalib.H1Calibration.getCalibDBParams (   flags,
  finder,
  mainparam,
  input,
  onlyCellWeight = False,
  isMC = False 
)
static
Retrieves calibration DB parameters from jet finder specs, returns a triplet (key,folder,tag)

Definition at line 136 of file StandardCellWeightCalib.py.

136  def getCalibDBParams(flags, finder, mainparam, input, onlyCellWeight=False, isMC=False):
137  """ Retrieves calibration DB parameters from jet finder specs, returns a triplet (key,folder,tag)
138  """
139  #-- adapt to DB convention
140  input = input.replace('H1','')
141  param = editParm(mainparam)
142  if param == '7':
143  param = ''
144  #-- get dictionary
145  caldict = H1Calibration.calibration_dict(flags)
146 
147  calibtype = finder+param+input
148  #-- specific calibration
149  if calibtype in caldict:
150  key = 'H1Weights' + calibtype
151  tag = caldict[calibtype]
152  if isMC:
153  folder = '/CALO/Ofl/'
154  tag = "CALOOfl"+tag[4:]
155  else:
156  folder = '/CALO/'
157  folder += 'H1Weights/' + key
158  key = folder
159  return (key,folder,tag)
160  #-- default calibration
161  else:
162  if onlyCellWeight:
163  # then we don't really care : just give back Cone4Tower or Cone4Topo
164  # and avoid the warning below.
165  if 'Topo' in input: return H1Calibration.getCalibDBParams(flags,'Cone',0.4,'H1Topo',onlyCellWeight,isMC)
166  else: return H1Calibration.getCalibDBParams(flags,'Cone',0.4,'H1Tower',onlyCellWeight,isMC)
167  # else try to find a good fall back
168  _logger.warning("getCalibDBParams: no dedicated calibration for %s %s %s", finder,mainparam,input)
169  if finder not in [ 'Kt', 'Cone' ] : finder = 'Cone' # fall back to ATLAS Cone
170  if input not in [ 'Topo', 'Tower' ] : input = 'Tower' # fall back to Tower
171  if finder == 'Kt' : l = [ 0.4, 0.6 ]
172  else: l = [ 0.4, 0.7 ]
173  (m,mainparam) = min( [ (abs(p-mainparam),p) for p in l ] ) # main parameter optimization (??)
174  _logger.warning("getCalibDBParams: defaulted calibration to %s %s %s", finder,mainparam,input)
175  return H1Calibration.getCalibDBParams(flags,finder,mainparam,input,onlyCellWeight,isMC)
176 

◆ overrideFolder()

def StandardCellWeightCalib.H1Calibration.overrideFolder (   flags)
static

Definition at line 99 of file StandardCellWeightCalib.py.

99  def overrideFolder(flags):
100  return H1Calibration.forceOverrideFolder or flags.Input.isMC
101 

Member Data Documentation

◆ calibdicV12

dictionary StandardCellWeightCalib.H1Calibration.calibdicV12
static
Initial value:
= {
"Cone4Topo" : "CaloH1WeightsCone4Topo-00-000",
"Cone4Tower" : "CaloH1WeightsCone4Tower-00-000",
"ConeTopo" : "CaloH1WeightsConeTopo-00-000",
"ConeTower" : "CaloH1WeightsConeTower-00-000",
"Kt4Topo" : "CaloH1WeightsKt4Topo-00-000",
"Kt4Tower" : "CaloH1WeightsKt4Tower-00-000",
"Kt6Topo" : "CaloH1WeightsKt6Topo-00-000",
"Kt6Tower" : "CaloH1WeightsKt6Tower-00-000",
"Cone4TopoAtlFastII" : "CaloH1WeightsCone4TopoAtlFastII-00-000",
"Cone4TowerAtlFastII" : "CaloH1WeightsCone4TowerAtlFastII-00-000",
"ConeTopoAtlFastII" : "CaloH1WeightsConeTopoAtlFastII-00-000",
"ConeTowerAtlFastII" : "CaloH1WeightsConeTowerAtlFastII-00-000",
"Kt4TopoAtlFastII" : "CaloH1WeightsKt4TopoAtlFastII-00-000",
"Kt4TowerAtlFastII" : "CaloH1WeightsKt4TowerAtlFastII-00-000",
"Kt6TopoAtlFastII" : "CaloH1WeightsKt6TopoAtlFastII-00-000",
"Kt6TowerAtlFastII" : "CaloH1WeightsKt6TowerAtlFastII-00-000",
}

Definition at line 74 of file StandardCellWeightCalib.py.

◆ calibdicV13

dictionary StandardCellWeightCalib.H1Calibration.calibdicV13
static
Initial value:
= {
"Cone4Topo" : "CaloH1WeightsCone4Topo-01-000",
"Cone4Tower" : "CaloH1WeightsCone4Tower-01-000",
"ConeTopo" : "CaloH1WeightsConeTopo-01-000",
"ConeTower" : "CaloH1WeightsConeTower-01-000",
"Kt4Topo" : "CaloH1WeightsKt4Topo-01-000",
"Kt4Tower" : "CaloH1WeightsKt4Tower-01-000",
"Kt6Topo" : "CaloH1WeightsKt6Topo-01-000",
"Kt6Tower" : "CaloH1WeightsKt6Tower-01-000",
"Cone4TopoAtlFastII" : "CaloH1WeightsCone4TopoAtlFastII-01-000",
"Cone4TowerAtlFastII" : "CaloH1WeightsCone4TowerAtlFastII-01-000",
"ConeTopoAtlFastII" : "CaloH1WeightsConeTopoAtlFastII-01-000",
"ConeTowerAtlFastII" : "CaloH1WeightsConeTowerAtlFastII-01-000",
"Kt4TopoAtlFastII" : "CaloH1WeightsKt4TopoAtlFastII-01-000",
"Kt4TowerAtlFastII" : "CaloH1WeightsKt4TowerAtlFastII-01-000",
"Kt6TopoAtlFastII" : "CaloH1WeightsKt6TopoAtlFastII-01-000",
"Kt6TowerAtlFastII" : "CaloH1WeightsKt6TowerAtlFastII-01-000",
}

Definition at line 56 of file StandardCellWeightCalib.py.

◆ calibdicV14

dictionary StandardCellWeightCalib.H1Calibration.calibdicV14
static
Initial value:
= {
"Cone4Topo" : "CaloH1WeightsCone4Topo-02-000",
"Cone4Tower" : "CaloH1WeightsCone4Tower-02-000",
"ConeTopo" : "CaloH1WeightsConeTopo-02-000",
"ConeTower" : "CaloH1WeightsConeTower-02-000",
"Kt4Topo" : "CaloH1WeightsKt4Topo-02-000",
"Kt4Tower" : "CaloH1WeightsKt4Tower-02-000",
"Kt6Topo" : "CaloH1WeightsKt6Topo-02-000",
"Kt6Tower" : "CaloH1WeightsKt6Tower-02-000",
"Cone4TopoAtlFastII" : "CaloH1WeightsCone4TopoAtlFastII-02-000",
"Cone4TowerAtlFastII" : "CaloH1WeightsCone4TowerAtlFastII-02-000",
"ConeTopoAtlFastII" : "CaloH1WeightsConeTopoAtlFastII-02-000",
"ConeTowerAtlFastII" : "CaloH1WeightsConeTowerAtlFastII-02-000",
"Kt4TopoAtlFastII" : "CaloH1WeightsKt4TopoAtlFastII-02-000",
"Kt4TowerAtlFastII" : "CaloH1WeightsKt4TowerAtlFastII-02-000",
"Kt6TopoAtlFastII" : "CaloH1WeightsKt6TopoAtlFastII-02-000",
"Kt6TowerAtlFastII" : "CaloH1WeightsKt6TowerAtlFastII-02-000",
}

Definition at line 38 of file StandardCellWeightCalib.py.

◆ forceOverrideFolder

bool StandardCellWeightCalib.H1Calibration.forceOverrideFolder = False
static

Definition at line 97 of file StandardCellWeightCalib.py.

◆ loaded_folder

list StandardCellWeightCalib.H1Calibration.loaded_folder = []
static

Definition at line 94 of file StandardCellWeightCalib.py.


The documentation for this class was generated from the following file:
StandardCellWeightCalib.editParm
def editParm(param)
Definition: StandardCellWeightCalib.py:14
min
#define min(a, b)
Definition: cfImp.cxx:40