ATLAS Offline Software
Functions
DQTLumiMonAlg Namespace Reference

Functions

def DQTLumiMonAlgConfig (flags)
 
def DQTLumiMonAlgConfigByTriggerChain (helper, algConfObj, flags, triggerChain='', triggerPath='')
 

Function Documentation

◆ DQTLumiMonAlgConfig()

def DQTLumiMonAlg.DQTLumiMonAlgConfig (   flags)

Definition at line 5 of file DQTLumiMonAlg.py.

5 def DQTLumiMonAlgConfig(flags):
6  from AthenaMonitoring import AthMonitorCfgHelper
7  from AthenaConfiguration.ComponentFactory import CompFactory
8  DQTLumiMonAlg = CompFactory.DQTLumiMonAlg
9 
10  helper = AthMonitorCfgHelper(flags, 'DQTLumiMonAlgCfg')
11  # Three instances of the algorithm. One using any trigger, another using only muon
12  # triggers, and the final using only electron triggers.
13  DQTLumiMonAlgConfigByTriggerChain(helper, DQTLumiMonAlg, flags)
14  if flags.DQ.useTrigger:
15  DQTLumiMonAlgConfigByTriggerChain(helper, DQTLumiMonAlg, flags,
16  'CATEGORY_monitoring_muonIso','EF_muX')
17  DQTLumiMonAlgConfigByTriggerChain(helper, DQTLumiMonAlg, flags,
18  'CATEGORY_primary_single_ele','EF_eX')
19  return helper.result()
20 
21 

◆ DQTLumiMonAlgConfigByTriggerChain()

def DQTLumiMonAlg.DQTLumiMonAlgConfigByTriggerChain (   helper,
  algConfObj,
  flags,
  triggerChain = '',
  triggerPath = '' 
)

Definition at line 22 of file DQTLumiMonAlg.py.

