ATLAS Offline Software
TrigMuonTruthMonConfig.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
2 
4 
5  from AthenaConfiguration.ComponentFactory import CompFactory
6 
7  GroupName = 'TruthMon'
8 
9  from MuonSelectorTools.MuonSelectorToolsConfig import MuonSelectionToolCfg
10  from .MuonMatchingToolConfig import MuonMatchingToolConfig
11  monAlg = helper.addAlgorithm(CompFactory.TrigMuonTruthMon,'TrigMuonTruthMon',
12  MuonSelectionTool = helper.result().popToolsAndMerge(MuonSelectionToolCfg(helper.flags, MuQuality=1)),
13  MuonMatchingTool = helper.result().popToolsAndMerge(MuonMatchingToolConfig(helper.flags)))
14 
15 
16  from TrigConfigSvc.TriggerConfigAccess import getHLTMonitoringAccess
17  moniAccess = getHLTMonitoringAccess(helper.flags)
18  monAlg.MonitoredChains = moniAccess.monitoredChains(signatures="muonMon",monLevels=["shifter","t0","val"])
19 
20  # if mon groups not found fall back to hard-coded trigger monitoring list
21  if len(monAlg.MonitoredChains) == 0:
22  monAlg.MonitoredChains = ['HLT_mu6_L1MU5VF', 'HLT_mu24_ivarmedium_L1MU14FCH', 'HLT_mu50_L1MU14FCH', 'HLT_mu60_0eta105_msonly_L1MU14FCH', 'HLT_2mu14_L12MU8F']
23 
24  monAlg.Group = GroupName
25 
26  for chain in monAlg.MonitoredChains:
27  histGroupChain = helper.addGroup(monAlg, GroupName + '_' + chain, 'HLT/MuonMon/' + GroupName + '/' + chain)
28 
29  # Truth variables
30  histGroupChain.defineHistogram(chain+'_truthEta',
31  title = 'Truth eta ' + chain,
32  type = 'TH1F', path='', xbins=50, xmin=-2.7, xmax=2.7)
33 
34  histGroupChain.defineHistogram(chain+'_truthPhi',
35  title = 'Truth phi ' + chain,
36  type = 'TH1F', path='', xbins=50, xmin=-3.14, xmax=3.14)
37 
38  histGroupChain.defineHistogram(chain+'_truthPt',
39  title = 'Truth pt ' + chain,
40  type = 'TH1F', path='', xbins=[0.0,20.0,25.0,30.0,35.0,40.0,45.0,50.0,55.0,60.0,65.0,70.0,80.0,90.0,100.0,120.0,200.0], xmin=0.0, xmax=200.0)
41 
42  histGroupChain.defineHistogram(chain+'_truthEndcapPt',
43  title = 'Truth pt ' + chain,
44  type = 'TH1F', path='', xbins=[0.0,20.0,25.0,30.0,35.0,40.0,45.0,50.0,55.0,60.0,65.0,70.0,80.0,90.0,100.0,120.0,200.0], xmin=0.0, xmax=200.0)
45 
46  histGroupChain.defineHistogram(chain+'_truthBarrelPt',
47  title = 'Truth pt ' + chain,
48  type = 'TH1F', path='', xbins=[0.0,20.0,25.0,30.0,35.0,40.0,45.0,50.0,55.0,60.0,65.0,70.0,80.0,90.0,100.0,120.0,200.0], xmin=0.0, xmax=200.0)
49 
50  histGroupChain.defineHistogram(chain+'_truthIntPerBC',
51  title = 'Average interactions per bunch crossing ' + chain,
52  type = 'TH1F', path='', xbins=60, xmin=30, xmax=90)
53 
54 
55  # Matched EFCB to truth variables
56  histGroupChain.defineHistogram(chain+'_MatchedEFCBtruthEta',
57  title = 'Matched truth eta ' + chain,
58  type = 'TH1F', path='', xbins=50, xmin=-2.7, xmax=2.7)
59 
60  histGroupChain.defineHistogram(chain+'_MatchedEFCBtruthPhi',
61  title = 'Matched truth phi ' + chain,
62  type = 'TH1F', path='', xbins=50, xmin=-3.14, xmax=3.14)
63 
64  histGroupChain.defineHistogram(chain+'_MatchedEFCBtruthPt',
65  title = 'Matched EFCB muon truth pt ' + chain,
66  type = 'TH1F', path='', xbins=[0.0,20.0,25.0,30.0,35.0,40.0,45.0,50.0,55.0,60.0,65.0,70.0,80.0,90.0,100.0,120.0,200.0], xmin=0.0, xmax=200.0)
67 
68  histGroupChain.defineHistogram(chain+'_MatchedEFCBtruthEndcapPt',
69  title = 'Matched EFCB muon truth pt ' + chain,
70  type = 'TH1F', path='', xbins=[0.0,20.0,25.0,30.0,35.0,40.0,45.0,50.0,55.0,60.0,65.0,70.0,80.0,90.0,100.0,120.0,200.0], xmin=0.0, xmax=200.0)
71 
72  histGroupChain.defineHistogram(chain+'_MatchedEFCBtruthBarrelPt',
73  title = 'Matched EFCB muon truth pt ' + chain,
74  type = 'TH1F', path='', xbins=[0.0,20.0,25.0,30.0,35.0,40.0,45.0,50.0,55.0,60.0,65.0,70.0,80.0,90.0,100.0,120.0,200.0], xmin=0.0, xmax=200.0)
75 
76  histGroupChain.defineHistogram(chain+'_MatchedEFCBtruthIntPerBC',
77  title = 'Matched EFCB muon average interactions ber bunch crossing ' + chain,
78  type = 'TH1F', path='', xbins=60, xmin=30, xmax=90)
79 
80  # Matched L1 to truth variables
81  histGroupChain.defineHistogram(chain+'_MatchedL1truthEta',
82  title = 'Matched L1 muon truth eta ' + chain,
83  type = 'TH1F', path='', xbins=50, xmin=-2.7, xmax=2.7)
84 
85  histGroupChain.defineHistogram(chain+'_MatchedL1truthPhi',
86  title = 'Matched L1 muon truth phi ' + chain,
87  type = 'TH1F', path='', xbins=50, xmin=-3.14, xmax=3.14)
88 
89  histGroupChain.defineHistogram(chain+'_MatchedL1truthPt',
90  title = 'Matched L1 muon truth pt ' + chain,
91  type = 'TH1F', path='', xbins=[0.0,20.0,25.0,30.0,35.0,40.0,45.0,50.0,55.0,60.0,65.0,70.0,80.0,90.0,100.0,120.0,200.0], xmin=0.0, xmax=200.0)
92 
93  histGroupChain.defineHistogram(chain+'_MatchedL1truthEndcapPt',
94  title = 'Matched L1 muon truth pt ' + chain,
95  type = 'TH1F', path='', xbins=[0.0,20.0,25.0,30.0,35.0,40.0,45.0,50.0,55.0,60.0,65.0,70.0,80.0,90.0,100.0,120.0,200.0], xmin=0.0, xmax=200.0)
96 
97  histGroupChain.defineHistogram(chain+'_MatchedL1truthBarrelPt',
98  title = 'Matched L1 muon truth pt ' + chain,
99  type = 'TH1F', path='', xbins=[0.0,20.0,25.0,30.0,35.0,40.0,45.0,50.0,55.0,60.0,65.0,70.0,80.0,90.0,100.0,120.0,200.0], xmin=0.0, xmax=200.0)
100 
101  histGroupChain.defineHistogram(chain+'_MatchedL1truthIntPerBC',
102  title = 'Matched L1 muon average interactions ber bunch crossing ' + chain,
103  type = 'TH1F', path='', xbins=60, xmin=30, xmax=90)
104 
python.TriggerConfigAccess.getHLTMonitoringAccess
HLTMonitoringAccess getHLTMonitoringAccess(flags=None)
Definition: TriggerConfigAccess.py:256
python.TrigMuonTruthMonConfig.TrigMuonTruthMonConfig
def TrigMuonTruthMonConfig(helper)
Definition: TrigMuonTruthMonConfig.py:3
python.MuonSelectorToolsConfig.MuonSelectionToolCfg
def MuonSelectionToolCfg(flags, name="MuonSelectionTool", **kwargs)
Definition: MuonSelectorToolsConfig.py:13
python.MuonMatchingToolConfig.MuonMatchingToolConfig
def MuonMatchingToolConfig(flags)
Definition: MuonMatchingToolConfig.py:3