ATLAS Offline Software
Functions
ZdcMonitorAlgorithm Namespace Reference

Functions

def create_log_bins (min_value, max_value, num_bins)
 
def create_vinj_bins ()
 
def create_hg_fit_amp_inj_bins ()
 
def create_lg_fit_amp_inj_bins ()
 
def ZdcMonitoringConfig (inputFlags)
 

Function Documentation

◆ create_hg_fit_amp_inj_bins()

def ZdcMonitorAlgorithm.create_hg_fit_amp_inj_bins ( )

Definition at line 50 of file ZdcMonitorAlgorithm.py.

51 
52  # Define min, max, and step size for each range
53  min1, max1, step1 = 0, 280, 4 # up to the tail of 10mV
54  min2, max2, step2 = 280, module_FPGA_max_ADC+1, 8
55 
56  # Generate each range using the defined variables
57  range1 = np.arange(min1, max1, step1)
58  range2 = np.arange(min2, max2, step2)
59 
60  # Concatenate the ranges into a single array
61  hg_amp_inj_bins_array = np.concatenate((range1, range2))
62 
63  return hg_amp_inj_bins_array.tolist()
64 

◆ create_lg_fit_amp_inj_bins()

def ZdcMonitorAlgorithm.create_lg_fit_amp_inj_bins ( )

Definition at line 65 of file ZdcMonitorAlgorithm.py.

66 
67  # Define min, max, and step size for each range
68  min1, max1, step1 = 0, 28, 0.4 # up to the tail of 10mV
69  min2, max2, step2 = 28, 800, 0.8 # roughly correspond to 300mV - can fine tune with ntuple
70  min3, max3, step3 = 800, module_FPGA_max_ADC+1, 8
71 
72 
73  # Generate each range using the defined variables
74  range1 = np.arange(min1, max1, step1)
75  range2 = np.arange(min2, max2, step2)
76  range3 = np.arange(min3, max3, step3)
77 
78  # Concatenate the ranges into a single array
79  lg_amp_inj_bins_array = np.concatenate((range1, range2, range3))
80 
81  return lg_amp_inj_bins_array.tolist()
82 

◆ create_log_bins()

def ZdcMonitorAlgorithm.create_log_bins (   min_value,
  max_value,
  num_bins 
)

Definition at line 20 of file ZdcMonitorAlgorithm.py.

20 def create_log_bins(min_value, max_value, num_bins):
21  # Calculate the logarithmic bin edges
22  log_min = np.log10(min_value)
23  log_max = np.log10(max_value)
24  log_bin_edges = np.linspace(log_min, log_max, num_bins + 1)
25  bin_edges = [10 ** edge for edge in log_bin_edges]
26 
27  return bin_edges
28 

◆ create_vinj_bins()

def ZdcMonitorAlgorithm.create_vinj_bins ( )

Definition at line 29 of file ZdcMonitorAlgorithm.py.

29 def create_vinj_bins():
30 
31  # Define min, max, and step size for each range
32  min1, max1, step1 = 0.0005 - 0.000001, 0.0025 - 0.000001, 0.00005
33  min2, max2, step2 = 0.0025 - 0.000001, 0.01 - 0.000001, 0.00025
34  min3, max3, step3 = 0.01 - 0.000001, 0.3 - 0.000001, 0.0025
35  min4, max4, step4 = 0.3 - 0.000001, 0.675 - 0.000001, 0.0125
36  min5, max5, step5 = 0.675 - 0.000001, 2.500001, 0.025
37 
38  # Generate each range using the defined variables
39  range1 = np.arange(min1, max1, step1)
40  range2 = np.arange(min2, max2, step2)
41  range3 = np.arange(min3, max3, step3)
42  range4 = np.arange(min4, max4, step4)
43  range5 = np.arange(min5, max5, step5)
44 
45  # Concatenate the ranges into a single array
46  vinj_bins_array = np.concatenate((np.array([0.]), range1, range2, range3, range4, range5))
47 
48  return vinj_bins_array.tolist()
49 

◆ ZdcMonitoringConfig()

def ZdcMonitorAlgorithm.ZdcMonitoringConfig (   inputFlags)

Definition at line 83 of file ZdcMonitorAlgorithm.py.

