ATLAS Offline Software
Loading...
Searching...
No Matches
ZmumuPerfAlgConfig Namespace Reference

Functions

 ZmumuPerfAlgCfg (flags, **kwargs)

Detailed Description

@file ZmumuPerfAlgConfig.py
@author Salvador Marti
@date 2024
@brief Configuration for Run 3 IDAlignment performance based on Zmumu events

Function Documentation

◆ ZmumuPerfAlgCfg()

ZmumuPerfAlgConfig.ZmumuPerfAlgCfg ( flags,
** kwargs )

Definition at line 13 of file ZmumuPerfAlgConfig.py.

13def ZmumuPerfAlgCfg(flags, **kwargs):
14 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
15 acc = ComponentAccumulator()
16
17 # add the HistSvc to the component accumulator
18 from AthenaConfiguration.ComponentFactory import CompFactory
19 histsvc = CompFactory.THistSvc(name="THistSvc", Output=flags.Output.HISTFileName)
20 acc.addService ( histsvc )
21
22 # track extrapolator
23 from TrkConfig.AtlasExtrapolatorConfig import InDetExtrapolatorCfg
24 InDetExtrapolator = acc.popToolsAndMerge(InDetExtrapolatorCfg(flags))
25 acc.addPublicTool(InDetExtrapolator)
26
27 # Track to vertex
28 from TrackToVertex.TrackToVertexConfig import TrackToVertexCfg
29 TrackToVertexTool = acc.popToolsAndMerge(TrackToVertexCfg(flags))
30 acc.addPublicTool(TrackToVertexTool)
31
32 # track to IP
33 from TrkConfig.TrkVertexFitterUtilsConfig import TrackToVertexIPEstimatorCfg
34 TrackToVertexIPEstimatorTool = acc.popToolsAndMerge(TrackToVertexIPEstimatorCfg(flags))
35 acc.addPublicTool(TrackToVertexIPEstimatorTool)
36
37 # Track refit with looser chi2
38 from TrkConfig.TrkGlobalChi2FitterConfig import InDetGlobalChi2FitterCfg
39 GX2TrackFitter = acc.popToolsAndMerge(InDetGlobalChi2FitterCfg(flags, TrackChi2PerNDFCut = 10))
40
41 # Refitter tool:
42 MuonRefitterTool = CompFactory.egammaTrkRefitterTool (name = 'MuonRefitterTool',
43 FitterTool = GX2TrackFitter,
44 matEffects = 2,
45 OutputLevel = 4)
46 acc.addPublicTool(MuonRefitterTool)
47
48 # refitter tool for Silicon Only tracks (removing TRT hits)
49 SiOnlyRefitterTool = CompFactory.egammaTrkRefitterTool (name = 'SiOnlyRefitterTool',
50 FitterTool = GX2TrackFitter,
51 matEffects = 2,
52 RemoveTRTHits = True,
53 OutputLevel = 4)
54 acc.addPublicTool(SiOnlyRefitterTool)
55
56 # muon selector tool
57 from MuonSelectorTools.MuonSelectorToolsConfig import MuonSelectionToolCfg
58 MuonSelectorIDAl = acc.popToolsAndMerge(MuonSelectionToolCfg(flags,
59 name = "MuonSelectorIDalign",
60 MaxEta = 3.,
61 MuQuality = 1,
62 #IsRun3Geo = False,
63 TurnOffMomCorr = True))
64 acc.addPublicTool(MuonSelectorIDAl)
65
66
67 #Configure the ID performance monitoring using Zmumu events
68 theIDPerfMonZmumu = CompFactory.IDPerfMonZmumu (name = "IDPerfMonZmumu",
69 TrackParticleName = 'CombinedTrackParticle',
70 isMC = flags.Input.isMC,
71 UseTrackSelectionTool = True,
72 doRefit = True,
73 ReFitterTool1 = MuonRefitterTool,
74 ReFitterTool2 = SiOnlyRefitterTool,
75 OutputTracksName = "SelectedMuons",
76 Extrapolator = InDetExtrapolator,
77 doIPextrToPV = False,
78 UseTrigger = True,
79 TrackToVertexTool = TrackToVertexTool,
80 TrackToVertexIPEstimator = TrackToVertexIPEstimatorTool,
81 commonTreeFolder = "/ZmumuValidationUserSel/common",
82 MinLumiBlock = 0, # if MaxLumiBlock == MinLumiBlock --> no LumiBlock selection
83 MaxLumiBlock = 0,
84 doZmumuEventDebug = False, # default False
85 useCustomMuonSelector = True,
86 MuonSelector = MuonSelectorIDAl,
87 MassWindowLow = 0.1, # in GeV
88 MassWindowHigh = 2000., #in GeV
89 PtLeadingMuon = 5., #in GeV
90 PtSecondMuon = 5.,
91 **kwargs)
92 acc.addEventAlgo(theIDPerfMonZmumu)
93
94 return acc
95