ATLAS Offline Software
Classes | Functions | Variables
StandardCellWeightCalib Namespace Reference

Classes

class  H1Calibration
 

Functions

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

Variables

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

Function Documentation

◆ editParm()

def StandardCellWeightCalib.editParm (   param)

Definition at line 14 of file StandardCellWeightCalib.py.

14 def 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()

def 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.

178 def 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')
private

Definition at line 12 of file StandardCellWeightCalib.py.

python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
StandardCellWeightCalib.editParm
def editParm(param)
Definition: StandardCellWeightCalib.py:14
StandardCellWeightCalib.getCellWeightTool
def getCellWeightTool(flags, finder="Cone", mainparam=0.4, input="Topo", onlyCellWeight=False)
Definition: StandardCellWeightCalib.py:178
python.IOVDbSvcConfig.addFolders
def addFolders(flags, folderStrings, detDb=None, className=None, extensible=False, tag=None, db=None, modifiers='')
Definition: IOVDbSvcConfig.py:72
str
Definition: BTagTrackIpAccessor.cxx:11