ATLAS Offline Software
Loading...
Searching...
No Matches
StandardCellWeightCalib Namespace Reference

Classes

class  H1Calibration

Functions

 editParm (param)
 getCellWeightTool (flags, finder="Cone", mainparam=0.4, input="Topo", onlyCellWeight=False)

Variables

 _logger = logging.getLogger('Calorimeter::StandardCellWeightCalibration')

Function Documentation

◆ editParm()

StandardCellWeightCalib.editParm ( param)

Definition at line 14 of file StandardCellWeightCalib.py.

14def editParm(param):
15 numStr = str(param)
16 posDec = numStr.find(".")
17 lenStr = len(numStr)
18 if posDec == 0:
19 if lenStr >= 1:
20 selStr = numStr[1:]
21 else:
22 selStr = "_"
23 else:
24 if posDec > 0:
25 if lenStr < posDec+1:
26 selStr = numStr[0:posDec-1]
27 else:
28 selStr = numStr[0:posDec-1] + numStr[posDec+1:]
29 else:
30 selStr = numStr
31 return selStr
32

◆ getCellWeightTool()

StandardCellWeightCalib.getCellWeightTool ( flags,
finder = "Cone",
mainparam = 0.4,
input = "Topo",
onlyCellWeight = False )
Returns a fully configured H1-style cell weighting calibration tool. This tool only uses cell weights!
Parameters/type:
finder/str     : name of jet finder
input/str      : input objects triggers calibration weights
mainparam/float: size parameter for jet

Definition at line 178 of file StandardCellWeightCalib.py.

178def getCellWeightTool(flags, finder="Cone", mainparam=0.4, input="Topo", onlyCellWeight=False):
179 """
180 Returns a fully configured H1-style cell weighting calibration tool. This tool only uses cell weights!
181 Parameters/type:
182 finder/str : name of jet finder
183 input/str : input objects triggers calibration weights
184 mainparam/float: size parameter for jet
185 """
186 result = ComponentAccumulator()
187 (key,folder,tag) = H1Calibration.getCalibDBParams(flags,finder,mainparam,input, onlyCellWeight, flags.Input.isMC)
188 from IOVDbSvc.IOVDbSvcConfig import addFolders
189 result.merge(addFolders(flags,folder,'CALO_OFL' if flags.Input.isMC else 'CALO',className = 'CaloRec::ToolConstants',
190 tag=tag if H1Calibration.overrideFolder(flags) else None))
191
192 #-- configure tool
193 toolName = finder + editParm(mainparam) + input
194 cellcalibtool = CompFactory.H1WeightToolCSC12Generic("H1Weight"+toolName,
195 DBHandleKey = key)
196 result.setPrivateTools(cellcalibtool)
197 return result

Variable Documentation

◆ _logger

StandardCellWeightCalib._logger = logging.getLogger('Calorimeter::StandardCellWeightCalibration')
protected

Definition at line 12 of file StandardCellWeightCalib.py.