22 def DQTLumiMonAlgConfigByTriggerChain(helper, algConfObj, flags, triggerChain='', triggerPath=''):
23  monAlg = helper.addAlgorithm(algConfObj, 'DQTLumiMonAlg'+triggerPath)
24 
25  if triggerChain:
26  monAlg.TriggerChain = triggerChain
27  if not triggerPath:
28  triggerPath = triggerChain
29  else:
30  triggerPath = 'AnyTrigger'
31 
32  groupPath = 'GLOBAL/Luminosity/'+triggerPath
33  group = helper.addGroup(monAlg, 'default', groupPath, 'run')
34  pixelgroup = helper.addGroup(monAlg, 'pixel', groupPath, 'run')
35  nLooseT = 'Number of Loose Vertices'
36  nTightT = 'Number of Tight Vertices'
37  nPixClusterT = 'Number of Pixel Clusters'
38 
39  # Vertex parameters. A vertex
40  monAlg.TightTrackWeight = 0.01
41  monAlg.TightNTracks = 4
42 
43  lbdict = { 'xmin': min(flags.Input.LumiBlockNumbers)-0.5 if flags.Input.LumiBlockNumbers else 0.5,
44  'xmax': max(flags.Input.LumiBlockNumbers)+0.5 if flags.Input.LumiBlockNumbers else 1.5 }
45  lbdict['xbins'] = int(lbdict['xmax']-lbdict['xmin'])
46 
47  # Raw plots of lumi variables
48  group.defineHistogram('avgIntPerXing', type='TH1F', xbins=100, xmin=0, xmax=100,
49  title='Average number of interactions per bunch Xing')
50  group.defineHistogram('intPerXing', type='TH1F', xbins=100, xmin=0, xmax=100,
51  title='Actual number of interactions per bunch Xing')
52 
53  # Plots of luminosity variables as a function of lb number
54  group.defineHistogram('LB,avgLumi', type='TProfile',
55  title='Average Lumi vs LB', opt='kAddBinsDynamically',
56  merge='merge', **lbdict)
57  group.defineHistogram('LB,avgIntPerXing', type='TProfile',
58  title='Number of interactions per event;LB;<#mu>_{LB}',
59  opt='kAddBinsDynamically', merge='merge', **lbdict)
60  group.defineHistogram('LB,lumiPerBCID', type='TProfile',
61  title='Instantaneous Luminosity vs LB', opt='kAddBinsDynamically',
62  merge='merge', **lbdict)
63  group.defineHistogram('LB,intPerXing', type='TProfile',
64  title='Instaneous interactions vs LB', opt='kAddBinsDynamically',
65  merge='merge', **lbdict)
66  group.defineHistogram('LB,duration', type='TProfile',
67  title='Lumi Block time in sec vs LB', opt='kAddBinsDynamically',
68  merge='merge', **lbdict)
69  group.defineHistogram('LB,avgLiveFrac', type='TProfile',
70  title='Average live fraction lumi over all BCIDs vs LB',
71  opt='kAddBinsDynamically', merge='merge', **lbdict)
72  group.defineHistogram('LB,liveFracPerBCID', type='TProfile',
73  title='Current BCID lumi vs LB', opt='kAddBinsDynamically',
74  merge='merge', **lbdict)
75  group.defineHistogram('LB,lumiWeight', type='TProfile',
76  title='Current BCID lumi vs LB', opt='kAddBinsDynamically',
77  merge='merge', **lbdict)
78 
79  # Vertex counts vs. lb number (loose and tight)
80  group.defineHistogram('LB,nLooseVtx', type='TProfile',
81  title=nLooseT+' per event;LB;<NlooseVtx/event>_{LB}',
82  opt='kAddBinsDynamically', merge='merge', **lbdict)
83  group.defineHistogram('LB,nTightVtx', type='TProfile',
84  title=nTightT+' per event;LB;<NtightVtx/event>_{LB}',
85  opt='kAddBinsDynamically', merge='merge', **lbdict)
86 
87  # Vertex counts per avg mu vs. lb number. (Same as above, just weighted.)
88  group.defineHistogram('LB,nLooseVtxPerAvgMu', type='TProfile', opt='kAddBinsDynamically',
89  title=nLooseT+' per event per Mu;LB;<NlooseVtx/event/#mu>_{LB}',
90  merge='merge', **lbdict)
91  group.defineHistogram('LB,nTightVtxPerAvgMu', type='TProfile', opt='kAddBinsDynamically',
92  title=nTightT+' per event per Mu;LB;<NtightVtx/event/#mu>_{LB}',
93  merge='merge', **lbdict)
94 
95  # Vertex counts vs. avg mu.
96  group.defineHistogram('avgIntPerXing,nLooseVtx', type='TProfile', xbins=250, xmin=0, xmax=100,
97  title=nLooseT+' per event;#mu;NlooseVtx/event')
98  group.defineHistogram('avgIntPerXing,nTightVtx', type='TProfile', xbins=250, xmin=0, xmax=100,
99  title=nTightT+' per event;#mu;NtightVtx/event')
100 
101  # Pixel clusters vs lb number. All, and then eparately for each endcap and barrel layer.
102  pixelgroup.defineHistogram('LB,nClustersAll', type='TProfile', opt='kAddBinsDynamically',
103  title=nPixClusterT+', all;LB;<NclustersAll/event>_{LB}',
104  merge='merge', **lbdict)
105  pixelgroup.defineHistogram('LB,nClustersECA', type='TProfile', opt='kAddBinsDynamically',
106  title=nPixClusterT+', endcap A;LB;<NlustersECA/event>_{LB}',
107  merge='merge', **lbdict)
108  pixelgroup.defineHistogram('LB,nClustersECC', type='TProfile', opt='kAddBinsDynamically',
109  title=nPixClusterT+', endcap C;LB;<NclustersECC/event>_{LB}',
110  merge='merge', **lbdict)
111  pixelgroup.defineHistogram('LB,nClustersB0', type='TProfile', opt='kAddBinsDynamically',
112  title=nPixClusterT+', barrel layer 0;LB;<NclustersB0/event>_{LB}',
113  merge='merge', **lbdict)
114  pixelgroup.defineHistogram('LB,nClustersB1', type='TProfile', opt='kAddBinsDynamically',
115  title=nPixClusterT+', barrel layer 1;LB;<NclustersB1/event>_{LB}',
116  merge='merge', **lbdict)
117  pixelgroup.defineHistogram('LB,nClustersB2', type='TProfile', opt='kAddBinsDynamically',
118  title=nPixClusterT+', barrel layer 2;LB;<NclustersB2/event>_{LB}',
119  merge='merge', **lbdict)
120 
121  # Pixel clusters per avg mu vs. lb number. (Same as above, just weighted.)
122  pixelgroup.defineHistogram('LB,nClustersAllPerAvgMu', type='TProfile', opt='kAddBinsDynamically',
123  title=nPixClusterT+' per Mu, all;LB;<NclustersAll/event/#mu>_{LB}',
124  merge='merge', **lbdict)
125  pixelgroup.defineHistogram('LB,nClustersECAPerAvgMu', type='TProfile', opt='kAddBinsDynamically',
126  title=nPixClusterT+' per Mu, endcap A;LB;<NlustersECA/event/#mu>_{LB}',
127  merge='merge', **lbdict)
128  pixelgroup.defineHistogram('LB,nClustersECCPerAvgMu', type='TProfile', opt='kAddBinsDynamically',
129  title=nPixClusterT+' per Mu, endcap C;LB;<NclustersECC/event/#mu>_{LB}',
130  merge='merge', **lbdict)
131  pixelgroup.defineHistogram('LB,nClustersB0PerAvgMu', type='TProfile', opt='kAddBinsDynamically',
132  title=nPixClusterT+' per Mu, barrel layer 0;LB;<NclustersB0/event/#mu>_{LB}',
133  merge='merge', **lbdict)
134  pixelgroup.defineHistogram('LB,nClustersB1PerAvgMu', type='TProfile', opt='kAddBinsDynamically',
135  title=nPixClusterT+' per Mu, barrel layer 1;LB;<NclustersB1/event/#mu>_{LB}',
136  merge='merge', **lbdict)
137  pixelgroup.defineHistogram('LB,nClustersB2PerAvgMu', type='TProfile', opt='kAddBinsDynamically',
138  title=nPixClusterT+' per Mu, barrel layer 2;LB;<NclustersB2/event/#mu>_{LB}',
139  merge='merge', **lbdict)
140 
141  # Pixel clusters vs. avg mu. All, then separately for each endcap and barrel layer.
142  pixelgroup.defineHistogram('avgIntPerXing,nClustersAll', type='TProfile',
143  xbins=250, xmin=0, xmax=100,
144  title=nPixClusterT+', all;#mu;NclustersAll/event')
145  pixelgroup.defineHistogram('avgIntPerXing,nClustersECA', type='TProfile',
146  xbins=250, xmin=0, xmax=100,
147  title=nPixClusterT+', endcap A;#mu;NclustersECA/event')
148  pixelgroup.defineHistogram('avgIntPerXing,nClustersECC', type='TProfile',
149  xbins=250, xmin=0, xmax=100,
150  title=nPixClusterT+', endcap C;#mu;NclustersECC/event')
151  pixelgroup.defineHistogram('avgIntPerXing,nClustersB0', type='TProfile',
152  xbins=250, xmin=0, xmax=100,
153  title=nPixClusterT+', barrel layer 0;#mu;NclustersB0/event')
154  pixelgroup.defineHistogram('avgIntPerXing,nClustersB1', type='TProfile',
155  xbins=250, xmin=0, xmax=100,
156  title=nPixClusterT+', barrel layer 1;#mu;NclustersB1/event')
157  pixelgroup.defineHistogram('avgIntPerXing,nClustersB2', type='TProfile',
158  xbins=250, xmin=0, xmax=100,
159  title=nPixClusterT+', barrel layer 2;#mu;NclustersB2/event')
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
max
constexpr double max()
Definition: ap_fixedTest.cxx:33
min
constexpr double min()
Definition: ap_fixedTest.cxx:26
DQTLumiMonAlg.DQTLumiMonAlgConfigByTriggerChain
def DQTLumiMonAlgConfigByTriggerChain(helper, algConfObj, flags, triggerChain='', triggerPath='')
Definition: DQTLumiMonAlg.py:22
DQTLumiMonAlg.DQTLumiMonAlgConfig
def DQTLumiMonAlgConfig(flags)
Definition: DQTLumiMonAlg.py:5