83 def ZdcMonitoringConfig(inputFlags):
84 
85  from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
86  result = ComponentAccumulator()
87 
88  from AthenaMonitoring import AthMonitorCfgHelper
89  helper = AthMonitorCfgHelper(inputFlags,'ZdcAthMonitorCfg')
90 
91  from AthenaConfiguration.ComponentFactory import CompFactory
92  zdcMonAlg = helper.addAlgorithm(CompFactory.ZdcMonitorAlgorithm,'ZdcMonAlg')
93 
94  from ZdcRec.ZdcRecConfig import SetConfigTag
95  config = SetConfigTag(inputFlags)
96  print ('ZdcMonitorAlgorithm.py: Running with config tag ', config)
97 
98  # Edit properties of a algorithm
99  zdcMonAlg.EnableZDCSingleSideTriggers = inputFlags.DQ.useTrigger and inputFlags.Input.TriggerStream == 'calibration_ZDCCalib' # added for online: enable trigger if we are running in ATLAS partition (DQ.useTrigger flag not set offline)
100  zdcMonAlg.CalInfoOn = 'physics_' in inputFlags.Input.TriggerStream or inputFlags.Input.TriggerStream == 'express_express' # turn calorimeter info on if input triggerstream (autoconfigured from input file) is physics_MinBias / express_express / physics_UCC
101  zdcMonAlg.EnableUCCTriggers = inputFlags.DQ.useTrigger and inputFlags.Input.TriggerStream == 'physics_UCC'
102  zdcMonAlg.IsOnline = inputFlags.Common.isOnline # if running online select a subset of histograms & use coarser binnings
103  zdcMonAlg.IsInjectedPulse = inputFlags.Input.TriggerStream == 'calibration_ZDCInjCalib' or inputFlags.Input.TriggerStream == 'calibration_DcmDummyProcessor'
104  zdcMonAlg.IsStandalone = inputFlags.Input.TriggerStream == 'calibration_DcmDummyProcessor'
105 
106  if zdcMonAlg.IsInjectedPulse:
107  from AthenaMonitoring.AtlasReadyFilterConfig import AtlasReadyFilterCfg
108  zdcMonAlg.FilterTools.append(result.popToolsAndMerge(AtlasReadyFilterCfg(inputFlags))) # assumes that your ComponentAccumulator is "cfg"
109 
110  zdcMonAlg.IsPEBStream = 'calibration_' in inputFlags.Input.TriggerStream
111  zdcMonAlg.IsPPMode = 'pp' in config
112  zdcMonAlg.IspOMode = 'pO' in config
113  zdcMonAlg.IsOOMode = 'OO' in config
114  zdcMonAlg.EnableOOpOTriggers = (zdcMonAlg.IspOMode or zdcMonAlg.IsOOMode) and inputFlags.DQ.useTrigger and ('physics_' in inputFlags.Input.TriggerStream or inputFlags.Input.TriggerStream == 'calibration_ZDCCalib')
115 
116  phys_stream_trig_map = {
117  "physics_MinBias": ['HLT_mb_sptrk_L1TRT_FILLED', 'HLT_mb_sptrk_L1jTE10', 'HLT_mb_sptrk_L1ZDC_OR', 'HLT_mb_sptrk_L1ZDC_LOR', 'HLT_noalg_L1ZDC_OR_EMPTY', 'HLT_noalg_L1ZDC_OR_UNPAIRED_NONISO', 'HLT_noalg_L1ZDC_LOR_EMPTY', 'HLT_noalg_L1ZDC_LOR_UNPAIRED_NONISO'],
118  "physics_UPC": ["L1_ZDC_XOR_jTE10_VjTE200", "L1_TRT_VjTE50", "L1_1ZDC_NZDC_jTE10_VjTE200", "L1_5ZDC_A_5ZDC_C_jTE5_VjTE200", "HLT_noalg_L1TRT_VjTE50"],
119  "physics_PC": ["HLT_mb_sptrk_L1ZDC_A_C_VTE50", "L1_ZDC_A_C_VTE50", "HLT_noalg_pc_L1TE50_VTE600.0ETA49", "L1_TE50_VTE600.0ETA49"], #Run2; ["HLT_noalg_L1jTE50_VjTE600", "HLT_mb_sptrk_pc_L1ZDC_A_C_VjTE50", "L1_jTE50_VjTE600", "L1_ZDC_A_C_VjTE50"] for #Run3
120  "physics_Standby": ["HLT_noalg_L1Standby"]
121  }
122 
123  OOpOTriggerChains = phys_stream_trig_map.get(inputFlags.Input.TriggerStream, [])
124 
125  OOpOCTPIDtoL1TriggerStreamMap = {
126  "calibration_ZDCCalib": {
127  331: "L1_ZDC_OR",
128  345: "L1_ZDC_LOR",
129  200: "L1_ZDC_A_C"
130  },
131  "physics_MinBias": {
132  120: 'L1_jTE10',
133  },
134  "physics_Standby": {
135  331: "L1_ZDC_OR",
136  345: "L1_ZDC_LOR",
137  1: "L1_TRT_FILLED",
138  121: "L1_jTE20"
139  }
140  }
141 
142  OOpOCTPIDtoL1TriggerMap = OOpOCTPIDtoL1TriggerStreamMap.get(inputFlags.Input.TriggerStream, {})
143  OOpOL1TriggerChainsFromCTP = list(OOpOCTPIDtoL1TriggerMap.values())
144  OOpOTriggerChains += OOpOL1TriggerChainsFromCTP
145 
146  zdcMonAlg.OOpOTriggers = OOpOTriggerChains
147  zdcMonAlg.OOpOL1TriggerFromCTPIDMap = OOpOCTPIDtoL1TriggerMap
148 
149  zdcMonAlg.RunNumber = inputFlags.Input.RunNumbers[0] if len(inputFlags.Input.RunNumbers) > 0 else 0
150  if (len(inputFlags.Input.RunNumbers) == 0):
151  print ('ZdcMonitorAlgorithm.py: WARNING the list in the input flag Input.RunNumbers is empty - run number not set! Likely to use default pulser setting')
152  elif (len(inputFlags.Input.RunNumbers) > 1):
153  print ('ZdcMonitorAlgorithm.py: WARNING the list in the input flag Input.RunNumbers has more than one element - retrieving pulser-setting configuration using the first run number! May cause misconfiguration for the other run numbers')
154 
155  zdcMonAlg.EnableZDC = inputFlags.Detector.EnableZDC_ZDC
156  zdcMonAlg.EnableZDCPhysics = zdcMonAlg.EnableZDC and not zdcMonAlg.IsInjectedPulse # no physical pulse (neutrons) for injector pulse
157  zdcMonAlg.EnableRPD = inputFlags.Detector.EnableZDC_RPD and not zdcMonAlg.IsInjectedPulse
158  zdcMonAlg.EnableRPDAmp = zdcMonAlg.EnableRPD
159  zdcMonAlg.EnableCentroid = zdcMonAlg.EnableRPD
160 
161  print ("ZdcMonitorAlgorithm.py: IsInjectedPulse? ",zdcMonAlg.IsInjectedPulse)
162  print ("ZdcMonitorAlgorithm.py: IsPPMode? ",zdcMonAlg.IsPPMode)
163  print ("ZdcMonitorAlgorithm.py: IspOMode? ",zdcMonAlg.IspOMode)
164  print ("ZdcMonitorAlgorithm.py: IsOOMode? ",zdcMonAlg.IsOOMode)
165  print ("ZdcMonitorAlgorithm.py: EnableOOpOTriggers? ",zdcMonAlg.EnableOOpOTriggers)
166 
167 # --------------------------------------------------------------------------------------------------
168  # Configure histograms
169 
170  # (potentially run-type dependent) range settings
171  lumi_block_max = 2000
172  n_lumi_block_bins_coarse = 400
173  bcid_max = 3564
174  n_energy_bins_default = 200
175  n_fpga_bins = 204
176  n_time_centroid_bins_default = 100
177  n_module_amp_coarse_bins = 100
178  n_module_amp_fine_bins = 200
179  n_mod_fraction_bins_default = 100
180 
181  n_HG_LG_amp_ratio_bins = 120
182  n_HG_LG_time_diff_bins = 50
183 
184  module_chisq_min = 0.1
185  module_chisq_max = 800000
186  module_chisq_nbins = 80
187  module_chisq_over_amp_min = 0.01
188  module_chisq_over_amp_max = 3000
189  module_chisq_over_amp_nbins = 80
190  module_chisq_over_amp_linear_max = 50
191  module_chisq_over_amp_linear_nbins = 200
192 
193 
194  # to ensure the logarithmic binning in C++ algorithm agrees with python
195  # so that the inverse-bin-width weight calculation is correct
196  zdcMonAlg.ZDCModuleChisqHistMinValue = module_chisq_min
197  zdcMonAlg.ZDCModuleChisqHistMaxvalue = module_chisq_max
198  zdcMonAlg.ZDCModuleChisqHistNumBins = module_chisq_nbins
199  zdcMonAlg.ZDCModuleChisqOverAmpHistMinValue = module_chisq_over_amp_min
200  zdcMonAlg.ZDCModuleChisqOverAmpHistMaxvalue = module_chisq_over_amp_max
201  zdcMonAlg.ZDCModuleChisqOverAmpHistNumBins = module_chisq_over_amp_nbins
202 
203  zdcMonAlg.EnergyCutForModuleFractMonitor = 400 if zdcMonAlg.IsPPMode or zdcMonAlg.IspOMode or zdcMonAlg.IsOOMode else 13400
204  zdcMonAlg.triggerSideA = "L1_ZDC_PP_A" if zdcMonAlg.IsPPMode else "L1_ZDC_A"
205  zdcMonAlg.triggerSideC = "L1_ZDC_PP_C" if zdcMonAlg.IsPPMode else "L1_ZDC_C"
206 # --------------------------------------------------------------------------------------------------
207  if (zdcMonAlg.IsInjectedPulse):
208  from ZdcMonitoring.ZdcInjPulserVoltageReader import load_voltage_steps
209  voltage_values_list = []
210  voltage_strs_list = []
211  load_voltage_steps(zdcMonAlg.RunNumber, voltage_values_list, voltage_strs_list)
212 
213  if len(voltage_values_list) == 0:
214  voltage_values_list = [0.]
215  voltage_strs_list = ["0.00000"]
216 
217  zdcMonAlg.InjPulseVoltageSteps = voltage_values_list
218  zdcMonAlg.InjPulseVoltageStepsStr = voltage_strs_list
219 
220 # --------------------------------------------------------------------------------------------------
221  amp_LG_refit_max_ADC = module_FPGA_max_ADC
222 
223  fCal_single_side_min = -0.2
224  fCal_single_side_max = 2.8
225  fCal_sum_min = -0.5
226  fCal_sum_max = 5.5
227  fCal_single_side_nbins = 240
228  fCal_sum_nbins = 240
229 
230  total_Et_sum_min = -0.5
231  total_Et_sum_max = 5.5
232  total_Et_sum_nbins = 240
233 
234  uncalib_sum_zoomin_nbins = 100
235  energy_sum_zoomin_nbins = 200
236  energy_sum_1n_nbins = 350
237  energy_sum_1n_xmin = 1000.
238  energy_sum_1n_xmax = 4500.
239 
240 
241  if "PbPb" in config or "Injector" in config:
242  print ("looking at pbpb / injected-pulse data")
243  energy_sum_xmax = 200000.0
244  energy_sum_two_sides_xmax_TeV = 400.0
245  energy_sum_single_side_xmax_TeV = 200.0
246  energy_sum_zoomin_xmax = 13000.0
247  uncalib_amp_sum_zoomin_xmax = 7200.0
248  time_in_data_buffer = 75. #75 ns (3 BCID's) in buffer
249  x_centroid_min = -20 #small amplitude sum --> large range for x, y position
250  x_centroid_max = 20
251  y_centroid_min = -20
252  y_centroid_max = 60
253  zdc_amp_sum_xmax = 163840.0
254  rpd_channel_amp_min = - 2000.
255  rpd_amp_sum_xmax = 245760.0 #not the full range but a reasonable value
256  rpd_max_adc_sum_xmax = 40960.0
257  rpd_sum_adc_max = 25000.
258  lg_gain_factor = 10
259  module_calib_amp_xmax = 100000.0 #about the full dynamic range: 160 N / 4 * 2.5TeV
260  module_amp_1Nmonitor_xmax = 1250.0 #about 5N / 4 * 2.7TeV
261  module_calib_amp_1Nmonitor_xmax = 3400.0 #about 5N / 4 * 2.7TeV
262 
263  elif config == "LHCf2022":
264  print ("looking at 2022 lhcf data")
265  energy_sum_xmax = 3000
266  energy_sum_two_sides_xmax_TeV = 10.0
267  energy_sum_single_side_xmax_TeV = 5.0
268  energy_sum_zoomin_xmax = 3000
269  uncalib_amp_sum_zoomin_xmax = module_FPGA_max_ADC
270  time_in_data_buffer = 75. #75 ns (3 BCID's) in buffer
271  x_centroid_min = -500 #small amplitude sum --> large range for x, y position
272  x_centroid_max = 500
273  y_centroid_min = -50
274  y_centroid_max = 750
275  zdc_amp_sum_xmax = 3000
276  rpd_channel_amp_min = - 200.
277  rpd_amp_sum_xmax = 3000
278  rpd_max_adc_sum_xmax = 3000
279  rpd_sum_adc_max = 5000
280  lg_gain_factor = 1
281  module_calib_amp_xmax = 5000
282  module_amp_1Nmonitor_xmax = 2000 #about 5N / 4 * 2.7TeV
283  module_calib_amp_1Nmonitor_xmax = 5000 #about 5N / 4 * 2.7TeV
284 
285  elif zdcMonAlg.IsPPMode:
286  print ("looking at pp data")
287  energy_sum_xmax = 5000
288  energy_sum_two_sides_xmax_TeV = 10.0
289  energy_sum_single_side_xmax_TeV = 5.0
290  energy_sum_zoomin_xmax = 5000
291  uncalib_amp_sum_zoomin_xmax = module_FPGA_max_ADC
292  time_in_data_buffer = 75. #75 ns (3 BCID's) in buffer
293  x_centroid_min = -20 #small amplitude sum --> large range for x, y position
294  x_centroid_max = 20
295  y_centroid_min = -20
296  y_centroid_max = 120
297  zdc_amp_sum_xmax = 5000
298  rpd_channel_amp_min = - 200.
299  rpd_amp_sum_xmax = 5000
300  rpd_max_adc_sum_xmax = 5000
301  rpd_sum_adc_max = 5000.
302  lg_gain_factor = 1
303  module_calib_amp_xmax = 5000
304  module_amp_1Nmonitor_xmax = 2000 #about 5N / 4 * 2.7TeV
305  module_calib_amp_1Nmonitor_xmax = 5000 #about 5N / 4 * 2.7TeV
306  elif zdcMonAlg.IsOOMode:
307  print ("looking at OO data")
308  energy_sum_xmax = 10000.
309  energy_sum_two_sides_xmax_TeV = 40.
310  energy_sum_single_side_xmax_TeV = 20.0
311  energy_sum_zoomin_xmax = 13000.0 #4.85N (tail of 4N)
312  uncalib_amp_sum_zoomin_xmax = 7200.0 #tail of 4N
313  time_in_data_buffer = 75. #75 ns (3 BCID's) in buffer
314  x_centroid_min = -20 #small amplitude sum --> large range for x, y position
315  x_centroid_max = 20
316  y_centroid_min = -20
317  y_centroid_max = 60
318  zdc_amp_sum_xmax = 50000.0
319  rpd_channel_amp_min = - 2000.
320  rpd_amp_sum_xmax = 245760.0
321  rpd_max_adc_sum_xmax = 40960.0
322  rpd_sum_adc_max = 25000.
323  lg_gain_factor = 4
324  module_calib_amp_xmax = 13400.0 #20N / 4 * 2680.
325  module_amp_1Nmonitor_xmax = 1250.0 #about 5N / 4 * 2.7TeV
326  module_calib_amp_1Nmonitor_xmax = 3400.0 #about 5N / 4 * 2.7TeV
327  fCal_single_side_min = -0.02 # overwrite FCal binning
328  fCal_single_side_max = 0.43
329  fCal_sum_min = -0.03
330  fCal_sum_max = 0.72
331  fCal_single_side_nbins = 90
332  fCal_sum_nbins = 150
333  total_Et_sum_min = -0.1 # overwrite total ET binning
334  total_Et_sum_max = 1.5
335  total_Et_sum_nbins = 160
336 
337  elif zdcMonAlg.IspOMode:
338  print ("looking at pO data")
339  energy_sum_xmax = 30000.
340  energy_sum_two_sides_xmax_TeV = 40. #22.4N per side
341  energy_sum_single_side_xmax_TeV = 20.0
342  energy_sum_zoomin_xmax = 13000.0 #4.85N (tail of 4N)
343  uncalib_amp_sum_zoomin_xmax = 7200.0 #tail of 4N
344  time_in_data_buffer = 75. #75 ns (3 BCID's) in buffer
345  x_centroid_min = -20 #small amplitude sum --> large range for x, y position
346  x_centroid_max = 20
347  y_centroid_min = -20
348  y_centroid_max = 60
349  zdc_amp_sum_xmax = 50000.0
350  rpd_channel_amp_min = - 2000.
351  rpd_amp_sum_xmax = 245760.0
352  rpd_max_adc_sum_xmax = 40960.0
353  rpd_sum_adc_max = 25000.
354  lg_gain_factor = 4
355  module_calib_amp_xmax = 13400.0 #20N / 4 * 2680.
356  module_amp_1Nmonitor_xmax = 1250.0 #about 5N / 4 * 2.7TeV
357  module_calib_amp_1Nmonitor_xmax = 3400.0 #about 5N / 4 * 2.7TeV
358  fCal_single_side_min = -0.05 # overwrite FCal binning
359  fCal_single_side_max = 0.2
360  fCal_sum_min = -0.05
361  fCal_sum_max = 0.35
362  fCal_single_side_nbins = 100
363  fCal_sum_nbins = 100
364  total_Et_sum_min = -0.1 # overwrite total ET binning
365  total_Et_sum_max = 0.5
366  total_Et_sum_nbins = 120
367  else:
368  import sys
369  print("ZdcMonitorAlgorithm ERROR: Invalid configuration! Config tag is", config)
370  sys.exit(1)
371 
372 
373  lg_max_ADC = module_FPGA_max_ADC * lg_gain_factor
374  module_amp_xmax = lg_max_ADC
375 
376  hg_lg_amp_ratio_min_nominal = 0.6
377  hg_lg_amp_ratio_min_tight = 0.9
378  hg_lg_amp_ratio_max_nominal = 1.4
379  hg_lg_amp_ratio_max_tight = 1.2
380 
381  # #bins for RPD channel amplitude, including negative values - determined by the ratio between the negative amplitude range & positive amplitude range
382  rpd_sub_amp_min = - module_amp_xmax / 4.
383  rpd_sub_amp_max = module_amp_xmax / 2.
384  n_rpd_amp_bins_full_range = int((abs(rpd_channel_amp_min) + rpd_sum_adc_max) / rpd_sum_adc_max * n_energy_bins_default)
385  n_rpd_sub_amp_bins = int((abs(rpd_sub_amp_min) + rpd_sub_amp_max) / rpd_sub_amp_max * n_energy_bins_default)
386 
387 # --------------------------------------------------------------------------------------------------
388 # ----------------------------------- General ZDC observables -----------------------------------
389 # --------- Event-level observables / decoding error monitoring / A-C side correlations ---------
390 # --------------------------------------------------------------------------------------------------
391 
392  genZdcMonTool = helper.addGroup(zdcMonAlg, 'genZdcMonTool', topPath = 'ZDC')
393 
394  nDecodingErrorBits = 3
395 
396  genZdcMonTool.defineHistogram('decodingErrorBits',title=';;Events',
397  path='/EXPERT/Global/DecodingErrors',
398  opt='kVec',
399  xbins=nDecodingErrorBits,xmin=0.0,xmax=nDecodingErrorBits,
400  xlabels=['No Decoding Error', 'ZDC Decoding Error', 'RPD Decoding Error'])
401 
402  nUCCTrigBits = 7
403 
404  genZdcMonTool.defineHistogram('uccTrigBits',title=';;Events',
405  path='/EXPERT/Global/UCCTrigs',
406  opt='kVec',
407  xbins=nUCCTrigBits,xmin=0.0,xmax=nUCCTrigBits,
408  xlabels=['UCC Trig Enabled', 'Pass HELT50', 'Pass HELT35', 'Pass HELT25', 'Pass HELT20', 'Pass HELT15', 'UCC Trig Disabled'])
409 
410  if zdcMonAlg.EnableOOpOTriggers:
411  OOpOTriggerLabels = ['OOpO Trig Enabled'] + OOpOTriggerChains + ['OOpO Trig Disabled']
412 
413  nOOpOTrigBits = len(OOpOTriggerLabels)
414 
415  genZdcMonTool.defineHistogram('OOpOTrigBits',title=';;Events',
416  path='/EXPERT/Global/OOpOTrigs',
417  opt='kVec',
418  xbins=nOOpOTrigBits,xmin=0.0,xmax=nOOpOTrigBits,
419  xlabels=OOpOTriggerLabels)
420 
421  if (zdcMonAlg.EnableCentroid):
422  genZdcMonTool.defineHistogram('rpdCosDeltaReactionPlaneAngle', title=';Cos (#Delta #phi_{AorC});Events',
423  path='/EXPERT/Global/ReactionPlane',
424  cutmask='bothHasCentroid', # only require both sides to have centroid
425  xbins=n_time_centroid_bins_default,xmin=-1,xmax=1)
426  if (not zdcMonAlg.IsOnline):
427  genZdcMonTool.defineHistogram('rpdCosDeltaReactionPlaneAngle;rpdCosDeltaReactionPlaneAngle_requireValid', title=';Cos (#Delta #phi_{AorC});Events',
428  path='/EXPERT/Global/ReactionPlane',
429  cutmask='bothReactionPlaneAngleValid', # require centroid calculation on both sides to be valid
430  xbins=n_time_centroid_bins_default,xmin=-1,xmax=1)
431 
432  if (zdcMonAlg.EnableZDCPhysics):
433  genZdcMonTool.defineHistogram('zdcEnergySumA, zdcEnergySumC', type='TH2F', title=';E_{ZDC,A} [GeV];E_{ZDC,C} [GeV]',
434  path='/EXPERT/Global/SideACCorr',
435  xbins=n_energy_bins_default,xmin=0.0,xmax=energy_sum_xmax,
436  ybins=n_energy_bins_default,ymin=0.0,ymax=energy_sum_xmax)
437  if (zdcMonAlg.IspOMode or zdcMonAlg.IsOOMode): #OO mode --> add zoomed-in AC-correlation
438  genZdcMonTool.defineHistogram('zdcEnergySumA, zdcEnergySumC;zdcEnergySumC_vs_zdcEnergySumA_zoomin', type='TH2F', title=';E_{ZDC,A} [GeV];E_{ZDC,C} [GeV]',
439  path='/EXPERT/Global/SideACCorr',
440  xbins=energy_sum_zoomin_nbins,xmin=0.0,xmax=energy_sum_zoomin_xmax,
441  ybins=energy_sum_zoomin_nbins,ymin=0.0,ymax=energy_sum_zoomin_xmax)
442  genZdcMonTool.defineHistogram('zdcUncalibSumA, zdcUncalibSumC;zdcUncalibSumC_vs_zdcUncalibSumA_zoomin', type='TH2F', title=';Amp Sum SideA [ADC];Amp Sum SideC [ADC]',
443  path='/EXPERT/Global/SideACCorr',
444  xbins=uncalib_sum_zoomin_nbins,xmin=0.0,xmax=uncalib_amp_sum_zoomin_xmax,
445  ybins=uncalib_sum_zoomin_nbins,ymin=0.0,ymax=uncalib_amp_sum_zoomin_xmax)
446 
447  if (zdcMonAlg.EnableOOpOTriggers):
448  for oo_po_trig in OOpOTriggerChains:
449  genZdcMonTool.defineHistogram('zdcEnergySumA, zdcEnergySumC;zdcEnergySumC_vs_zdcEnergySumA_pass'+oo_po_trig, type='TH2F', title=';E_{ZDC,A} [GeV];E_{ZDC,C} [GeV]',
450  path='/EXPERT/Global/SideACCorr',
451  cutmask='pass'+oo_po_trig,
452  xbins=n_energy_bins_default,xmin=0.0,xmax=energy_sum_xmax,
453  ybins=n_energy_bins_default,ymin=0.0,ymax=energy_sum_xmax)
454  genZdcMonTool.defineHistogram('zdcEnergySumA, zdcEnergySumC;zdcEnergySumC_vs_zdcEnergySumA_zoomin_pass'+oo_po_trig, type='TH2F', title=';E_{ZDC,A} [GeV];E_{ZDC,C} [GeV]',
455  path='/EXPERT/Global/SideACCorr',
456  cutmask='pass'+oo_po_trig,
457  xbins=energy_sum_zoomin_nbins,xmin=0.0,xmax=energy_sum_zoomin_xmax,
458  ybins=energy_sum_zoomin_nbins,ymin=0.0,ymax=energy_sum_zoomin_xmax)
459  genZdcMonTool.defineHistogram('zdcUncalibSumA, zdcUncalibSumC;zdcUncalibSumC_vs_zdcUncalibSumA_zoomin_pass'+oo_po_trig, type='TH2F', title=';Amp Sum SideA [ADC];Amp Sum SideC [ADC]',
460  path='/EXPERT/Global/SideACCorr',
461  cutmask='pass'+oo_po_trig,
462  xbins=uncalib_sum_zoomin_nbins,xmin=0.0,xmax=uncalib_amp_sum_zoomin_xmax,
463  ybins=uncalib_sum_zoomin_nbins,ymin=0.0,ymax=uncalib_amp_sum_zoomin_xmax)
464 
465 
466 
467  # FCal E_T vs ZDC E_T
468  # to be run on min bias stream
469  if (zdcMonAlg.CalInfoOn):
470  genZdcMonTool.defineHistogram('fcalEtA, fcalEtC', type='TH2F', title=';E_{FCal, A} [GeV];E_{FCal, C} [GeV]',
471  path='/EXPERT/Global/SideACCorr',
472  xbins=fCal_single_side_nbins,xmin=fCal_single_side_min,xmax=fCal_single_side_max,
473  ybins=fCal_single_side_nbins,ymin=fCal_single_side_min,ymax=fCal_single_side_max)
474 
475  genZdcMonTool.defineHistogram('fcalEtSumTwoSides, zdcEnergySumTwoSidesTeV;zdcEnergySum_vs_fCalEt', type='TH2F', title=';FCal Energy [TeV];ZDC Energy [TeV]',
476  path = '/EXPERT/Global/ZDCFcalCorr',
477  opt='kAlwaysCreate',
478  xbins=fCal_sum_nbins,xmin=fCal_sum_min,xmax=fCal_sum_max,
479  ybins=n_energy_bins_default,ymin=0.0,ymax=energy_sum_two_sides_xmax_TeV)
480 
481  genZdcMonTool.defineHistogram('fcalEtSumTwoSides, zdcHadronicEnergySumTwoSidesTeV;zdcHadronicEnergySum_vs_fCalEt', type='TH2F', title=';FCal Energy [TeV];ZDC Hadronic Energy [TeV]',
482  path = '/EXPERT/Global/ZDCHEFcalCorr',
483  opt='kAlwaysCreate',
484  xbins=fCal_sum_nbins,xmin=fCal_sum_min,xmax=fCal_sum_max,
485  ybins=n_energy_bins_default,ymin=0.0,ymax=energy_sum_two_sides_xmax_TeV)
486 
487  genZdcMonTool.defineHistogram('totalEt24, zdcEnergySumTwoSidesTeV;zdcEnergySum_vs_totalEt', type='TH2F', title=';Total Et |#eta| < 2.4 [TeV];ZDC Energy [TeV]',
488  path = '/EXPERT/Global/ZDCTotalEtCorr',
489  opt='kAlwaysCreate',
490  xbins=total_Et_sum_nbins,xmin=total_Et_sum_min,xmax=total_Et_sum_max,
491  ybins=n_energy_bins_default,ymin=0.0,ymax=energy_sum_two_sides_xmax_TeV)
492 
493 
494  if (zdcMonAlg.EnableOOpOTriggers):
495  for oo_po_trig in OOpOTriggerChains:
496  genZdcMonTool.defineHistogram('fcalEtSumTwoSides, zdcEnergySumTwoSidesTeV;zdcEnergySum_vs_fCalEt_pass'+oo_po_trig, type='TH2F', title=';FCal Energy [TeV];ZDC Energy [TeV]',
497  path = '/EXPERT/Global/ZDCFcalCorr',
498  cutmask='pass'+oo_po_trig,
499  xbins=fCal_sum_nbins,xmin=fCal_sum_min,xmax=fCal_sum_max,
500  ybins=n_energy_bins_default,ymin=0.0,ymax=energy_sum_two_sides_xmax_TeV)
501  genZdcMonTool.defineHistogram('totalEt24, zdcEnergySumTwoSidesTeV;zdcEnergySum_vs_totalEt_pass'+oo_po_trig, type='TH2F', title=';Total Et |#eta| < 2.4 [TeV];ZDC Energy [TeV]',
502  path = '/EXPERT/Global/ZDCTotalEtCorr',
503  cutmask='pass'+oo_po_trig,
504  xbins=total_Et_sum_nbins,xmin=total_Et_sum_min,xmax=total_Et_sum_max,
505  ybins=n_energy_bins_default,ymin=0.0,ymax=energy_sum_two_sides_xmax_TeV)
506 
507 
508  if (zdcMonAlg.EnableUCCTriggers):
509  genZdcMonTool.defineHistogram('fcalEtSumTwoSides, zdcEnergySumTwoSidesTeV;zdcEnergySum_vs_fCalEt_passUCCTrig_HELT15', type='TH2F', title=';FCal Energy [TeV];ZDC Energy [TeV]',
510  path = '/EXPERT/Global/ZDCFcalCorr',
511  cutmask = 'passUCCTrig_HELT15',
512  opt='kAlwaysCreate',
513  xbins=fCal_sum_nbins,xmin=fCal_sum_min,xmax=fCal_sum_max,
514  ybins=n_energy_bins_default,ymin=0.0,ymax=energy_sum_two_sides_xmax_TeV)
515  genZdcMonTool.defineHistogram('fcalEtSumTwoSides, zdcEnergySumTwoSidesTeV;zdcEnergySum_vs_fCalEt_passUCCTrig_HELT20', type='TH2F', title=';FCal Energy [TeV];ZDC Energy [TeV]',
516  path = '/EXPERT/Global/ZDCFcalCorr',
517  cutmask = 'passUCCTrig_HELT20',
518  opt='kAlwaysCreate',
519  xbins=fCal_sum_nbins,xmin=fCal_sum_min,xmax=fCal_sum_max,
520  ybins=n_energy_bins_default,ymin=0.0,ymax=energy_sum_two_sides_xmax_TeV)
521  genZdcMonTool.defineHistogram('fcalEtSumTwoSides, zdcEnergySumTwoSidesTeV;zdcEnergySum_vs_fCalEt_passUCCTrig_HELT25', type='TH2F', title=';FCal Energy [TeV];ZDC Energy [TeV]',
522  path = '/EXPERT/Global/ZDCFcalCorr',
523  cutmask = 'passUCCTrig_HELT25',
524  opt='kAlwaysCreate',
525  xbins=fCal_sum_nbins,xmin=fCal_sum_min,xmax=fCal_sum_max,
526  ybins=n_energy_bins_default,ymin=0.0,ymax=energy_sum_two_sides_xmax_TeV)
527  genZdcMonTool.defineHistogram('fcalEtSumTwoSides, zdcEnergySumTwoSidesTeV;zdcEnergySum_vs_fCalEt_passUCCTrig_HELT35', type='TH2F', title=';FCal Energy [TeV];ZDC Energy [TeV]',
528  path = '/EXPERT/Global/ZDCFcalCorr',
529  cutmask = 'passUCCTrig_HELT35',
530  opt='kAlwaysCreate',
531  xbins=fCal_sum_nbins,xmin=fCal_sum_min,xmax=fCal_sum_max,
532  ybins=n_energy_bins_default,ymin=0.0,ymax=energy_sum_two_sides_xmax_TeV)
533  genZdcMonTool.defineHistogram('fcalEtSumTwoSides, zdcEnergySumTwoSidesTeV;zdcEnergySum_vs_fCalEt_passUCCTrig_HELT50', type='TH2F', title=';FCal Energy [TeV];ZDC Energy [TeV]',
534  path = '/EXPERT/Global/ZDCFcalCorr',
535  cutmask = 'passUCCTrig_HELT50',
536  opt='kAlwaysCreate',
537  xbins=fCal_sum_nbins,xmin=fCal_sum_min,xmax=fCal_sum_max,
538  ybins=n_energy_bins_default,ymin=0.0,ymax=energy_sum_two_sides_xmax_TeV)
539 
540  genZdcMonTool.defineHistogram('fcalEtSumTwoSides, zdcHadronicEnergySumTwoSidesTeV;zdcHadronicEnergySum_vs_fCalEt_passUCCTrig_HELT15', type='TH2F', title=';FCal Energy [TeV];ZDC Hadronic Energy [TeV]',
541  path = '/EXPERT/Global/ZDCHEFcalCorr',
542  cutmask = 'passUCCTrig_HELT15',
543  opt='kAlwaysCreate',
544  xbins=fCal_sum_nbins,xmin=fCal_sum_min,xmax=fCal_sum_max,
545  ybins=n_energy_bins_default,ymin=0.0,ymax=energy_sum_two_sides_xmax_TeV)
546  genZdcMonTool.defineHistogram('fcalEtSumTwoSides, zdcHadronicEnergySumTwoSidesTeV;zdcHadronicEnergySum_vs_fCalEt_passUCCTrig_HELT20', type='TH2F', title=';FCal Energy [TeV];ZDC Hadronic Energy [TeV]',
547  path = '/EXPERT/Global/ZDCHEFcalCorr',
548  cutmask = 'passUCCTrig_HELT20',
549  opt='kAlwaysCreate',
550  xbins=fCal_sum_nbins,xmin=fCal_sum_min,xmax=fCal_sum_max,
551  ybins=n_energy_bins_default,ymin=0.0,ymax=energy_sum_two_sides_xmax_TeV)
552  genZdcMonTool.defineHistogram('fcalEtSumTwoSides, zdcHadronicEnergySumTwoSidesTeV;zdcHadronicEnergySum_vs_fCalEt_passUCCTrig_HELT25', type='TH2F', title=';FCal Energy [TeV];ZDC Hadronic Energy [TeV]',
553  path = '/EXPERT/Global/ZDCHEFcalCorr',
554  cutmask = 'passUCCTrig_HELT25',
555  opt='kAlwaysCreate',
556  xbins=fCal_sum_nbins,xmin=fCal_sum_min,xmax=fCal_sum_max,
557  ybins=n_energy_bins_default,ymin=0.0,ymax=energy_sum_two_sides_xmax_TeV)
558  genZdcMonTool.defineHistogram('fcalEtSumTwoSides, zdcHadronicEnergySumTwoSidesTeV;zdcHadronicEnergySum_vs_fCalEt_passUCCTrig_HELT35', type='TH2F', title=';FCal Energy [TeV];ZDC Hadronic Energy [TeV]',
559  path = '/EXPERT/Global/ZDCHEFcalCorr',
560  cutmask = 'passUCCTrig_HELT35',
561  opt='kAlwaysCreate',
562  xbins=fCal_sum_nbins,xmin=fCal_sum_min,xmax=fCal_sum_max,
563  ybins=n_energy_bins_default,ymin=0.0,ymax=energy_sum_two_sides_xmax_TeV)
564  genZdcMonTool.defineHistogram('fcalEtSumTwoSides, zdcHadronicEnergySumTwoSidesTeV;zdcHadronicEnergySum_vs_fCalEt_passUCCTrig_HELT50', type='TH2F', title=';FCal Energy [TeV];ZDC Hadronic Energy [TeV]',
565  path = '/EXPERT/Global/ZDCHEFcalCorr',
566  cutmask = 'passUCCTrig_HELT50',
567  opt='kAlwaysCreate',
568  xbins=fCal_sum_nbins,xmin=fCal_sum_min,xmax=fCal_sum_max,
569  ybins=n_energy_bins_default,ymin=0.0,ymax=energy_sum_two_sides_xmax_TeV)
570 
571 # --------------------------------------------------------------------------------------------------
572  sides = ["C","A"]
573  modules = ["0","1","2","3"]
574  channels = ["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15"]
575 
576  nZdcStatusBits = 18
577  nRpdStatusBits = 15
578  nRpdCentroidStatusBits = 21
579 
580 # --------------------------------------------------------------------------------------------------
581 # ---------------------------------- Per-ZDC-arm/side observables ----------------------------------
582 # --------------------------------------------------------------------------------------------------
583 
584  if (zdcMonAlg.EnableZDCPhysics or zdcMonAlg.EnableRPDAmp or zdcMonAlg.EnableCentroid):
585 
586  zdcSideMonToolArr = helper.addArray([sides],zdcMonAlg,'ZdcSideMonitor', topPath = 'ZDC')
587 
588 
589  # ---------------------------- Calorimeter per-arm variables ----------------------------
590  # ---------------------------- Calorimeter energy/amplitude sum ----------------------------
591  if (zdcMonAlg.EnableZDCPhysics):
592  zdcSideMonToolArr.defineHistogram('zdcEnergySum',title='ZDC Side {0} Energy Sum;Side {0} Energy [GeV];Events',
593  path = '/EXPERT/ZDC/PerArm/Energy',
594  xbins=n_energy_bins_default,xmin=0.0,xmax=energy_sum_xmax) # 2.5TeV * 80 neutrons
595 
596  # --------------------- calibrated energy sum in the 1-to-4n-range ---------------------
597  zdcSideMonToolArr.defineHistogram('zdcEnergySum;zdcEnergySum_zoomin_noTrigSelec',title='ZDC Side {0} Energy Sum (1-to-4n, no trigger selection);Side {0} Energy[GeV];Events',
598  path = '/SHIFT/ZDC/PerArm/Energy',
599  opt='kAlwaysCreate', # always create for shift-needed histograms
600  xbins=energy_sum_zoomin_nbins,xmin=0.0,xmax=energy_sum_zoomin_xmax) # up to the "far end" of 4-neutron peak
601  if (zdcMonAlg.EnableOOpOTriggers):
602  for oo_po_trig in OOpOTriggerChains:
603  zdcSideMonToolArr.defineHistogram('zdcEnergySum;zdcEnergySum_zoomin_pass'+oo_po_trig,title='ZDC Side {0} Energy Sum (1-to-4n, no trigger selection);Side {0} Energy[GeV];Events',
604  path = '/SHIFT/ZDC/PerArm/Energy',
605  cutmask='pass'+oo_po_trig,
606  opt='kAlwaysCreate', # always create for shift-needed histograms
607  xbins=energy_sum_zoomin_nbins,xmin=0.0,xmax=energy_sum_zoomin_xmax) # up to the "far end" of 4-neutron peak
608 
609  if (zdcMonAlg.EnableZDCSingleSideTriggers):
610  zdcSideMonToolArr.defineHistogram('zdcEnergySum;zdcEnergySum_zoomin_wTrigSelec',title='ZDC Side {0} Energy Sum (1-to-4n, require opposite-side trigger);Side {0} Energy[GeV];Events',
611  path = '/SHIFT/ZDC/PerArm/Energy',
612  opt='kAlwaysCreate', # always create for shift-needed histograms
613  cutmask = 'passTrigOppSide',
614  xbins=energy_sum_zoomin_nbins,xmin=0.0,xmax=energy_sum_zoomin_xmax) # up to the "far end" of 4-neutron peak
615 
616  # --------------------- uncalibrated amplitude sum in the 1-to-4n-range ---------------------
617  zdcSideMonToolArr.defineHistogram('zdcUncalibSum;zdcUncalibSum_zoomin_noTrigSelec',title='ZDC Side {0} Uncalibrated Amplitude Sum (1-to-4n, no trigger selection);Side {0} Amp Sum [ADC];Events',
618  path = '/EXPERT/ZDC/PerArm/UncalibAmp',
619  xbins=energy_sum_zoomin_nbins,xmin=0.0,xmax=uncalib_amp_sum_zoomin_xmax) # up to the "far end" of 4-neutron peak
620 
621  if (zdcMonAlg.EnableZDCSingleSideTriggers):
622  zdcSideMonToolArr.defineHistogram('zdcUncalibSum;zdcUncalibSum_zoomin_wTrigSelec',title='ZDC Side {0} Uncalibrated Amplitude Sum (1-to-4n, require opposite-side trigger);Side {0} Amp Sum [ADC];Events',
623  path = '/EXPERT/ZDC/PerArm/UncalibAmp',
624  cutmask = 'passTrigOppSide',
625  xbins=energy_sum_zoomin_nbins,xmin=0.0,xmax=uncalib_amp_sum_zoomin_xmax) # up to the "far end" of 4-neutron peak
626 
627  # --------------------- uncalibrated amplitude sum in the full range ---------------------
628  zdcSideMonToolArr.defineHistogram('zdcUncalibSum',title='ZDC Side {0} Uncalibrated Sum;[ADC];Events',
629  path = '/EXPERT/ZDC/PerArm/UncalibAmp',
630  xbins=n_energy_bins_default,xmin=0.0,xmax=zdc_amp_sum_xmax)
631 
632  # ---------------------------- Calorimeter energy/amplitude sum: LB dependence ----------------------------
633  if (not zdcMonAlg.IsOnline): # offline - use fine LB binnings
634  zdcSideMonToolArr.defineHistogram('lumiBlock, zdcEnergySum;zdcEnergySum_vs_lb_noTrig', type='TH2F', title=';lumi block;Side {0} Energy [GeV]',
635  path = '/EXPERT/ZDC/PerArm/Energy',
636  xbins=lumi_block_max,xmin=0.0,xmax=lumi_block_max,
637  ybins=energy_sum_zoomin_nbins,ymin=0.0,ymax=energy_sum_zoomin_xmax) # for lumi dependence, only focus on the few-neutron peaks
638  if (zdcMonAlg.EnableZDCSingleSideTriggers):
639  zdcSideMonToolArr.defineHistogram('lumiBlock, zdcEnergySum;zdcEnergySum_vs_lb_wTrig', type='TH2F', title=';lumi block;Side {0} Energy [GeV]',
640  path = '/EXPERT/ZDC/PerArm/Energy',
641  cutmask = 'passTrigOppSide',
642  xbins=lumi_block_max,xmin=0.0,xmax=lumi_block_max,
643  ybins=energy_sum_zoomin_nbins,ymin=0.0,ymax=energy_sum_zoomin_xmax) # for lumi dependence, only focus on the few-neutron peaks
644  else: # online - use coarse LB binnings
645  zdcSideMonToolArr.defineHistogram('zdcEnergySum;zdcEnergySum_1n_noTrigSelec',title='ZDC Side {0} Energy Sum (1n range, no trigger selection);Side {0} Energy[GeV];Events',
646  path = '/SHIFT/ZDC/PerArm/Energy',
647  opt='kAlwaysCreate', # always create for shift-needed histograms
648  xbins=energy_sum_1n_nbins,xmin=energy_sum_1n_xmin,xmax=energy_sum_1n_xmax)
649 
650  zdcSideMonToolArr.defineHistogram('lumiBlock, zdcEnergySum;zdcEnergySum_1n_vs_lb_noTrig', type='TH2F', title=';lumi block;Side {0} Energy (1n range) [GeV]',
651  path = '/EXPERT/ZDC/PerArm/Energy',
652  xbins=n_lumi_block_bins_coarse,xmin=0.0,xmax=lumi_block_max,
653  ybins=energy_sum_1n_nbins,ymin=energy_sum_1n_xmin,ymax=energy_sum_1n_xmax)
654 
655  if (not zdcMonAlg.IsOnline): #only offline
656  zdcSideMonToolArr.defineHistogram('lumiBlock, zdcUncalibSum;zdcUncalibSum_vs_lb_noTrig', type='TH2F', title=';lumi block;ZDC Side {0} Uncalibrated Sum [ADC]',
657  path = '/EXPERT/ZDC/PerArm/UncalibAmp',
658  xbins=lumi_block_max,xmin=0.0,xmax=lumi_block_max,
659  ybins=n_energy_bins_default,ymin=0.0,ymax=uncalib_amp_sum_zoomin_xmax) # for lumi dependence, only focus on the few-neutron peaks
660  if (zdcMonAlg.EnableZDCSingleSideTriggers):
661  zdcSideMonToolArr.defineHistogram('lumiBlock, zdcUncalibSum;zdcUncalibSum_vs_lb_wTrig', type='TH2F', title=';lumi block;ZDC Side {0} Uncalibrated Sum [ADC]',
662  path = '/EXPERT/ZDC/PerArm/UncalibAmp',
663  cutmask = 'passTrigOppSide',
664  xbins=lumi_block_max,xmin=0.0,xmax=lumi_block_max,
665  ybins=n_energy_bins_default,ymin=0.0,ymax=uncalib_amp_sum_zoomin_xmax) # for lumi dependence, only focus on the few-neutron peaks
666 
667  # ---------------------------- Calorimeter energy/amplitude sum: BCID dependence ----------------------------
668  if (not zdcMonAlg.IsOnline): #only offline
669  zdcSideMonToolArr.defineHistogram('bcid, zdcEnergySum;zdcEnergySum_vs_bcid_noTrig', type='TH2F', title=';BCID;Side {0} Energy [GeV]',
670  path = '/EXPERT/ZDC/PerArm/Energy',
671  xbins=bcid_max,xmin=0.0,xmax=bcid_max,
672  ybins=n_energy_bins_default,ymin=0.0,ymax=energy_sum_zoomin_xmax) # for lumi dependence, only focus on the few-neutron peaks
673  if (zdcMonAlg.EnableZDCSingleSideTriggers):
674  zdcSideMonToolArr.defineHistogram('bcid, zdcEnergySum;zdcEnergySum_vs_bcid_wTrig', type='TH2F', title=';BCID;Side {0} Energy [GeV]',
675  path = '/EXPERT/ZDC/PerArm/Energy',
676  cutmask = 'passTrigOppSide',
677  xbins=bcid_max,xmin=0.0,xmax=bcid_max,
678  ybins=n_energy_bins_default,ymin=0.0,ymax=energy_sum_zoomin_xmax) # for lumi dependence, only focus on the few-neutron peaks
679 
680  if (zdcMonAlg.CalInfoOn):
681  zdcSideMonToolArr.defineHistogram('fCalEt, zdcEnergySumTeV;zdcEnergySum_vs_fCalEt_single_side', type='TH2F', title=';Side {0} FCal Energy [TeV];Side {0} ZDC Energy [TeV]',
682  path = '/EXPERT/ZDC/PerArm/ZDCFcalCorr',
683  opt='kAlwaysCreate',
684  xbins=fCal_single_side_nbins,xmin=fCal_single_side_min,xmax=fCal_single_side_max,
685  ybins=n_energy_bins_default,ymin=0.0,ymax=energy_sum_single_side_xmax_TeV)
686 
687 
688  # ---------------------------- Calorimeter average time & LB dependence ----------------------------
689 
690  zdcSideMonToolArr.defineHistogram('zdcAvgTime',title='ZDC Side Average Time;t[ns];Events',
691  path = '/EXPERT/ZDC/PerArm/AvgTime',
692  xbins=n_time_centroid_bins_default,xmin=-10.0,xmax=10.0)
693 
694  if (not zdcMonAlg.IsOnline): #only offline
695  zdcSideMonToolArr.defineHistogram('lumiBlock, zdcAvgTime;zdcAvgTime_vs_lb', type='TH2F', title=';ZDC Side Average Time versus Lumi block;lumi block;t[ns]',
696  path = '/EXPERT/ZDC/PerArm/AvgTime',
697  xbins=lumi_block_max,xmin=0.0,xmax=lumi_block_max,
698  ybins=n_time_centroid_bins_default,ymin=-10.0,ymax=10.0)
699 
700  # ---------------------------- RPD (centroid-related) per-arm variables ----------------------------
701  # ---------------------------- centroid status ----------------------------
702  zdcSideMonToolArr.defineHistogram('centroidStatusBits',title=';;Events',
703  path='/EXPERT/RPD/PerArm/Centroid',
704  xbins=nRpdCentroidStatusBits,xmin=0.0,xmax=nRpdCentroidStatusBits,
705  opt='kVec',
706  xlabels=['ValidBit', 'HasCentroidBit', 'ZDCInvalidBit', 'InsufficientZDCEnergyBit', 'ExcessiveZDCEnergyBit', 'EMInvalidBit', 'InsufficientEMEnergyBit', 'ExcessiveEMEnergyBit', 'RPDInvalidBit', 'PileupBit', 'ExcessivePileupBit', 'ZeroSumBit', 'ExcessiveSubtrUnderflowBit', 'Row0ValidBit', 'Row1ValidBit', 'Row2ValidBit', 'Row3ValidBit', 'Col0ValidBit', 'Col1ValidBit', 'Col2ValidBit', 'Col3ValidBit'])
707 
708  zdcSideMonToolArr.defineHistogram('centroidValidBitFloat;centroidValidBit_RequireMinZDCEnergy',title='Centroid valid bit;;Events',
709  path='/SHIFT/RPD/PerArm/Centroid',
710  opt='kAlwaysCreate', # always create for shift-needed histograms
711  cutmask='passMinZDCEnergyCutForCentroidValidEvaluation',
712  xbins=2,xmin=0,xmax=2,
713  xlabels=['Valid','Invalid'])
714 
715  # ---------------------------- x, y centroid & reaction plane angle requiring centroid ValidBit ----------------------------
716  zdcSideMonToolArr.defineHistogram('xCentroid',title=';Centroid x position [mm];Events',
717  path='/SHIFT/RPD/PerArm/Centroid',
718  opt='kAlwaysCreate', # always create for shift-needed histograms
719  cutmask='centroidValid',
720  xbins=n_time_centroid_bins_default,xmin=x_centroid_min,xmax=x_centroid_max)
721 
722  zdcSideMonToolArr.defineHistogram('yCentroid',title=';Centroid y position [mm];Events',
723  path='/SHIFT/RPD/PerArm/Centroid',
724  opt='kAlwaysCreate', # always create for shift-needed histograms
725  cutmask='centroidValid',
726  xbins=n_time_centroid_bins_default*2,xmin=y_centroid_min,xmax=y_centroid_max)
727 
728  zdcSideMonToolArr.defineHistogram('xCentroid, yCentroid',type='TH2F',title=';Centroid x position [mm];Centroid y position [mm]',
729  path='/EXPERT/RPD/PerArm/Centroid',
730  cutmask='centroidValid',
731  xbins=n_time_centroid_bins_default,xmin=x_centroid_min,xmax=x_centroid_max,
732  ybins=n_time_centroid_bins_default*2,ymin=y_centroid_min,ymax=y_centroid_max)
733 
734  zdcSideMonToolArr.defineHistogram('ReactionPlaneAngle',title=';Reaction Plane Angle;Events',
735  path='/EXPERT/RPD/PerArm/ReactionPlane',
736  cutmask='centroidValid',
737  xbins=64,xmin=-3.141593,xmax=3.141593)
738 
739  # ---------------------------- x, y centroid & reaction plane angle requiring only HasCentroidBit ----------------------------
740 
741  if (not zdcMonAlg.IsOnline): #only offline
742  zdcSideMonToolArr.defineHistogram('xCentroid, yCentroid;yCentroid_vs_xCentroid_requireOnlyHasCentroidBit',type='TH2F',title=';Centroid x position [mm];Centroid y position [mm]',
743  path='/EXPERT/RPD/PerArm/Centroid',
744  xbins=n_time_centroid_bins_default,xmin=x_centroid_min,xmax=x_centroid_max,
745  ybins=n_time_centroid_bins_default,ymin=y_centroid_min,ymax=y_centroid_max)
746  zdcSideMonToolArr.defineHistogram('ReactionPlaneAngle;ReactionPlaneAngle_requireOnlyHasCentroidBit',title=';Reaction Plane Angle;Events',
747  path='/EXPERT/RPD/PerArm/ReactionPlane',
748  xbins=64,xmin=-3.141593,xmax=3.141593)
749 
750 
751  # ---------------------------- Centroid LB dependence ----------------------------
752  if (not zdcMonAlg.IsOnline): #only offline
753  zdcSideMonToolArr.defineHistogram('lumiBlock, xCentroid;xCentroid_vs_lb_requireOnlyHasCentroidBit', type='TH2F', title=';lumi block;Centroid x position [mm]',
754  path='/EXPERT/RPD/PerArm/CentroidLBdep',
755  xbins=lumi_block_max,xmin=0.0,xmax=lumi_block_max,
756  ybins=n_time_centroid_bins_default,ymin=x_centroid_min,ymax=x_centroid_max)
757  zdcSideMonToolArr.defineHistogram('lumiBlock, yCentroid;yCentroid_vs_lb_requireOnlyHasCentroidBit', type='TH2F', title=';lumi block;Centroid y position [mm]',
758  path='/EXPERT/RPD/PerArm/CentroidLBdep',
759  xbins=lumi_block_max,xmin=0.0,xmax=lumi_block_max,
760  ybins=n_time_centroid_bins_default,ymin=y_centroid_min,ymax=y_centroid_max)
761 
762  zdcSideMonToolArr.defineHistogram('lumiBlock, xCentroid;xCentroid_vs_lb', type='TH2F', title=';lumi block;Centroid x position [mm]',
763  path='/EXPERT/RPD/PerArm/CentroidLBdep',
764  cutmask='centroidValid',
765  xbins=lumi_block_max,xmin=0.0,xmax=lumi_block_max,
766  ybins=n_time_centroid_bins_default,ymin=x_centroid_min,ymax=x_centroid_max)
767  zdcSideMonToolArr.defineHistogram('lumiBlock, yCentroid;yCentroid_vs_lb', type='TH2F', title=';lumi block;Centroid y position [mm]',
768  path='/EXPERT/RPD/PerArm/CentroidLBdep',
769  cutmask='centroidValid',
770  xbins=lumi_block_max,xmin=0.0,xmax=lumi_block_max,
771  ybins=n_time_centroid_bins_default,ymin=y_centroid_min,ymax=y_centroid_max)
772 
773  # ---------------------------- ZDC-RPD correlations ----------------------------
774  zdcSideMonToolArr.defineHistogram('zdcEnergySum, rpdMaxADCSum', type='TH2F', title=';E ZDC side [TeV];RPD Max ADC Sum (AorC) [ADC counts]',
775  path='/EXPERT/ZdcRpdPerSideCorr',
776  cutmask='RPDSideValid',
777  xbins=n_energy_bins_default,xmin=0.0,xmax=energy_sum_xmax,
778  ybins=n_energy_bins_default,ymin=0.0,ymax=rpd_max_adc_sum_xmax) # try a value for now
779  zdcSideMonToolArr.defineHistogram('zdcEnergySum, rpdAmplitudeCalibSum', type='TH2F', title=';E ZDC side [GeV];RPD Calib Amp Sum (AorC) [ADC counts]',
780  path='/EXPERT/ZdcRpdPerSideCorr',
781  cutmask='RPDSideValid',
782  xbins=n_energy_bins_default,xmin=0.0,xmax=energy_sum_xmax,
783  ybins=n_energy_bins_default,ymin=0.0,ymax=rpd_amp_sum_xmax) # try a value for now
784  zdcSideMonToolArr.defineHistogram('zdcEMModuleEnergy, rpdAmplitudeCalibSum', type='TH2F', title=';E EM module AorC [GeV];RPD Calib Amp Sum (AorC) [ADC counts]',
785  path='/EXPERT/ZdcRpdPerSideCorr',
786  cutmask='RPDSideValid',
787  xbins=n_energy_bins_default,xmin=0.0,xmax=module_calib_amp_xmax / 2., # divide by 2 to make a more zoomed-in plot (not full range)
788  ybins=n_energy_bins_default,ymin=0.0,ymax=rpd_amp_sum_xmax) # try a value for now
789 
790 # --------------------------------------------------------------------------------------------------
791 # ------------------------------------- ZDC-module observables -------------------------------------
792 # --------------------------------------------------------------------------------------------------
793 
794 
795  zdcModuleMonToolArr = helper.addArray([sides,modules],zdcMonAlg,'ZdcModuleMonitor', topPath = 'ZDC')
796 
797  # ---------------------------- ZDC-module status ----------------------------
798 
799  zdcModuleMonToolArr.defineHistogram('zdcStatusBits',title=';;Events',
800  path='/SHIFT/ZDC/ZdcModule/ModuleStatusBits',
801  opt='kAlwaysCreate kVec', # always create for shift-needed histograms
802  xbins=nZdcStatusBits,xmin=0.0,xmax=nZdcStatusBits,
803  xlabels=['PulseBit', 'LowGainBit', 'FailBit', 'HGOverflowBit', 'HGUnderflowBit', 'PSHGOverUnderflowBit', 'LGOverflowBit', 'LGUnderflowBit', 'PrePulseBit', 'PostPulseBit', 'FitFailedBit', 'BadChisqBit', 'BadT0Bit', 'ExcludeEarlyLGBit', 'ExcludeLateLGBit', 'preExpTailBit', 'FitMinAmpBit', 'RepassPulseBit'])
804 
805  # ---------------------------- ZDC-module amplitudes & amplitude fractions ----------------------------
806 
807  zdcModuleMonToolArr.defineHistogram('zdcModuleAmp',title=';Module Amplitude [ADC Counts];Events',
808  path='/SHIFT/ZDC/ZdcModule/ModuleAmp',
809  opt='kAlwaysCreate', # always create for shift-needed histograms
810  xbins=n_fpga_bins * 2,xmin=0.0,xmax=module_amp_xmax)
811 
812  zdcModuleMonToolArr.defineHistogram('zdcModuleMaxADC',title=';Module Max ADC;Events',
813  path='/EXPERT/ZDC/ZdcModule/ModuleMaxADC',
814  xbins=n_fpga_bins,xmin=0.0,xmax=module_amp_xmax)
815 
816 
817  if (not zdcMonAlg.IsPPMode): # for PP mode data, LG never filled
818  zdcModuleMonToolArr.defineHistogram('zdcModuleAmp;zdcModuleAmp_HG',title=';Module Amplitude HG [ADC Counts];Events',
819  path='/EXPERT/ZDC/ZdcModule/ModuleAmp',
820  cutmask='zdcModuleHG',
821  xbins=n_fpga_bins,xmin=0.0,xmax=module_FPGA_max_ADC)
822 
823  zdcModuleMonToolArr.defineHistogram('zdcModuleAmp;zdcModuleAmp_LG',title=';Module Amplitude LG [ADC Counts];Events',
824  path='/EXPERT/ZDC/ZdcModule/ModuleAmp',
825  cutmask='zdcModuleLG', # require to use LG
826  xbins=n_fpga_bins,xmin=0.0,xmax=module_amp_xmax)
827 
828  if (zdcMonAlg.IsInjectedPulse):
829  zdcModuleMonToolArr.defineHistogram('zdcModuleAmpLGRefit',title=';LG-Refit Amplitude [ADC Counts];Events',
830  path='/EXPERT/ZDC/ZdcModule/ModuleAmp',
831  cutmask='zdcModuleHG',
832  xbins=n_fpga_bins,xmin=0.0,xmax=amp_LG_refit_max_ADC)
833 
834  if (not zdcMonAlg.IsOnline and not zdcMonAlg.IsInjectedPulse): # only offline
835  zdcModuleMonToolArr.defineHistogram('zdcModuleAmp;zdcModuleAmp_halfrange',title=';Module Amplitude [ADC Counts];Events',
836  path='/EXPERT/ZDC/ZdcModule/ModuleAmp',
837  xbins=n_fpga_bins,xmin=0.0,xmax=module_amp_xmax / 2.)
838 
839 
840  # ---------------------------- ZDC-module amplitude to max ADC ratio (debug purpose) ----------------------------
841  if (not zdcMonAlg.IsOnline): # 2D (memory consuming): offline only for calib stream
842  zdcModuleMonToolArr.defineHistogram('zdcModuleAmp,zdcModuleAmpToMaxADCRatio;zdcModuleAmpToMaxADCRatio_vs_zdcModuleMaxADC_HG',type='TH2F',title=';Module Max ADC HG [ADC];Avg Amp/Max ADC',
843  path='/EXPERT/ZDC/ZdcModule/ModuleAmpToMaxADCRatio',
844  cutmask='zdcModuleHG',
845  xbins=n_fpga_bins,xmin=0.0,xmax=module_FPGA_max_ADC,
846  ybins=100,ymin=0.0,ymax=2.)
847 
848  zdcModuleMonToolArr.defineHistogram('zdcModuleAmp,zdcModuleAmpToMaxADCRatio;zdcModuleAmpToMaxADCRatio_vs_zdcModuleMaxADC_LG',type='TH2F',title=';Module Max ADC LG [ADC];Avg Amp/Max ADC',
849  path='/EXPERT/ZDC/ZdcModule/ModuleAmpToMaxADCRatio',
850  cutmask='zdcModuleLG',
851  xbins=n_fpga_bins,xmin=0.0,xmax=module_amp_xmax, #max ADC has no LG gain factor
852  ybins=100,ymin=0.0,ymax=2.)
853 
854  # ---------------------------- ZDC-module amplitude fractions & correlations with energy deposits ----------------------------
855 
856  if (zdcMonAlg.IsInjectedPulse): # no real energy deposit --> do not require minimum ZDC energy
857  zdcModuleMonToolArr.defineHistogram('zdcModuleFract',title=';Module Amplitude Fraction;Events',
858  path='/SHIFT/ZDC/ZdcModule/ModuleFraction',
859  opt='kAlwaysCreate', # always create for shift-needed histograms
860  xbins=n_mod_fraction_bins_default,xmin=0.0,xmax=1.)
861  else:
862  zdcModuleMonToolArr.defineHistogram('zdcModuleFract;zdcModuleFract_above_cut',title=';Module Amplitude Fraction;Events',
863  path='/SHIFT/ZDC/ZdcModule/ModuleFraction',
864  opt='kAlwaysCreate', # always create for shift-needed histograms
865  cutmask='zdcEnergyAboveModuleFractCut',
866  xbins=n_mod_fraction_bins_default,xmin=0.0,xmax=1.)
867  zdcModuleMonToolArr.defineHistogram('zdcEnergySumCurrentSide, zdcModuleFract;zdcModuleFract_vs_zdcEnergySum_fullrange', type='TH2F', title=';ZDC Energy Sum Current Side [GeV];Module Amplitude Fraction',
868  path='/EXPERT/ZDC/ZdcModule/ModuleFractionVsEnergy',
869  xbins=n_energy_bins_default,xmin=0.0,xmax=energy_sum_xmax,
870  ybins=n_mod_fraction_bins_default,ymin=0.0,ymax=1.)
871  zdcModuleMonToolArr.defineHistogram('zdcEnergySumCurrentSide, zdcModuleFract;zdcModuleFract_vs_zdcEnergySum_profile', type='TProfile', title=';ZDC Energy Sum Current Side [GeV];Module Amplitude Fraction',
872  path='/EXPERT/ZDC/ZdcModule/ModuleFractionVsEnergy',
873  cutmask='zdcModuleFractionValid',
874  xbins=n_energy_bins_default,xmin=0.0,xmax=energy_sum_xmax)
875  zdcModuleMonToolArr.defineHistogram('zdcEnergySumCurrentSide, zdcModuleFract;zdcModuleFract_vs_zdcEnergySum_zoomedin', type='TH2F', title=';Amplitude Sum Current Side [ADC Counts];Module Amplitude Fraction',
876  path='/EXPERT/ZDC/ZdcModule/ModuleFractionVsEnergy',
877  xbins=n_energy_bins_default,xmin=0.0,xmax=10000,
878  ybins=n_mod_fraction_bins_default,ymin=0.0,ymax=1.)
879  if (not zdcMonAlg.IsOnline): # only offline
880  zdcModuleMonToolArr.defineHistogram('zdcModuleFract',title=';Module Amplitude Fraction;Events',
881  path='/EXPERT/ZDC/ZdcModule/ModuleFraction',
882  xbins=n_mod_fraction_bins_default,xmin=0.0,xmax=1.)
883  zdcModuleMonToolArr.defineHistogram('zdcModuleFract;zdcModuleFract_above20N',title=';Module Amplitude Fraction;Events',
884  path='/EXPERT/ZDC/ZdcModule/ModuleFraction',
885  cutmask='zdcAbove20NCurrentSide',
886  xbins=n_mod_fraction_bins_default,xmin=0.0,xmax=1.)
887 
888  if (not zdcMonAlg.IsInjectedPulse):
889  zdcModuleMonToolArr.defineHistogram('zdcModuleCalibAmp',title=';Module Calibrated Amplitude [GeV];Events',
890  path='/EXPERT/ZDC/ZdcModule/ModuleCalibAmp',
891  xbins=2*n_energy_bins_default,xmin=0.0,xmax=module_calib_amp_xmax) # 2.5TeV * 40
892 
893  if (not zdcMonAlg.IsOnline and not zdcMonAlg.IsInjectedPulse):
894  zdcModuleMonToolArr.defineHistogram('zdcModuleCalibAmp;zdcModuleCalibAmp_halfrange',title=';Module Calibrated Amplitude [GeV];Events',
895  path='/EXPERT/ZDC/ZdcModule/ModuleCalibAmp',
896  xbins=2*n_energy_bins_default,xmin=0.0,xmax=module_calib_amp_xmax / 2.) # 2.5TeV * 40
897 
898  # ---------------------------- ZDC-module reco amplitude versus input voltage ----------------------------
899  if (zdcMonAlg.IsInjectedPulse):
900  # ---------------------------- HG response ----------------------------
901  zdcModuleMonToolArr.defineHistogram('injectedPulseInputVoltage,zdcModuleFitAmp;zdcModuleAmpHG_vs_injectedPulseInputVoltage', type='TH2F', title=';Pulse amp [V];Signal Fit Amp [ADC Counts]',
902  cutmask='zdcHGInjPulseValid',
903  path='/EXPERT/ZDC/ZdcModule/ModuleAmpHGVsInputVoltage',
904  xbins=create_vinj_bins(),
906 
907  if (zdcMonAlg.IsOnline): # also plot profile online in case 2D-hist scale is wrong by a large factor (e.g, due to attenuator setting)
908  zdcModuleMonToolArr.defineHistogram('injectedPulseInputVoltage,zdcModuleFitAmp;zdcModuleAmpHG_vs_injectedPulseInputVoltage_profile', type='TProfile', title=';Pulse amp [V];Signal Fit Amp [ADC Counts]',
909  cutmask='zdcHGInjPulseValid',
910  path='/EXPERT/ZDC/ZdcModule/ModuleAmpHGVsInputVoltage',
911  xbins=create_vinj_bins())
912  else: # ---------------------------- HG response max ADC (offline only) ----------------------------
913  zdcModuleMonToolArr.defineHistogram('injectedPulseInputVoltage,zdcModuleMaxADCHG', type='TH2F', title=';Pulse amp [V];Max ADC HG',
914  cutmask='zdcHGInjPulseValid',
915  path='/EXPERT/ZDC/ZdcModule/ModuleMaxADCHGVsInputVoltage',
916  xbins=create_vinj_bins(),
918 
919  # ---------------------------- LG response ----------------------------
920  zdcModuleMonToolArr.defineHistogram('injectedPulseInputVoltage,zdcModuleLGFitAmp;zdcModuleAmpLG_vs_injectedPulseInputVoltage', type='TH2F', title=';Pulse amp [V];Signal Fit Amp [ADC Counts]',
921  cutmask='zdcLGInjPulseValid',
922  path='/EXPERT/ZDC/ZdcModule/ModuleAmpLGVsInputVoltage',
923  xbins=create_vinj_bins(),
925 
926  if (zdcMonAlg.IsOnline): # also plot profile online in case 2D-hist scale is wrong by a large factor (e.g, due to attenuator setting)
927  zdcModuleMonToolArr.defineHistogram('injectedPulseInputVoltage,zdcModuleLGFitAmp;zdcModuleAmpLG_vs_injectedPulseInputVoltage_profile', type='TProfile', title=';Pulse amp [V];Signal Fit Amp [ADC Counts]',
928  cutmask='zdcLGInjPulseValid',
929  path='/EXPERT/ZDC/ZdcModule/ModuleAmpLGVsInputVoltage',
930  xbins=create_vinj_bins())
931  else: # ---------------------------- LG response max ADC (offline only) ----------------------------
932  zdcModuleMonToolArr.defineHistogram('injectedPulseInputVoltage,zdcModuleMaxADCLG;zdcModuleMaxADCLG_vs_injectedPulseInputVoltage', type='TH2F', title=';Pulse amp [V];Max ADC LG',
933  cutmask='zdcLGInjPulseValid',
934  path='/EXPERT/ZDC/ZdcModule/ModuleMaxADCLGVsInputVoltage',
935  xbins=create_vinj_bins(),
936  ybins=create_hg_fit_amp_inj_bins()) # maxADC has no LG gain factor multiplied
937 
938  # ---------------------------- HG & LG response binned by the voltage strings ----------------------------
939  if (not zdcMonAlg.IsOnline):
940  zdcModuleMonToolArr.defineHistogram('VoltageIndex, zdcModuleFitAmp', type='TH2F', title=';;Signal Fit Amp [ADC Counts]',
941  path='/EXPERT/ZDC/ZdcModule/ModuleAmpHGVsInputVoltageStr',
942  cutmask='zdcHGInjPulseValid',
943  xbins=len(voltage_strs_list),xmin=0.0,xmax=len(voltage_strs_list),
945  xlabels=voltage_strs_list)
946 
947  zdcModuleMonToolArr.defineHistogram('VoltageIndex, zdcModuleLGFitAmp', type='TH2F', title=';;Signal Fit Amp [ADC Counts]',
948  path='/EXPERT/ZDC/ZdcModule/ModuleAmpLGVsInputVoltageStr',
949  cutmask='zdcLGInjPulseValid',
950  xbins=len(voltage_strs_list),xmin=0.0,xmax=len(voltage_strs_list),
952  xlabels=voltage_strs_list)
953 
954  # ---------------------------- HG & LG response 1D histograms ----------------------------
955  # ---------------------------- only offline ----------------------------
956 
957  if (not zdcMonAlg.IsOnline):
958  zdcModuleSingleVoltageResponseArr = helper.addArray([sides,modules,voltage_strs_list],zdcMonAlg,'LucrodResponseSingleVoltageMonitor', topPath = 'ZDC/EXPERT/ZDC/ZdcModule/LucrodResponseSingleVoltage')
959  zdcModuleSingleVoltageResponseArr.defineHistogram('zdcModuleFitAmp;zdcModuleAmpHG_fixed_vInj', type='TH1F', title=';Signal Fit Amp [ADC Counts];Events',
960  cutmask='zdcHGInjPulseValid',
962 
963  zdcModuleSingleVoltageResponseArr.defineHistogram('zdcModuleLGFitAmp;zdcModuleAmpLG_fixed_vInj', type='TH1F', title=';Signal Fit Amp [ADC Counts];Events',
964  cutmask='zdcLGInjPulseValid',
966 
967  # ---------------------------- ZDC-module times ----------------------------
968 
969  zdcModuleMonToolArr.defineHistogram('zdcModuleTime',title=';Module Time [ns];Events',
970  path='/SHIFT/ZDC/ZdcModule/ModuleTime',
971  opt='kAlwaysCreate', # always create for shift-needed histograms
972  xbins=n_time_centroid_bins_default,xmin=-10.0,xmax=10.0)
973 
974  if (not zdcMonAlg.IsPPMode): # for PP mode, LG never filled
975  zdcModuleMonToolArr.defineHistogram('zdcModuleTime;zdcModuleTime_LG',title=';Module Time [ns];Events',
976  path='/SHIFT/ZDC/ZdcModule/ModuleTime',
977  opt='kAlwaysCreate', # always create for shift-needed histograms
978  cutmask='zdcModuleLG',
979  xbins=n_time_centroid_bins_default,xmin=-10.0,xmax=10.0)
980 
981  zdcModuleMonToolArr.defineHistogram('zdcModuleTime;zdcModuleTime_HG',title=';Module Time [ns];Events',
982  path='/SHIFT/ZDC/ZdcModule/ModuleTime',
983  opt='kAlwaysCreate', # always create for shift-needed histograms
984  cutmask='zdcModuleHG',
985  xbins=n_time_centroid_bins_default,xmin=-10.0,xmax=10.0)
986 
987  zdcModuleMonToolArr.defineHistogram('zdcModuleFitT0',title=';Module FitT0 [ns];Events',
988  path='/EXPERT/ZDC/ZdcModule/ModuleFitT0',
989  xbins=200,xmin=0.0,xmax=time_in_data_buffer)
990 
991  if (not zdcMonAlg.IsPPMode): # for PP mode, LG never filled
992  zdcModuleMonToolArr.defineHistogram('zdcModuleFitT0;zdcModuleFitT0_LG',title=';Module FitT0 LG [ns];Events',
993  path='/EXPERT/ZDC/ZdcModule/ModuleFitT0',
994  cutmask='zdcModuleLG',
995  xbins=n_time_centroid_bins_default,xmin=0.0,xmax=time_in_data_buffer)
996 
997  zdcModuleMonToolArr.defineHistogram('zdcModuleFitT0;zdcModuleFitT0_HG',title=';Module FitT0 HG [ns];Events',
998  path='/EXPERT/ZDC/ZdcModule/ModuleFitT0',
999  cutmask='zdcModuleHG',
1000  xbins=n_time_centroid_bins_default,xmin=0.0,xmax=time_in_data_buffer)
1001 
1002 
1003  if (not zdcMonAlg.IsOnline and not zdcMonAlg.IsInjectedPulse):
1004  zdcModuleMonToolArr.defineHistogram('zdcModuleCalibTime',title=';Module Calibrated Time [ns];Events',
1005  path='/EXPERT/ZDC/ZdcModule/ModuleCalibTime',
1006  xbins=n_time_centroid_bins_default,xmin=-10.0,xmax=10.0)
1007 
1008  # ---------------------------- ZDC-module pulse-fitting chi squares (pulse fitting goodness) ----------------------------
1009 
1010  zdcModuleMonToolArr.defineHistogram('zdcModuleChisq',title=';Module Chi-square;Events',
1011  path='/EXPERT/ZDC/ZdcModule/ModuleChisq',
1012  weight='zdcModuleChisqEventWeight',
1013  xbins=create_log_bins(module_chisq_min, module_chisq_max, module_chisq_nbins))
1014  zdcModuleMonToolArr.defineHistogram('zdcModuleChisqOverAmp',title=';Module Chi-square / Amplitude;Events',
1015  path='/SHIFT/ZDC/ZdcModule/ModuleChisq',
1016  opt='kAlwaysCreate', # always create for shift-needed histograms
1017  weight='zdcModuleChisqOverAmpEventWeight',
1018  xbins=create_log_bins(module_chisq_over_amp_min, module_chisq_over_amp_max, module_chisq_over_amp_nbins))
1019  zdcModuleMonToolArr.defineHistogram('zdcModuleChisqOverAmp;zdcModuleChisqOverAmp_linear',title=';Module Chi-square / Amplitude;Events',
1020  path='/SHIFT/ZDC/ZdcModule/ModuleChisq',
1021  opt='kAlwaysCreate', # always create for shift-needed histograms
1022  xbins=module_chisq_over_amp_linear_nbins,xmin=0.,xmax=module_chisq_over_amp_linear_max)
1023 
1024  if (not zdcMonAlg.IsOnline):
1025  zdcModuleMonToolArr.defineHistogram('zdcModuleAmp, zdcModuleChisqOverAmp',type='TH2F',title=';Module Amplitude [ADC Counts];Module Chi-square / Amplitude',
1026  path='/EXPERT/ZDC/ZdcModule/ModuleChisq',
1027  weight='zdcModuleChisqOverAmpEventWeight',
1028  xbins=n_energy_bins_default,xmin=0.0,xmax=module_amp_xmax / 2.,
1029  ybins=create_log_bins(module_chisq_over_amp_min, module_chisq_over_amp_max, module_chisq_over_amp_nbins))
1030 
1031 
1032  # ---------------------------- LG & HG comparisons ----------------------------
1033  zdcModuleMonToolArr.defineHistogram('zdcModuleHGtoLGAmpRatio',title=';HG-to-LG Amplitude Raio;Events',
1034  path='/SHIFT/ZDC/ZdcModule/ModuleHGLGCompr',
1035  opt='kAlwaysCreate', # always create for shift-needed histograms
1036  cutmask='zdcModuleHG',
1037  xbins=n_HG_LG_amp_ratio_bins,xmin=hg_lg_amp_ratio_min_nominal,xmax=hg_lg_amp_ratio_max_nominal)
1038 
1039  if (not zdcMonAlg.IsInjectedPulse):
1040  zdcModuleMonToolArr.defineHistogram('zdcModuleHGtoLGAmpRatioNoNonlinCorr',title=';HG-to-LG Amplitude Raio;Events',
1041  path='/SHIFT/ZDC/ZdcModule/ModuleHGLGComprNoNonlinCorr',
1042  opt='kAlwaysCreate', # always create for shift-needed histograms
1043  cutmask='zdcModuleHG',
1044  xbins=n_HG_LG_amp_ratio_bins,xmin=hg_lg_amp_ratio_min_nominal,xmax=hg_lg_amp_ratio_max_nominal)
1045 
1046  zdcModuleMonToolArr.defineHistogram('zdcModuleAmp, zdcModuleHGtoLGAmpRatio', type='TH2F', title=';ZDC HG Amplitude [ADC Counts];HG-to-LG Amplitude Raio;Events',
1047  path='/EXPERT/ZDC/ZdcModule/ModuleHGLGCompr',
1048  cutmask='zdcModuleHG',
1049  xbins=n_module_amp_fine_bins, xmin=0.0, xmax=module_FPGA_max_ADC,
1050  ybins=n_HG_LG_amp_ratio_bins,ymin=hg_lg_amp_ratio_min_nominal,ymax=hg_lg_amp_ratio_max_nominal)
1051 
1052  if (not zdcMonAlg.IsInjectedPulse):
1053  zdcModuleMonToolArr.defineHistogram('zdcModuleAmp, zdcModuleHGtoLGAmpRatioNoNonlinCorr', type='TH2F', title=';ZDC HG Amplitude [ADC Counts];HG-to-LG Amplitude Raio;Events',
1054  path='/EXPERT/ZDC/ZdcModule/ModuleHGLGComprNoNonlinCorr',
1055  cutmask='zdcModuleHG',
1056  xbins=n_module_amp_fine_bins, xmin=0.0, xmax=module_FPGA_max_ADC,
1057  ybins=n_HG_LG_amp_ratio_bins,ymin=hg_lg_amp_ratio_min_nominal,ymax=hg_lg_amp_ratio_max_nominal)
1058 
1059  zdcModuleMonToolArr.defineHistogram('zdcModuleAmp, zdcModuleHGtoLGAmpRatio;zdcModuleHGtoLGAmpRatio_vs_zdcModuleAmp_profile', type='TProfile', title=';ZDC HG Amplitude [ADC Counts];Average HG-to-LG Amplitude Raio;Events',
1060  path='/EXPERT/ZDC/ZdcModule/ModuleHGLGCompr',
1061  cutmask='zdcModuleHG',
1062  xbins=n_module_amp_fine_bins, xmin=0.0, xmax=module_FPGA_max_ADC)
1063 
1064  if (not zdcMonAlg.IsOnline):
1065  zdcModuleMonToolArr.defineHistogram('zdcModuleAmpLGRefit, zdcModuleHGtoLGAmpRatio', type='TH2F', title=';ZDC LG-Refit Amplitude [ADC Counts];HG-to-LG Amplitude Raio;Events',
1066  path='/EXPERT/ZDC/ZdcModule/ModuleHGLGCompr',
1067  cutmask='zdcModuleHG',
1068  xbins=n_module_amp_fine_bins, xmin=0.0, xmax=amp_LG_refit_max_ADC,
1069  ybins=n_HG_LG_amp_ratio_bins,ymin=hg_lg_amp_ratio_min_nominal,ymax=hg_lg_amp_ratio_max_nominal)
1070  zdcModuleMonToolArr.defineHistogram('zdcModuleAmpLGRefit, zdcModuleHGtoLGAmpRatio;zdcModuleHGtoLGAmpRatio_vs_zdcModuleAmpLGRefit_profile', type='TProfile', title=';ZDC LG-Refit Amplitude [ADC Counts];Average HG-to-LG Amplitude Raio;Events',
1071  path='/EXPERT/ZDC/ZdcModule/ModuleHGLGCompr',
1072  cutmask='zdcModuleHG',
1073  xbins=n_module_amp_fine_bins, xmin=0.0, xmax=amp_LG_refit_max_ADC)
1074 
1075  zdcModuleMonToolArr.defineHistogram('zdcModuleHGtoLGT0Diff',title=';HG-LG T0 Difference [ns];Events',
1076  path='/EXPERT/ZDC/ZdcModule/ModuleHGLGCompr',
1077  cutmask='zdcModuleHG',
1078  xbins=n_HG_LG_time_diff_bins,xmin=-10.0,xmax=10.0)
1079 
1080  zdcModuleMonToolArr.defineHistogram('zdcModuleHGtoLGT0Diff, zdcModuleHGtoLGAmpRatio', type='TH2F', title=';HG-LG T0 Difference [ns];HG-to-LG Amplitude Raio;Events',
1081  path='/EXPERT/ZDC/ZdcModule/ModuleHGLGCompr',
1082  cutmask='zdcModuleHG',
1083  xbins=n_HG_LG_time_diff_bins,xmin=2.0,xmax=4.0, # zoomed in to see potential correlations
1084  ybins=n_HG_LG_amp_ratio_bins,ymin=hg_lg_amp_ratio_min_tight,ymax=hg_lg_amp_ratio_max_tight)
1085 
1086 
1087  # ---------------------------- LB and BCID-dep ZDC-module-level observables ----------------------------
1088  # ---------------------------- ZDC-module amplitudes ----------------------------
1089 
1090  if (not zdcMonAlg.IsInjectedPulse):
1091  zdcModuleMonToolArr.defineHistogram('lumiBlock, zdcModuleCalibAmp;zdcModuleCalibAmp_vs_lb', type='TH2F', title=';lumi block;Module Calib Amplitude',
1092  path='/EXPERT/ZDC/ZdcModule/ModuleCalibAmpLBdep',
1093  xbins=lumi_block_max,xmin=0.0,xmax=lumi_block_max,
1094  ybins=n_module_amp_coarse_bins, ymin=0.0, ymax=module_calib_amp_1Nmonitor_xmax)
1095  if (not zdcMonAlg.IsOnline):
1096  zdcModuleMonToolArr.defineHistogram('lumiBlock, zdcModuleAmp;zdcModuleAmp_vs_lb', type='TH2F', title=';lumi block;Module Amplitude [ADC counts]',
1097  path='/EXPERT/ZDC/ZdcModule/ModuleAmpLBdep',
1098  xbins=lumi_block_max,xmin=0.0,xmax=lumi_block_max,
1099  ybins=n_module_amp_coarse_bins, ymin=0.0, ymax=module_amp_1Nmonitor_xmax)
1100  zdcModuleMonToolArr.defineHistogram('lumiBlock, zdcModuleFract;zdcModuleFract_above20N_vs_lb', type='TH2F',title=';lumi block;Module Amplitude Fraction',
1101  path='/EXPERT/ZDC/ZdcModule/ModuleFractionLBdep',
1102  cutmask='zdcAbove20NCurrentSide',
1103  xbins=lumi_block_max,xmin=0.0,xmax=lumi_block_max,
1104  ybins=n_mod_fraction_bins_default,ymin=0.0,ymax=1.)
1105 
1106  if (not zdcMonAlg.IsOnline and not zdcMonAlg.IsInjectedPulse):
1107  zdcModuleMonToolArr.defineHistogram('bcid, zdcModuleCalibAmp', type='TH2F', title=';BCID;Module Calib Amplitude',
1108  path='/EXPERT/ZDC/ZdcModule/ModuleCalibAmpBCIDdep',
1109  xbins=bcid_max,xmin=0.0,xmax=bcid_max,
1110  ybins=n_module_amp_coarse_bins, ymin=0.0, ymax=module_calib_amp_1Nmonitor_xmax)
1111 
1112  # ---------------------------- ZDC-module times ----------------------------
1113  if (not zdcMonAlg.IsOnline): #offline - fine binnings
1114  zdcModuleMonToolArr.defineHistogram('lumiBlock, zdcModuleTime;zdcModuleTime_vs_lb', type='TH2F', title=';lumi block;Module Time [ns]',
1115  path='/EXPERT/ZDC/ZdcModule/ModuleTimeLBdep',
1116  xbins=lumi_block_max,xmin=0.0,xmax=lumi_block_max,
1117  ybins=n_time_centroid_bins_default, ymin=-10.0, ymax=10.0)
1118  zdcModuleMonToolArr.defineHistogram('lumiBlock, zdcModuleTime;zdcModuleTime_LG_vs_lb', type='TH2F', title=';lumi block;Module Time [ns]',
1119  path='/EXPERT/ZDC/ZdcModule/ModuleTimeLBdep',
1120  cutmask='zdcModuleLG',
1121  xbins=lumi_block_max,xmin=0.0,xmax=lumi_block_max,
1122  ybins=n_time_centroid_bins_default, ymin=-10.0, ymax=10.0)
1123  zdcModuleMonToolArr.defineHistogram('lumiBlock, zdcModuleTime;zdcModuleTime_HG_vs_lb', type='TH2F', title=';lumi block;Module Time [ns]',
1124  path='/EXPERT/ZDC/ZdcModule/ModuleTimeLBdep',
1125  cutmask='zdcModuleHG',
1126  xbins=lumi_block_max,xmin=0.0,xmax=lumi_block_max,
1127  ybins=n_time_centroid_bins_default, ymin=-10.0, ymax=10.0)
1128  zdcModuleMonToolArr.defineHistogram('lumiBlock, zdcModuleCalibTime;zdcModuleCalibTime_LG_vs_lb', type='TH2F', title=';lumi block;Module Time [ns]',
1129  path='/EXPERT/ZDC/ZdcModule/ModuleTimeLBdep',
1130  cutmask='zdcModuleLG',
1131  xbins=lumi_block_max,xmin=0.0,xmax=lumi_block_max,
1132  ybins=n_time_centroid_bins_default, ymin=-10.0, ymax=10.0)
1133  zdcModuleMonToolArr.defineHistogram('lumiBlock, zdcModuleCalibTime;zdcModuleCalibTime_HG_vs_lb', type='TH2F', title=';lumi block;Module Time [ns]',
1134  path='/EXPERT/ZDC/ZdcModule/ModuleTimeLBdep',
1135  cutmask='zdcModuleHG',
1136  xbins=lumi_block_max,xmin=0.0,xmax=lumi_block_max,
1137  ybins=n_time_centroid_bins_default, ymin=-10.0, ymax=10.0)
1138  else: #online - coarse binnings
1139  zdcModuleMonToolArr.defineHistogram('lumiBlock, zdcModuleTime;zdcModuleTime_LG_vs_lb', type='TH2F', title=';lumi block;Module Time [ns]',
1140  path='/EXPERT/ZDC/ZdcModule/ModuleTimeLBdep',
1141  cutmask='zdcModuleLG',
1142  xbins=n_lumi_block_bins_coarse,xmin=0.0,xmax=lumi_block_max,
1143  ybins=n_time_centroid_bins_default, ymin=-10.0, ymax=10.0)
1144  zdcModuleMonToolArr.defineHistogram('lumiBlock, zdcModuleTime;zdcModuleTime_HG_vs_lb', type='TH2F', title=';lumi block;Module Time [ns]',
1145  path='/EXPERT/ZDC/ZdcModule/ModuleTimeLBdep',
1146  cutmask='zdcModuleHG',
1147  xbins=n_lumi_block_bins_coarse,xmin=0.0,xmax=lumi_block_max,
1148  ybins=n_time_centroid_bins_default, ymin=-10.0, ymax=10.0)
1149 
1150  zdcModuleMonToolArr.defineHistogram('lumiBlock, zdcModuleTime;zdcModuleTime_LG_vs_lb_profile', type='TProfile', title=';lumi block;Module Time [ns]',
1151  path='/EXPERT/ZDC/ZdcModule/ModuleTimeLBdep',
1152  cutmask='zdcModuleLGTimeValid',
1153  xbins=lumi_block_max,xmin=0.0,xmax=lumi_block_max)
1154  zdcModuleMonToolArr.defineHistogram('lumiBlock, zdcModuleTime;zdcModuleTime_HG_vs_lb_profile', type='TProfile', title=';lumi block;Module Time [ns]',
1155  path='/EXPERT/ZDC/ZdcModule/ModuleTimeLBdep',
1156  cutmask='zdcModuleHGTimeValid',
1157  xbins=lumi_block_max,xmin=0.0,xmax=lumi_block_max)
1158 
1159 # --------------------------------------------------------------------------------------------------
1160 # ------------------------------------ RPD-channel observables -------------------------------------
1161 # --------------------------------------------------------------------------------------------------
1162 
1163  if (zdcMonAlg.EnableRPDAmp):
1164 
1165  rpdChannelMonToolArr = helper.addArray([sides,channels],zdcMonAlg,'RpdChannelMonitor', topPath = 'ZDC')
1166 
1167  # ---------------------------- amplitudes ----------------------------
1168  rpdChannelMonToolArr.defineHistogram('RPDChannelAmplitudeCalib', title=';RPD Channel Calibrated Amplitude;Events',
1169  path='/SHIFT/RPD/RPDChannel/CalibAmp',
1170  opt='kAlwaysCreate', # always create for shift-needed histograms
1171  cutmask='RPDChannelValid',
1172  xbins=n_rpd_amp_bins_full_range,xmin=rpd_channel_amp_min,xmax=rpd_sum_adc_max) # NOT energy calibration - calibration factor is 1 for now
1173  rpdChannelMonToolArr.defineHistogram('RPDChannelMaxADC', title=';Max ADC [ADC Counts];Events',
1174  path='/EXPERT/RPD/RPDChannel/MaxADC',
1175  cutmask='RPDChannelValid',
1176  xbins=n_energy_bins_default,xmin=0.0,xmax=module_FPGA_max_ADC)
1177 
1178  if (not zdcMonAlg.IsOnline):
1179  rpdChannelMonToolArr.defineHistogram('RPDChannelSubAmp', title=';RPD Channel Subtracted Amplitude;Events',
1180  path='/EXPERT/RPD/RPDChannel/SubAmp',
1181  cutmask='RPDChannelCentroidValid',
1182  xbins=n_rpd_sub_amp_bins,xmin=rpd_sub_amp_min,xmax=rpd_sub_amp_max) # NOT energy calibration - calibration factor is 1 for now
1183 
1184  # max ADC versus sum ADC
1185  if (not zdcMonAlg.IsOnline):
1186  rpdChannelMonToolArr.defineHistogram('RPDChannelAmplitudeCalib,RPDChannelMaxADC', type='TH2F', title=';Sum ADC [ADC Counts];Max ADC [ADC Counts]',
1187  path='/EXPERT/RPD/RPDChannel/MaxADCVsSumADC',
1188  cutmask='RPDChannelValid',
1189  xbins=n_rpd_amp_bins_full_range,xmin=rpd_channel_amp_min,xmax=rpd_sum_adc_max, #change to xmax=20000 for zoomed in
1190  ybins=n_energy_bins_default,ymin=0.0,ymax=module_FPGA_max_ADC) # change to ymax=3000.0 for zoomed in
1191  # ---------------------------- timing (max sample) ----------------------------
1192  rpdChannelMonToolArr.defineHistogram('RPDChannelMaxSample', title=';Max Sample;Events',
1193  path='/EXPERT/RPD/RPDChannel/MaxSample',
1194  cutmask='RPDChannelValid',
1195  xbins=24,xmin=0.0,xmax=24.)
1196 
1197 
1198  # ---------------------------- status bits ----------------------------
1199  rpdChannelMonToolArr.defineHistogram('RPDStatusBits',title=';;Events',
1200  path='/EXPERT/RPD/RPDChannel/StatusBits',
1201  xbins=nRpdStatusBits,xmin=0,xmax=nRpdStatusBits,
1202  opt='kVec',
1203  xlabels=['ValidBit', 'OutOfTimePileupBit', 'OverflowBit', 'PrePulseBit', 'PostPulseBit', 'NoPulseBit', 'BadAvgBaselineSubtrBit', 'InsufficientPileupFitPointsBit', 'PileupStretchedExpFitFailBit', 'PileupStretchedExpGrowthBit', 'PileupBadStretchedExpSubtrBit', 'PileupExpFitFailBit', 'PileupExpGrowthBit', 'PileupBadExpSubtrBit', 'PileupStretchedExpPulseLike'])
1204 
1205  rpdChannelMonToolArr.defineHistogram('RPDChannelValidBitFloat;RPDChannelValidBit',title='RPD Channel valid bit;;Events',
1206  path='/SHIFT/RPD/RPDChannel/StatusBits',
1207  opt='kAlwaysCreate', # always create for shift-needed histograms
1208  xbins=2,xmin=0,xmax=2,
1209  xlabels=['Valid','Invalid'])
1210 
1211  # ---------------------------- LB dependence ----------------------------
1212  if (not zdcMonAlg.IsOnline): #offline
1213  rpdChannelMonToolArr.defineHistogram('lumiBlock, RPDChannelAmplitudeCalib;RPDChannelAmplitudeCalib_vs_lb', type='TH2F', title=';lumi block;RPD Channel Calibrated Amplitude',
1214  path='/EXPERT/RPD/RPDChannel/CalibAmpLBdep',
1215  cutmask='RPDChannelValid',
1216  xbins=lumi_block_max,xmin=0.0,xmax=lumi_block_max,
1217  ybins=n_rpd_amp_bins_full_range,ymin=rpd_channel_amp_min,ymax=rpd_sum_adc_max) # NOT energy calibration - calibration factor is 1 for now
1218  rpdChannelMonToolArr.defineHistogram('lumiBlock, RPDChannelMaxADC;RPDChannelMaxADC_vs_lb', type='TH2F', title=';lumi block;Max ADC [ADC Counts]',
1219  path='/EXPERT/RPD/RPDChannel/MaxADCLBdep',
1220  cutmask='RPDChannelValid',
1221  xbins=lumi_block_max,xmin=0.0,xmax=lumi_block_max,
1222  ybins=n_energy_bins_default,ymin=0.0,ymax=module_FPGA_max_ADC)
1223  else: #online
1224  rpdChannelMonToolArr.defineHistogram('lumiBlock, RPDChannelAmplitudeCalib;RPDChannelAmplitudeCalib_vs_lb', type='TH2F', title=';lumi block;RPD Channel Calibrated Amplitude',
1225  path='/EXPERT/RPD/RPDChannel/CalibAmpLBdep',
1226  cutmask='RPDChannelValid',
1227  xbins=n_lumi_block_bins_coarse,xmin=0.0,xmax=lumi_block_max,
1228  ybins=n_rpd_amp_bins_full_range,ymin=rpd_channel_amp_min,ymax=rpd_sum_adc_max) # NOT energy calibration - calibration factor is 1 for now
1229  rpdChannelMonToolArr.defineHistogram('lumiBlock, RPDChannelMaxADC;RPDChannelMaxADC_vs_lb', type='TH2F', title=';lumi block;Max ADC [ADC Counts]',
1230  path='/EXPERT/RPD/RPDChannel/MaxADCLBdep',
1231  cutmask='RPDChannelValid',
1232  xbins=n_lumi_block_bins_coarse,xmin=0.0,xmax=lumi_block_max,
1233  ybins=n_energy_bins_default,ymin=0.0,ymax=module_FPGA_max_ADC)
1234 
1235 
1236 
1240  acc = helper.result()
1241  result.merge(acc)
1242  return result
1243 
ZdcMonitorAlgorithm.create_hg_fit_amp_inj_bins
def create_hg_fit_amp_inj_bins()
Definition: ZdcMonitorAlgorithm.py:50
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
ZdcMonitorAlgorithm.create_log_bins
def create_log_bins(min_value, max_value, num_bins)
Definition: ZdcMonitorAlgorithm.py:20
ZdcMonitorAlgorithm.create_vinj_bins
def create_vinj_bins()
Definition: ZdcMonitorAlgorithm.py:29
ZdcMonitorAlgorithm.create_lg_fit_amp_inj_bins
def create_lg_fit_amp_inj_bins()
Definition: ZdcMonitorAlgorithm.py:65
ZdcInjPulserVoltageReader.load_voltage_steps
def load_voltage_steps(run_number, voltage_values, voltage_strings, file_path="/cvmfs/atlas.cern.ch/repo/sw/database/GroupData/ZdcConditions/INJpulser_combined_2024.json")
Definition: ZdcInjPulserVoltageReader.py:9
histSizes.list
def list(name, path='/')
Definition: histSizes.py:38
python.AtlasReadyFilterConfig.AtlasReadyFilterCfg
def AtlasReadyFilterCfg(flags)
Definition: AtlasReadyFilterConfig.py:10
print
void print(char *figname, TCanvas *c1)
Definition: TRTCalib_StrawStatusPlots.cxx:25
python.CaloAddPedShiftConfig.int
int
Definition: CaloAddPedShiftConfig.py:45
ZdcMonitorAlgorithm.ZdcMonitoringConfig
def ZdcMonitoringConfig(inputFlags)
Definition: ZdcMonitorAlgorithm.py:83
python.ZdcRecConfig.SetConfigTag
def SetConfigTag(flags)
Definition: ZdcRecConfig.py:91