ATLAS Offline Software
LArReadCellsConfig.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
2 
3 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
4 from AthenaConfiguration.ComponentFactory import CompFactory
5 
6 def LArReadCellsCfg(flags):
7 
8  result=ComponentAccumulator()
9 
10  #setup Calo reco
11  from CaloRec.CaloRecoConfig import CaloRecoCfg
12  result.merge(CaloRecoCfg(flags))
13  result.getEventAlgo("LArRawChannelBuilder").TimingContainerKey="LArOFIterResult"
14 
15  from TrigT1ResultByteStream.TrigT1ResultByteStreamConfig import L1TriggerByteStreamDecoderCfg
16  result.merge(L1TriggerByteStreamDecoderCfg(flags))
17 
18  from LArCafJobs.LArSCDumperSkeleton import L1CaloMenuCfg
19  result.merge(L1CaloMenuCfg(flags))
20 
21  from LumiBlockComps.BunchCrossingCondAlgConfig import BunchCrossingCondAlgCfg
22  result.merge(BunchCrossingCondAlgCfg(flags))
23 
24  from IOVDbSvc.IOVDbSvcConfig import addFolders
25  result.merge(addFolders(flags,
26  '/LAR/ElecCalibOfl/Shape/RTM/4samples3bins17phases<tag>LARElecCalibOflShapeRTM4samples3bins17phases-RUN2-UPD3-00</tag><key>LArShape17phases</key>',
27  'LAR_OFL'))
28 
29  result.getService("PoolSvc").ReadCatalog += ["apcfile:poolcond/PoolCat_comcond_castor.xml"]
30 
31  result.merge(addFolders(flags,'/LAR/ElecCalibOfl/AutoCorrs/AutoCorr<tag>LARElecCalibOflAutoCorrsAutoCorr-RUN2-UPD3-00</tag>','LAR_OFL'))
32  result.getService("IOVDbSvc").overrideTags+=['<prefix>/LAR/ElecCalibOfl/Shape/RTM/5samples1phase</prefix><tag>LARElecCalibOflShapeRTM5samples1phase-RUN2-UPD1-04</tag>']
33  # for splashes: FIXME later
34  result.getService("IOVDbSvc").overrideTags+=['<prefix>/LAR/ElecCalibOfl/OFC/PhysWave/RTM/4samples3bins17phases</prefix><tag>LARElecCalibOflOFCPhysWaveRTM4samples3bins17phases-RUN2-UPD3-00</tag>']
35  result.getService("IOVDbSvc").overrideTags+=['<prefix>/LAR/ElecCalibOfl/Shape/RTM/4samples3bins17phases</prefix><tag>LARElecCalibOflShapeRTM4samples3bins17phases-RUN2-UPD3-00</tag>']
36 
37  print("Dumping flags: ")
38  flags.dump()
39  dumperAlg=CompFactory.LArReadCells("LArReadCells")
40  dumperAlg.output = flags.LArShapeDump.outputNtup
41  dumperAlg.etCut = -1500.
42  dumperAlg.etCut2 = -1500.
43 
44  result.addEventAlgo(dumperAlg)
45 
46  return result
47 
48 
49 if __name__=="__main__":
50 
51  from AthenaConfiguration.AllConfigFlags import initConfigFlags
53  from LArShapeDumperFlags import addShapeDumpFlags
54  addShapeDumpFlags(flags)
55 
56  from AthenaConfiguration.TestDefaults import defaultTestFiles
57  flags.Input.Files=defaultTestFiles.RAW_RUN2
58  flags.LAr.ROD.forceIter=True
59  flags.LArShapeDump.outputNtup="SPLASH"
60  flags.lock()
61 
62  from AthenaConfiguration.MainServicesConfig import MainServicesCfg
63 
64  cfg=MainServicesCfg(flags)
65  cfg.addService(CompFactory.THistSvc(Output=["SPLASH DATAFILE='ntuple.root' OPT='RECREATE'",]))
66  cfg.merge(LArReadCellsCfg(flags))
67 
68 
69  cfg.run(10)
LArShapeDumperFlags.addShapeDumpFlags
def addShapeDumpFlags(flags)
Definition: LArShapeDumperFlags.py:5
python.CaloRecoConfig.CaloRecoCfg
def CaloRecoCfg(flags, clustersname=None)
Definition: CaloRecoConfig.py:9
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
LArSCDumperSkeleton.L1CaloMenuCfg
def L1CaloMenuCfg(flags)
Definition: LArSCDumperSkeleton.py:11
python.BunchCrossingCondAlgConfig.BunchCrossingCondAlgCfg
def BunchCrossingCondAlgCfg(flags)
Definition: BunchCrossingCondAlgConfig.py:8
python.MainServicesConfig.MainServicesCfg
def MainServicesCfg(flags, LoopMgr='AthenaEventLoopMgr')
Definition: MainServicesConfig.py:256
python.IOVDbSvcConfig.addFolders
def addFolders(flags, folderStrings, detDb=None, className=None, extensible=False, tag=None, db=None, modifiers='')
Definition: IOVDbSvcConfig.py:72
LArReadCellsConfig.LArReadCellsCfg
def LArReadCellsCfg(flags)
Definition: LArReadCellsConfig.py:6
python.AllConfigFlags.initConfigFlags
def initConfigFlags()
Definition: AllConfigFlags.py:19
Muon::print
std::string print(const MuPatSegment &)
Definition: MuonTrackSteering.cxx:28
TrigT1ResultByteStreamConfig.L1TriggerByteStreamDecoderCfg
def L1TriggerByteStreamDecoderCfg(flags, returnEDM=False)
Definition: TrigT1ResultByteStreamConfig.py:133