ATLAS Offline Software
CaloCellNoiseAlgConfig.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
2 
3 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
4 from AthenaConfiguration.ComponentFactory import CompFactory
5 
6 def CaloCellNoiseAlgCfg(flags):
7  result=ComponentAccumulator()
8  from LArRecUtils.LArADC2MeVCondAlgConfig import LArADC2MeVCondAlgCfg
9  result.merge(LArADC2MeVCondAlgCfg(flags))
10 
11  noiseAlg=CompFactory.CaloCellNoiseAlg("CaloCellNoiseAlg",
12  doMC = True,
13  readNtuple = False,
14  doFit = True,
15  TotalNoiseKey = '',
16  ElecNoiseKey = '',
17  )
18  result.addEventAlgo(noiseAlg)
19 
20  result.addService(CompFactory.NTupleSvc(Output = [ "FILE1 DATAFILE='cellnoise.root' OPT='NEW'" ]))
21  result.setAppProperty("HistogramPersistency","ROOT")
22  return result
23 
24 
25 
26 
27 if __name__=="__main__":
28  from AthenaCommon.Logging import log
29  from AthenaCommon.Constants import DEBUG
30  log.setLevel(DEBUG)
31 
32  from AthenaConfiguration.AllConfigFlags import initConfigFlags
33  from AthenaConfiguration.TestDefaults import defaultTestFiles
34  flags = initConfigFlags()
35  flags.Input.Files = defaultTestFiles.RDO_RUN2
36  flags.isMC=True
37  flags.lock()
38 
39  from AthenaConfiguration.MainServicesConfig import MainServicesCfg
40  from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
41  cfg=MainServicesCfg(flags)
42  cfg.merge(PoolReadCfg(flags))
43  from xAODEventInfoCnv.xAODEventInfoCnvConfig import EventInfoCnvAlgCfg
44  cfg.merge(EventInfoCnvAlgCfg(flags, disableBeamSpot=True),sequenceName="AthAlgSeq")
45 
46  from CaloRec.CaloCellMakerConfig import CaloCellMakerCfg
47  cfg.merge(CaloCellMakerCfg(flags))
48  cfg.merge(CaloCellNoiseAlgCfg(flags))
49 
50  cfg.run(10)
51 
52 
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
python.LArADC2MeVCondAlgConfig.LArADC2MeVCondAlgCfg
def LArADC2MeVCondAlgCfg(flags)
Definition: LArADC2MeVCondAlgConfig.py:6
python.CaloCellNoiseAlgConfig.CaloCellNoiseAlgCfg
def CaloCellNoiseAlgCfg(flags)
Definition: CaloCellNoiseAlgConfig.py:6
python.CaloCellMakerConfig.CaloCellMakerCfg
def CaloCellMakerCfg(flags)
Definition: CaloCellMakerConfig.py:12
python.MainServicesConfig.MainServicesCfg
def MainServicesCfg(flags, LoopMgr='AthenaEventLoopMgr')
Definition: MainServicesConfig.py:256
Constants
some useful constants -------------------------------------------------—
python.AllConfigFlags.initConfigFlags
def initConfigFlags()
Definition: AllConfigFlags.py:19
python.xAODEventInfoCnvConfig.EventInfoCnvAlgCfg
def EventInfoCnvAlgCfg(flags, name="EventInfoCnvAlg", inputKey="McEventInfo", outputKey="EventInfo", disableBeamSpot=False, **kwargs)
Definition: xAODEventInfoCnvConfig.py:11
python.PoolReadConfig.PoolReadCfg
def PoolReadCfg(flags)
Definition: PoolReadConfig.py:69