ATLAS Offline Software
StandAloneDiTauBuilder.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
2 
3 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
4 from AthenaConfiguration.ComponentFactory import CompFactory
5 
6 
7 def DiTauOutputCfg(flags):
8 
9  from OutputStreamAthenaPool.OutputStreamConfig import addToESD,addToAOD
10  result=ComponentAccumulator()
11 
12  DiTauOutputList = [ "xAOD::DiTauJetContainer#DiTauJets" ]
13  DiTauOutputList += [ "xAOD::DiTauJetAuxContainer#DiTauJetsAux." ]
14 
15  result.merge(addToESD(flags,DiTauOutputList))
16  result.merge(addToAOD(flags,DiTauOutputList))
17  return result
18 
20 
21  result = ComponentAccumulator()
22 
23  from DiTauRec.DiTauBuilderConfig import DiTauBuilderCfg
24  result.merge(DiTauBuilderCfg(flags))
25 
26  if (flags.Output.doWriteESD or flags.Output.doWriteAOD):
27  result.merge(DiTauOutputCfg(flags))
28 
29  return result
30 
31 
32 if __name__=="__main__":
33 
34  from AthenaConfiguration.AllConfigFlags import initConfigFlags
35  flags = initConfigFlags()
36 
37  flags.Input.Files = ["/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/RecExRecoTest/mc21_13p6TeV/ESDFiles/mc21_13p6TeV.421450.PhPy8EG_A14_ttbar_hdamp258p75_SingleLep_fct.recon.ESD.e8445_e8447_s3822_r13565/ESD.28877240._000046.pool.root.1"]
38 
39  # Use latest MC21 tag to pick up latest muon folders apparently needed
40  flags.IOVDb.GlobalTag = "OFLCOND-MC21-SDR-RUN3-10"
41  flags.Output.ESDFileName = "ESD.pool.root"
42  flags.Output.AODFileName = "AOD.pool.root"
43 
44  nThreads=1
45  flags.Concurrency.NumThreads = nThreads
46  if nThreads>0:
47  flags.Scheduler.ShowDataDeps = True
48  flags.Scheduler.ShowDataFlow = True
49  flags.Scheduler.ShowControlFlow = True
50  flags.Concurrency.NumConcurrentEvents = nThreads
51 
52  flags.lock()
53 
54  from AthenaConfiguration.MainServicesConfig import MainServicesCfg
55  from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
56 
57  cfg=MainServicesCfg(flags)
58  cfg.merge(PoolReadCfg(flags))
59 
60  # this delcares to the scheduler that EventInfo object comes from the input
61  loadFromSG = [('xAOD::EventInfo', 'StoreGateSvc+EventInfo'),
62  ( 'AthenaAttributeList' , 'StoreGateSvc+Input' ),
63  ( 'CaloCellContainer' , 'StoreGateSvc+AllCalo' )]
64  cfg.addEventAlgo(CompFactory.SGInputLoader(Load=loadFromSG), sequenceName="AthAlgSeq")
65 
66  cfg.merge(DiTauReconstructionCfg(flags))
67 
68  cfg.run(1000)
StandAloneDiTauBuilder.DiTauReconstructionCfg
def DiTauReconstructionCfg(flags)
Definition: StandAloneDiTauBuilder.py:19
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
StandAloneDiTauBuilder.DiTauOutputCfg
def DiTauOutputCfg(flags)
Definition: StandAloneDiTauBuilder.py:7
python.MainServicesConfig.MainServicesCfg
def MainServicesCfg(flags, LoopMgr='AthenaEventLoopMgr')
Definition: MainServicesConfig.py:260
python.OutputStreamConfig.addToESD
def addToESD(flags, itemOrList, **kwargs)
Definition: OutputStreamConfig.py:127
DiTauBuilderConfig.DiTauBuilderCfg
def DiTauBuilderCfg(flags, name="DiTauBuilder", **kwargs)
Definition: DiTauBuilderConfig.py:6
python.AllConfigFlags.initConfigFlags
def initConfigFlags()
Definition: AllConfigFlags.py:19
python.OutputStreamConfig.addToAOD
def addToAOD(flags, itemOrList, **kwargs)
Definition: OutputStreamConfig.py:142
python.PoolReadConfig.PoolReadCfg
def PoolReadCfg(flags)
Definition: PoolReadConfig.py:69