ATLAS Offline Software
Functions
TileCalCellMonAlg Namespace Reference

Functions

def TileCalCellMonAlgConfig (flags, **kwargs)
 

Function Documentation

◆ TileCalCellMonAlgConfig()

def TileCalCellMonAlg.TileCalCellMonAlgConfig (   flags,
**  kwargs 
)
Function to configure TileCalCellMonAlg algorithm in the monitoring system.

Definition at line 11 of file TileCalCellMonAlg.py.

11 def TileCalCellMonAlgConfig(flags, **kwargs):
12  ''' Function to configure TileCalCellMonAlg algorithm in the monitoring system.'''
13 
14  kwargs.setdefault('MonGroupName', 'TileEventFiter')
15  kwargs.setdefault('useBeamBackgroundRemoval', False)
16  kwargs.setdefault('useLArNoisyAlg', False)
17  kwargs.setdefault('useLArCollisionFilterTool', False)
18 
19  if not (flags.Common.isOnline == 'online' or flags.Input.isMC):
20  kwargs.setdefault('useReadyFilterTool', True)
21  kwargs.setdefault('useBadLBTool', False) # FIXME: when new LArBadLBFilterTool config is ready
22  else:
23  kwargs.setdefault('useReadyFilterTool', False)
24  kwargs.setdefault('useBadLBTool', False)
25 
26  from AthenaCommon.SystemOfUnits import MeV
27  kwargs.setdefault('EnergyThreshold', 300.0 * MeV)
28 
29  from AthenaMonitoring import AthMonitorCfgHelper
30  helper = AthMonitorCfgHelper(flags,'TileCalMonCfg')
31 
32  from LArGeoAlgsNV.LArGMConfig import LArGMCfg
33  cfg = LArGMCfg(flags)
34 
35  from TileGeoModel.TileGMConfig import TileGMCfg
36  cfg.merge(TileGMCfg(flags))
37 
38  from CaloTools.CaloNoiseCondAlgConfig import CaloNoiseCondAlgCfg
39  cfg.merge(CaloNoiseCondAlgCfg(flags))
40 
41  if kwargs['useLArCollisionFilterTool']:
42  from LArCellRec.LArCollisionTimeConfig import LArCollisionTimeCfg
43  cfg.merge(LArCollisionTimeCfg(flags))
44 
45  if kwargs['useReadyFilterTool'] and 'ReadyFilterTool' not in kwargs:
46  from AthenaMonitoring.AtlasReadyFilterConfig import AtlasReadyFilterCfg
47  readyFilterTool = cfg.popToolsAndMerge(AtlasReadyFilterCfg(flags))
48  kwargs['ReadyFilterTool'] = readyFilterTool
49 
50  from AthenaConfiguration.ComponentFactory import CompFactory
51  tileCalCellMonAlg = helper.addAlgorithm(CompFactory.TileCalCellMonAlg, 'TileCalCellMonAlg')
52 
53  for k, v in kwargs.items():
54  setattr(tileCalCellMonAlg, k, v)
55 
56  binLabels = ["TotalEvents", "ATLAS Ready", "with Good LAr LB", "with No LAr Collision",
57  "with No Beam Background", "with No Trigger Filter","with No LArError"]
58 
59  if not tileCalCellMonAlg.useReadyFilterTool:
60  binLabels[1] = "ATLAS Ready-OFF"
61  if not tileCalCellMonAlg.useBadLBTool:
62  binLabels[2] = "Good LAr LB-OFF"
63  if not tileCalCellMonAlg.useLArCollisionFilterTool:
64  binLabels[3] = "LAr collision-OFF"
65  if not tileCalCellMonAlg.useBeamBackgroundRemoval:
66  binLabels[4] = "Beam backgr.-OFF"
67  if not tileCalCellMonAlg.useLArNoisyAlg:
68  binLabels[5] = "LAr Error Veto-OFF"
69 
70  topPath = '/CaloMonitoring/TileCellMon_NoTrigSel/General/'
71  tileFilterGroup = helper.addGroup(tileCalCellMonAlg, tileCalCellMonAlg.MonGroupName, topPath)
72 
73  from CaloMonitoring.CaloMonAlgBase import CaloBaseHistConfig
74  CaloBaseHistConfig(tileFilterGroup, 'Summary/', binLabels)
75 
76  # 1) Configure histogram with TileCalCellMonAlg algorithm execution time
77  executeTimeGroup = helper.addGroup(tileCalCellMonAlg, 'TileCalCellMonExecuteTime', topPath)
78  executeTimeGroup.defineHistogram('TIME_execute', path = 'Summary', type='TH1F',
79  title = 'Time for execute TileCalCellMonAlg algorithm;time [#mus]',
80  xbins = 100, xmin = 0, xmax = 100000)
81 
82  # 2) Configure histograms with occupancy maps over threshold (4 noise sigma) per Tile sample
83  samplesWithoutE = ['A', 'BC', 'D', '']
84  noiseEtaPhiArray = helper.addArray([len(samplesWithoutE)], tileCalCellMonAlg, 'CellsNoiseXEtaVSPhi', topPath = topPath)
85  for postfix, tool in noiseEtaPhiArray.Tools.items():
86  sample = samplesWithoutE[int( postfix.split('_')[1] )]
87  title = ('Number of Tile Cells %s' % sample) + ' with E > 4 sigma (DB);#eta;#phi'
88  name = 'eta,phi;CellsNoiseXEtaVSPhi' + (sample + 'cells' if sample else '')
89  tool.defineHistogram(name, title = title, type = 'TH2F',
90  xbins = 17, xmin = -1.7, xmax = 1.7,
91  ybins = 64, ymin = -3.14, ymax = 3.14)
92 
93  # 3) Configure histogram with number of 4 sigma seeds per Tile hash ID
94  noiseHashGroup = helper.addGroup(tileCalCellMonAlg, 'CellsXNoiseXHash', topPath)
95  noiseHashGroup.defineHistogram('hash;CellsXNoiseXHash', path = '', type='TH1F',
96  title = 'Number of 4 sigma seeds per hash;Tile Cell Hash ID;Events',
97  xbins = 5184, xmin = -0.5, xmax = 5183.5)
98 
99  # 4) Configure histogram with Tile cell energy/noise (DB) ratio
100  noiseHashGroup = helper.addGroup(tileCalCellMonAlg, 'CellsNoiseTile', topPath)
101  noiseHashGroup.defineHistogram('noise;CellsNoiseTile', path = '', type='TH1F',
102  title = 'Energy/Noise (DB) of TileCal;Cell Energy / sigma (DB);Events',
103  xbins = 200, xmin = -10.0, xmax = 10.0)
104 
105  # 5) Configure histogram with mean Tile cell noise (DB) vs eta
106  noiseEtaGroup = helper.addGroup(tileCalCellMonAlg, 'CellsNoiseXEta', topPath)
107  noiseEtaGroup.defineHistogram('eta,noise;CellsNoiseXEta', path = '', type='TProfile',
108  title = 'Tile Cell noise #sigma (DB) vs #eta;#eta;Mean Cell noise (DB) [MeV]',
109  xbins = 17, xmin = -1.7, xmax = 1.7)
110 
111  # 6) Configure histogram with mean Tile cell noise (DB) vs phi
112  noisePhiGroup = helper.addGroup(tileCalCellMonAlg, 'CellsNoiseXPhi', topPath)
113  noisePhiGroup.defineHistogram('phi,noise;CellsNoiseXPhi', path = '', type='TProfile',
114  title = 'Tile Cell noise #sigma (DB) vs #phi;#phi;Mean Cell noise (DB) [MeV]',
115  xbins = 64, xmin = -3.14, xmax = 3.14)
116 
117  # 7) Configure histogram with number of Tile cell over threshold
118  nCellsGroup = helper.addGroup(tileCalCellMonAlg, 'CellsXN', topPath)
119  nCellsGroup.defineHistogram('nCells;CellsXN', path = '', type='TH1F',
120  title = 'Number of Tile Cells over threshold;Number of Tile Cells; Events',
121  xbins = 250, xmin = 0, xmax = 500)
122 
123  # 8) Configure histogram with Tile cell energy in GeV
124  energyGroup = helper.addGroup(tileCalCellMonAlg, 'CellsXE', topPath)
125  energyGroup.defineHistogram('energy;CellsXE', path = '', type='TH1F',
126  title = 'Energy of Tile Cells;Tile Cell Energy [GeV]; Events',
127  xbins = 50, xmin = 0, xmax = 20)
128 
129  # 9) Configure histogram with mean Tile cell energy in GeV vs eta
130  energyEtaGroup = helper.addGroup(tileCalCellMonAlg, 'CellsXEta', topPath)
131  energyEtaGroup.defineHistogram('eta,energy;CellsXEta', path = '', type='TProfile',
132  title = 'Tile Cell Energy vs #eta;#eta;Mean Cell Energy [GeV]',
133  xbins = 17, xmin = -1.7, xmax = 1.7)
134 
135  # 10) Configure histogram with mean Tile cell energy in GeV vs phi
136  energyPhiGroup = helper.addGroup(tileCalCellMonAlg, 'CellsXPhi', topPath)
137  energyPhiGroup.defineHistogram('phi,energy;CellsXPhi', path = '', type='TProfile',
138  title = 'Tile Cell Energy vs #phi;#phi;Mean Cell Energy [GeV]',
139  xbins = 64, xmin = -3.14, xmax = 3.14)
140 
141  # 11) Configure histogram with mean Tile cell energy in GeV vs tower
142  energyTowerGroup = helper.addGroup(tileCalCellMonAlg, 'CellsXTower', topPath)
143  energyTowerGroup.defineHistogram('tower,energy;CellsXTower', path = '', type='TProfile',
144  title = 'Tile Cell Energy vs tower;Tower;Mean Cell Energy [GeV]',
145  xbins = 18, xmin = 0, xmax = 18)
146 
147  # 12) Configure histogram with occupancy map over threshold vs eta and phi
148  occupEtaPhiGroup = helper.addGroup(tileCalCellMonAlg, 'CellsXEtaVSPhi', topPath)
149  occupEtaPhiTitle = ('Number of Tile Cell above threshold %s MeV;#eta;#phi' % kwargs['EnergyThreshold'])
150  occupEtaPhiGroup.defineHistogram('eta,phi;CellsXEtaVSPhi', path = '', type='TH2F', title = occupEtaPhiTitle,
151  xbins = 17, xmin = -1.7, xmax = 1.7, ybins = 64, ymin = -3.14, ymax = 3.14)
152 
153  # 13) Configure histograms with mean Tile cell energy vs module per sample
154  samples = ['A', 'BC', 'D', 'E']
155  energyModuleArray = helper.addArray([len(samples)], tileCalCellMonAlg, 'CellsXModule', topPath = topPath)
156  for postfix, tool in energyModuleArray.Tools.items():
157  sampleIdx = int( postfix.split('_')[1] )
158  sample = samples[sampleIdx]
159  title = ('Tile Sampling %s' % sample) + ';Module;Mean Cell Energy [GeV]'
160  name = 'module,energy;CellsXModuleS' + str(sampleIdx + 1)
161  tool.defineHistogram(name, title = title, type = 'TProfile',
162  xbins = 64, xmin = 1, xmax = 65)
163 
164 
165  accumalator = helper.result()
166  cfg.merge(accumalator)
167  return cfg
168 
169 
SystemOfUnits
CaloMonAlgBase.CaloBaseHistConfig
def CaloBaseHistConfig(group, histpath, binlabels)
Definition: CaloMonAlgBase.py:5
python.CaloNoiseCondAlgConfig.CaloNoiseCondAlgCfg
def CaloNoiseCondAlgCfg(flags, noisetype="totalNoise")
Definition: CaloNoiseCondAlgConfig.py:11
LArGMConfig.LArGMCfg
def LArGMCfg(flags)
Definition: LArGMConfig.py:8
python.AtlasReadyFilterConfig.AtlasReadyFilterCfg
def AtlasReadyFilterCfg(flags)
Definition: AtlasReadyFilterConfig.py:10
python.CaloAddPedShiftConfig.int
int
Definition: CaloAddPedShiftConfig.py:45
LArCollisionTimeConfig.LArCollisionTimeCfg
def LArCollisionTimeCfg(configFlags, cutIteration=False)
Definition: LArCollisionTimeConfig.py:8
str
Definition: BTagTrackIpAccessor.cxx:11
TileCalCellMonAlg.TileCalCellMonAlgConfig
def TileCalCellMonAlgConfig(flags, **kwargs)
Definition: TileCalCellMonAlg.py:11
TileGMConfig.TileGMCfg
def TileGMCfg(flags)
Definition: TileGMConfig.py:7