ATLAS Offline Software
CaloCellCorrectionConfig.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
2 
3 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
4 from AthenaConfiguration.ComponentFactory import CompFactory
5 from DetDescrCnvSvc.DetDescrCnvSvcConfig import DetDescrCnvSvcCfg
6 from IOVDbSvc.IOVDbSvcConfig import addFolders
7 
8 def CaloCellPedestalCorrCfg(configFlags):
9 
10 
11  result=DetDescrCnvSvcCfg(configFlags)
12  isMC=configFlags.Input.isMC
13  theCaloCellPedestalCorr=CompFactory.CaloCellPedestalCorr()
14 
15  if not isMC:
16  theCaloCellPedestalCorr.isMC=False
17  if configFlags.Common.isOnline:
18  folder = '/CALO/Pedestal/CellPedestal'
19  result.merge(addFolders(configFlags,folder,'CALO_ONL',className="CondAttrListCollection"))
20  else:
21  #regular offline case
22  folder= '/CALO/Ofl/Pedestal/CellPedestal'
23  result.merge(addFolders(configFlags,folder,'CALO_OFL',className="CondAttrListCollection"))
24 
25  thePedCorrCondAlg=CompFactory.CaloCellPedCorrCondAlg(PedestalShiftFolder=folder)
26  else:
27  theCaloCellPedestalCorr.isMC=True
28 
29 
30  if not configFlags.Common.isOnline:
31  if configFlags.Calo.Cell.doPileupOffsetBCIDCorr:
32  from CaloRec.CaloBCIDAvgAlgConfig import CaloBCIDAvgAlgCfg
33  result.merge(CaloBCIDAvgAlgCfg(configFlags))
34  theCaloCellPedestalCorr.CaloBCIDAverageKey="CaloBCIDAverage"
35  else:
36  theCaloCellPedestalCorr.CaloBCIDAverageKey=""
37  if not isMC:
38  lumiFolder = '/TRIGGER/LUMI/LBLESTONL'
39  result.merge(addFolders(configFlags,lumiFolder,'TRIGGER_ONL',className="CondAttrListCollection"))
40  thePedCorrCondAlg.Luminosity = -1
41  thePedCorrCondAlg.LumiFolderName = lumiFolder
42 
43  if not isMC:
44  result.addCondAlgo(thePedCorrCondAlg)
45 
46  result.setPrivateTools(theCaloCellPedestalCorr)
47  return result
48 
49 
51  """Return component accumulator with configured private Calo cell neighbors average correction tool
52 
53  Arguments:
54  flags -- Athena configuration flags (ConfigFlags)
55  """
56  acc = ComponentAccumulator()
57 
58  from LArGeoAlgsNV.LArGMConfig import LArGMCfg
59  acc.merge(LArGMCfg(flags))
60 
61  from TileGeoModel.TileGMConfig import TileGMCfg
62  acc.merge(TileGMCfg(flags))
63 
64  CaloCellNeighborsAverageCorr=CompFactory.CaloCellNeighborsAverageCorr
65  caloCellNeighborsAverageCorrection = CaloCellNeighborsAverageCorr(testMode = False)
66 
67  acc.setPrivateTools( caloCellNeighborsAverageCorrection )
68  return acc
69 
70 
71 def CaloCellTimeCorrCfg(configFlags):
72  CaloCellTimeCorrTool=CompFactory.CaloCellTimeCorrTool
73  result=ComponentAccumulator()
74  folder= "/LAR/TimeCorrectionOfl/CellTimeOffset"
75  result.merge(addFolders(configFlags,[folder,], "LAR_OFL", className="AthenaAttributeList"))
76  result.setPrivateTools(CaloCellTimeCorrTool(Folder=folder))
77  return result
78 
79 
80 def CaloEnergyRescalerCfg(configFlags):
81  CaloCellEnergyRescaler=CompFactory.CaloCellEnergyRescaler
82  result=ComponentAccumulator()
83  folder="/LAR/CellCorrOfl/EnergyCorr"
84  result.merge(addFolders(configFlags,[folder,], "LAR_OFL", className="AthenaAttributeList"))
85  result.setPrivateTools(CaloCellEnergyRescaler(Folder=folder))
86  return result
87 
CaloCellCorrectionConfig.CaloEnergyRescalerCfg
def CaloEnergyRescalerCfg(configFlags)
Definition: CaloCellCorrectionConfig.py:80
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
python.CaloBCIDAvgAlgConfig.CaloBCIDAvgAlgCfg
def CaloBCIDAvgAlgCfg(flags, **kwargs)
Definition: CaloBCIDAvgAlgConfig.py:11
CaloCellNeighborsAverageCorr
Definition: CaloCellNeighborsAverageCorr.h:21
CaloCellEnergyRescaler
CaloCellMakerTool to re-scale cell energies.
Definition: CaloCellEnergyRescaler.h:23
CaloCellCorrectionConfig.CaloCellPedestalCorrCfg
def CaloCellPedestalCorrCfg(configFlags)
Definition: CaloCellCorrectionConfig.py:8
python.DetDescrCnvSvcConfig.DetDescrCnvSvcCfg
def DetDescrCnvSvcCfg(flags, **kwargs)
Definition: DetDescrCnvSvcConfig.py:6
python.IOVDbSvcConfig.addFolders
def addFolders(flags, folderStrings, detDb=None, className=None, extensible=False, tag=None, db=None, modifiers='')
Definition: IOVDbSvcConfig.py:72
LArGMConfig.LArGMCfg
def LArGMCfg(flags)
Definition: LArGMConfig.py:8
CaloCellCorrectionConfig.CaloCellNeighborsAverageCorrCfg
def CaloCellNeighborsAverageCorrCfg(flags)
Definition: CaloCellCorrectionConfig.py:50
CaloCellTimeCorrTool
Tool to shift cell time values.
Definition: CaloCellTimeCorrTool.h:22
CaloCellCorrectionConfig.CaloCellTimeCorrCfg
def CaloCellTimeCorrCfg(configFlags)
Definition: CaloCellCorrectionConfig.py:71
TileGMConfig.TileGMCfg
def TileGMCfg(flags)
Definition: TileGMConfig.py:7