ATLAS Offline Software
Functions
ZdcLEDMonitorAlgorithm Namespace Reference

Functions

def ZdcLEDMonitoringConfig (inputFlags, run_type)
 

Function Documentation

◆ ZdcLEDMonitoringConfig()

def ZdcLEDMonitorAlgorithm.ZdcLEDMonitoringConfig (   inputFlags,
  run_type 
)

Definition at line 14 of file ZdcLEDMonitorAlgorithm.py.

14 def ZdcLEDMonitoringConfig(inputFlags, run_type):
15 
16 #---------------------------------------------------------------------------------------
17  from AthenaMonitoring import AthMonitorCfgHelper
18  helper = AthMonitorCfgHelper(inputFlags,'ZdcAthMonitorCfg')
19 
20  from AthenaConfiguration.ComponentFactory import CompFactory
21  zdcLEDMonAlg = helper.addAlgorithm(CompFactory.ZdcLEDMonitorAlgorithm,'ZdcLEDMonAlg')
22  zdcLEDMonAlg.EnableZDC = inputFlags.Detector.EnableZDC_ZDC
23  zdcLEDMonAlg.EnableRPD = inputFlags.Detector.EnableZDC_RPD
24 # --------------------------------------------------------------------------------------------------
25 
26  LEDs = ["Blue1", "Green", "Blue2"]
27  sides = ["C","A"]
28  modules = ["0","1","2","3"]
29  channels = ["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15"]
30 
31  n_energy_bins_default = 200
32  n_adc_sum_fine_bins = 800
33  n_time_bins_default = 150
34  n_sample_bins_default = 25
35  lumi_block_max = 2000
36  l1TriggerType_max = 256
37  adc_sum_max = 40000.0
38  max_adc_max = 4096.0
39  nsamples_max = 25.0
40  time_max = 75.0
41 
42  nDecodingErrorBits = 3
43 
44 # --------------------------------------------------------------------------------------------------
45  zdcLEDAllEventsDiagMonTool = helper.addGroup(zdcLEDMonAlg, 'ZdcLEDAllEventsDiagnosis','ZDC/AllLEDEventsDiagnosis/')
46 
47  zdcModLEDMonToolArr = helper.addArray([LEDs,sides,modules],zdcLEDMonAlg,'ZdcModLEDMonitor', topPath='ZDC/ZDCLED/')
48  rpdChanLEDMonToolArr = helper.addArray([LEDs,sides,channels],zdcLEDMonAlg,'RPDChanLEDMonitor', topPath='ZDC/RPDLED/')
49 
50 # ------------------------- All-event (including bad events) diagnostic histograms -------------------------
51 
52 
53  zdcLEDAllEventsDiagMonTool.defineHistogram('decodingErrorBits',title=';;Events',
54  xbins=nDecodingErrorBits,xmin=0.0,xmax=nDecodingErrorBits,opt='kVec',
55  xlabels=['No Decoding Error', 'ZDC Decoding Error', 'RPD Decoding Error'])
56 
57  zdcLEDAllEventsDiagMonTool.defineHistogram('l1TriggerType', title=';L1TriggerType;Events',
58  xbins=l1TriggerType_max,xmin=0.0,xmax=l1TriggerType_max)
59 
60  # zdcLEDAllEventsDiagMonTool.defineHistogram('lumiBlock, l1TriggerType', type='TH2F', title=';lumi block;L1TriggerType',
61  # path='L1TriggerType',
62  # xbins=int(lumi_block_max/10),xmin=0.0,xmax=lumi_block_max,
63  # ybins=l1TriggerType_max,ymin=0.0,ymax=l1TriggerType_max)
64 
65 
66 # -------------------------------------------- Observables ------------------------------------------------------
67 
68  zdcModLEDMonToolArr.defineHistogram('zdcLEDADCSum', title=';LED ADC Sum [ADC Counts];Events',
69  path='zdcLEDADCSum',
70  xbins=n_adc_sum_fine_bins,xmin=0.0,xmax=adc_sum_max)
71  zdcModLEDMonToolArr.defineHistogram('zdcLEDMaxADC', title=';LED Max ADC [ADC Counts];Events',
72  path='zdcLEDMaxADC',
73  xbins=n_energy_bins_default,xmin=0.0,xmax=max_adc_max)
74  zdcModLEDMonToolArr.defineHistogram('zdcLEDMaxSample', title=';LED Max Sample [ADC Counts];Events',
75  path='zdcLEDMaxSample',
76  xbins=n_sample_bins_default,xmin=0.0,xmax=nsamples_max)
77  zdcModLEDMonToolArr.defineHistogram('zdcLEDAvgTime', title=';LED Average Time [ns];Events',
78  path='zdcLEDAvgTime',
79  xbins=n_time_bins_default,xmin=0.0,xmax=time_max)
80  rpdChanLEDMonToolArr.defineHistogram('rpdLEDADCSum', title=';LED ADC Sum [ADC Counts];Events',
81  path='rpdLEDADCSum',
82  xbins=n_adc_sum_fine_bins,xmin=0.0,xmax=adc_sum_max)
83  rpdChanLEDMonToolArr.defineHistogram('rpdLEDMaxADC', title=';LED Max ADC [ADC Counts];Events',
84  path='rpdLEDMaxADC',
85  xbins=n_energy_bins_default,xmin=0.0,xmax=max_adc_max)
86  rpdChanLEDMonToolArr.defineHistogram('rpdLEDMaxSample', title=';LED Max Sample [ADC Counts];Events',
87  path='rpdLEDMaxSample',
88  xbins=n_sample_bins_default,xmin=0.0,xmax=nsamples_max)
89  rpdChanLEDMonToolArr.defineHistogram('rpdLEDAvgTime', title=';LED Average Time [ns];Events',
90  path='rpdLEDAvgTime',
91  xbins=n_time_bins_default,xmin=0.0,xmax=time_max)
92 
93 # -------------------------------------------- lumi block dependence ------------------------------------------------------
94 
95  zdcModLEDMonToolArr.defineHistogram('lumiBlock, zdcLEDADCSum;zdcLEDADCSum_vs_lb', type='TH2F', title=';lumi block;LED ADC Sum [ADC Counts]',
96  path='zdcLEDADCSumLBdep',
97  xbins=lumi_block_max,xmin=0.0,xmax=lumi_block_max,
98  ybins=n_adc_sum_fine_bins,ymin=0.0,ymax=adc_sum_max)
99  zdcModLEDMonToolArr.defineHistogram('lumiBlock, zdcLEDMaxADC;zdcLEDMaxADC_vs_lb', type='TH2F', title=';lumi block;LED Max ADC [ADC Counts]',
100  path='zdcLEDMaxADCLBdep',
101  xbins=lumi_block_max,xmin=0.0,xmax=lumi_block_max,
102  ybins=n_energy_bins_default,ymin=0.0,ymax=max_adc_max)
103  zdcModLEDMonToolArr.defineHistogram('lumiBlock, zdcLEDMaxSample;zdcLEDMaxSample_vs_lb', type='TH2F', title=';lumi block;LED Max Sample [ADC Counts]',
104  path='zdcLEDMaxSampleLBdep',
105  xbins=lumi_block_max,xmin=0.0,xmax=lumi_block_max,
106  ybins=n_sample_bins_default,ymin=0.0,ymax=nsamples_max)
107  zdcModLEDMonToolArr.defineHistogram('lumiBlock, zdcLEDAvgTime;zdcLEDAvgTime_vs_lb', type='TH2F', title=';lumi block;LED Average Time [ns]',
108  path='zdcLEDAvgTimeLBdep',
109  xbins=lumi_block_max,xmin=0.0,xmax=lumi_block_max,
110  ybins=n_time_bins_default,ymin=0.0,ymax=time_max)
111  rpdChanLEDMonToolArr.defineHistogram('lumiBlock, rpdLEDADCSum;rpdLEDADCSum_vs_lb', type='TH2F', title=';lumi block;LED ADC Sum [ADC Counts]',
112  path='rpdLEDADCSumLBdep',
113  xbins=lumi_block_max,xmin=0.0,xmax=lumi_block_max,
114  ybins=n_adc_sum_fine_bins,ymin=0.0,ymax=adc_sum_max)
115  rpdChanLEDMonToolArr.defineHistogram('lumiBlock, rpdLEDMaxADC;rpdLEDMaxADC_vs_lb', type='TH2F', title=';lumi block;LED Max ADC [ADC Counts]',
116  path='rpdLEDMaxADCLBdep',
117  xbins=lumi_block_max,xmin=0.0,xmax=lumi_block_max,
118  ybins=n_energy_bins_default,ymin=0.0,ymax=max_adc_max)
119  rpdChanLEDMonToolArr.defineHistogram('lumiBlock, rpdLEDMaxSample;rpdLEDMaxSample_vs_lb', type='TH2F', title=';lumi block;LED Max Sample [ADC Counts]',
120  path='rpdLEDMaxSampleLBdep',
121  xbins=lumi_block_max,xmin=0.0,xmax=lumi_block_max,
122  ybins=n_sample_bins_default,ymin=0.0,ymax=nsamples_max)
123  rpdChanLEDMonToolArr.defineHistogram('lumiBlock, rpdLEDAvgTime;rpdLEDAvgTime_vs_lb', type='TH2F', title=';lumi block;LED Average Time [ns]',
124  path='rpdLEDAvgTimeLBdep',
125  xbins=lumi_block_max,xmin=0.0,xmax=lumi_block_max,
126  ybins=n_time_bins_default,ymin=0.0,ymax=time_max)
127 
128 
129  return helper.result()
130 
131 
ZdcLEDMonitorAlgorithm.ZdcLEDMonitoringConfig
def ZdcLEDMonitoringConfig(inputFlags, run_type)
Definition: ZdcLEDMonitorAlgorithm.py:14