ATLAS Offline Software
FourLeptonVertexing.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
2 
3 
4 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
5 from AthenaConfiguration.ComponentFactory import CompFactory
6 
7 
8 
9 def FourLeptonVertexerCfg(flags, name="FourLeptonVertexAlg", **kwargs):
10  result = ComponentAccumulator()
11 
12  from MuonSelectorTools.MuonSelectorToolsConfig import MuonSelectionToolCfg
13  kwargs.setdefault("MuonSelectionTool", result.popToolsAndMerge(MuonSelectionToolCfg(flags,
14  MaxEta=2.7,
15  DisablePtCuts=True,
16  MuQuality=2,
17  )) )
18 
19 
20  from ElectronPhotonSelectorTools.AsgElectronLikelihoodToolsConfig import AsgElectronLikelihoodToolCfg
21  from ElectronPhotonSelectorTools.ElectronLikelihoodToolMapping import electronLHmenu
22  from ElectronPhotonSelectorTools.LikelihoodEnums import LikeEnum
23  from AthenaConfiguration.Enums import LHCPeriod
24  kwargs.setdefault("ElectronSelectionTool", result.popToolsAndMerge(AsgElectronLikelihoodToolCfg(flags,
25  name= "ElectronSelTool",
26  quality = LikeEnum.VeryLoose,
27  menu=electronLHmenu.offlineMC21 if flags.GeoModel.Run >= LHCPeriod.Run3 else electronLHmenu.offlineMC20)))
28 
29  from TrkConfig.TrkVKalVrtFitterConfig import TrkVKalVrtFitterCfg
30  kwargs.setdefault("VertexFitter", result.popToolsAndMerge(
31  TrkVKalVrtFitterCfg(flags, FirstMeasuredPoint = False)))
32  kwargs.setdefault("MinMuonPt", 4000)
33  kwargs.setdefault("MinElecPt", 6000)
34  vtx_tool = CompFactory.DerivationFramework.FourLeptonVertexingAlgorithm(name , **kwargs)
35  result.addEventAlgo(vtx_tool, primary = True)
36  return result
37 
38 if __name__ == "__main__":
39  from AthenaConfiguration.AllConfigFlags import initConfigFlags
40  flags = initConfigFlags()
41  args = flags.fillFromArgs()
42 
43  flags.Input.Files = args.input
44  flags.Concurrency.NumThreads=args.threads
45  flags.Concurrency.NumConcurrentEvents=args.threads
46 
47  flags.lock()
48  flags.dump()
49 
50  from AthenaConfiguration.MainServicesConfig import MainServicesCfg
51  cfg = MainServicesCfg(flags)
52  msgService = cfg.getService('MessageSvc')
53  msgService.Format = "S:%s E:%e % F%128W%S%7W%R%T %0W%M"
54 
55  from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
56  cfg.merge(PoolReadCfg(flags))
57  cfg.merge(FourLeptonVertexerCfg(flags))
58 
59  sc = cfg.run(flags.Exec.MaxEvents)
60  if not sc.isSuccess():
61  exit(1)
62 
63 
64 
65 
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
python.AsgElectronLikelihoodToolsConfig.AsgElectronLikelihoodToolCfg
def AsgElectronLikelihoodToolCfg(flag, name, quality, menu=electronLHmenu.offlineMC21)
Definition: AsgElectronLikelihoodToolsConfig.py:13
python.FourLeptonVertexing.FourLeptonVertexerCfg
def FourLeptonVertexerCfg(flags, name="FourLeptonVertexAlg", **kwargs)
Definition: FourLeptonVertexing.py:9
python.MainServicesConfig.MainServicesCfg
def MainServicesCfg(flags, LoopMgr='AthenaEventLoopMgr')
Definition: MainServicesConfig.py:260
python.TrkVKalVrtFitterConfig.TrkVKalVrtFitterCfg
def TrkVKalVrtFitterCfg(flags, name="TrkVKalVrtFitter", **kwargs)
Definition: TrkVKalVrtFitterConfig.py:7
calibdata.exit
exit
Definition: calibdata.py:236
python.MuonSelectorToolsConfig.MuonSelectionToolCfg
def MuonSelectionToolCfg(flags, name="MuonSelectionTool", **kwargs)
Standard configuration of the MuonSelectionTool used in reconstruction & validation jobs The snippet ...
Definition: MuonSelectorToolsConfig.py:16
python.AllConfigFlags.initConfigFlags
def initConfigFlags()
Definition: AllConfigFlags.py:19
python.PoolReadConfig.PoolReadCfg
def PoolReadCfg(flags)
Definition: PoolReadConfig.py:69