ATLAS Offline Software
Loading...
Searching...
No Matches
CaloCellNoiseAlgConfig.py
Go to the documentation of this file.
1# Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
2
3from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
4from AthenaConfiguration.ComponentFactory import CompFactory
5
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
27if __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