ATLAS Offline Software
Loading...
Searching...
No Matches
CaloCellCorrectionConfig.py
Go to the documentation of this file.
1# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
2
3from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
4from AthenaConfiguration.ComponentFactory import CompFactory
5from DetDescrCnvSvc.DetDescrCnvSvcConfig import DetDescrCnvSvcCfg
6from IOVDbSvc.IOVDbSvcConfig import addFolders
7
8def 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
71def 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
80def 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
CaloCellMakerTool to re-scale cell energies.
Tool to shift cell time values.