3 from __future__
import print_function
13 from ROOT
import LArStrHelper
16 __slots__ = (
'HVeta_EMB',
'HVphi_EMB',
'HVeta_EMEC',
'HVphi_EMEC',
'HVeta_HECFcal',
'HVphi_HECFcal',
17 'LB_Bins',
'LB_Min',
'LB_Max',
'BCID_Bins',
'BCID_Min',
'BCID_Max',
18 'colTime_BinWidth',
'colTime_Bins',
'colTime_Min',
'colTime_Max',
'avgColTime_BinWidth',
'avgColTime_Bins',
'avgColTime_Min',
'avgColTime_Max',
19 'etaCaloNoise_Bins',
'etaCaloNoise_Max',
'etaCaloNoise_Min',
'etaCaloNoise_FcalBins',
'etaCaloNoise_FcalMax',
'etaCaloNoise_FcalMin',
20 'FEB_Feedthrough',
'FEB_Slot',
'FEB_Crates',
21 'FEB_N_channels',
'FEB_channels_Min',
'FEB_channels_Max',
'N_FEBErrors',
'FEBErrors',
22 'N_FEB_Parttions_Max',
'N_Cells',
'N_FEB',
'N_Partitions',
'N_Gains',
'Gains',
23 'Feedthrough_Slot_Nbins',
'Feedthrough_Slot_range',
'Feedthrough_Slot_labels_Barrel',
'Feedthrough_Slot_labels_Endcap',
24 'ROD_Crates',
'ROD_Slots',
'ROS_link',
25 'N_DigitsSummary',
'DigitsSummary',
26 'N_SubDet',
'SubDet',
'Samples_Bins',
'Samples_Min',
'Samples_Max',
27 'Energy_Bins',
'Energy_Min',
'Energy_Max',
'DSPEnergy_Bins',
'DSPEnergy_Min',
'DSPEnergy_Max',
28 'DSPTime_Bins',
'DSPTime_Min',
'DSPTime_Max',
'DSPQuality_Bins',
'DSPQuality_Min',
'DSPQuality_Max',
29 'DSP1Energy_Bins',
'DSP1Energy_Min',
'DSP1Energy_Max',
'DSPRanges_Bins',
'DSPRanges_Min',
'DSPRanges_Max',
'DSPRanges',
30 'DSPEonEoff_Bins',
'DSPEonEoff_Max',
'DSPTonToff_Bins',
'DSPTonToff_Max',
'DSPQonQoff_Bins',
'DSPQonQoff_Max',
'DSPThr_Bins',
31 'L1Trig_Bins',
'L1Trig_Min',
'L1Trig_Max',
32 'Evt_Bins',
'Evt_Min',
'Evt_Max',
'Evt_labels',
33 'EvtRej_Bins',
'EvtRej_Min',
'EvtRej_Max',
'EvtRej_labels',
'rejBits_Bins',
36 'noisyFEB_Bins',
'noisyFEB_Max',
'noisyFEB_Min',
37 'Cell_Time_Min',
'Cell_Time_Max',
'Emin',
'Emax',
'DEmin',
'DEmax',
'Qmin',
'Qmax',
'DQmin',
'DQmax',
38 'Tmin',
'Tmax',
'DTmin',
'DTmax',
'OnlineOffline',
'TTriggerTypeMax',
'MaxCellThresholdADC',
39 'CorruptionSource',
'Streams',
40 'Partitions',
'Sides',
'Variables',
'Layers',
'Cell_Variables',
'SuperCell_Variables',
41 'febsBarrelA',
'febsEndcapA',
'febsBarrelC',
'febsEndcapC',
42 'CNFN_tot',
'CNFXmin_tot',
'CNFXmax_tot',
'CNFN_ncoh',
'CNFXmin_ncoh',
'CNFXmax_ncoh')
49 lArDQGlobals.HVeta_EMB = {
"EMBAPS":[8, 0.,1.6],
"EMBA":[7,0.,1.4]}
50 lArDQGlobals.HVphi_EMB = {
"EMBAPS":[32,-TMath.Pi(),TMath.Pi()],
"EMBA":[128,-TMath.Pi(),TMath.Pi()]}
52 bins=lArDQGlobals.HVeta_EMB[
"EMBA"+end]
53 lArDQGlobals.HVeta_EMB[
"EMBC"+end]=[bins[0],-1*(bins[2]+0.01),-1*(bins[1]+0.01)]
54 lArDQGlobals.HVphi_EMB[
"EMBC"+end]=lArDQGlobals.HVphi_EMB[
"EMBA"+end]
56 emecbinsA=[1.375,1.50,1.6,1.8,2.0,2.1,2.3,2.5,2.8,3.2]
57 emecbinsC=[-1*(bi+0.01)
for bi
in reversed(emecbinsA)]
60 lArDQGlobals.HVeta_EMEC = {
"EMECAPS":emecbinsA,
"EMECA":emecbinsA,
"EMECCPS":emecbinsC,
"EMECC":emecbinsC}
61 lArDQGlobals.HVphi_EMEC={}
62 ps_phirange =
range(phibinsPS+1)
63 lArDQGlobals.HVphi_EMEC[
"EMECAPS"]=[-TMath.Pi()+ x*2*TMath.Pi()/phibinsPS
for x
in ps_phirange]
65 lArDQGlobals.HVphi_EMEC[
"EMECA"]=[-TMath.Pi()+ x*2*TMath.Pi()/phibins
for x
in phirange]
66 lArDQGlobals.HVphi_EMEC[
"EMECCPS"]=lArDQGlobals.HVphi_EMEC[
"EMECAPS"]
67 lArDQGlobals.HVphi_EMEC[
"EMECC"]=lArDQGlobals.HVphi_EMEC[
"EMECA"]
69 lArDQGlobals.HVeta_HECFcal = {
"HECA":[1,1.5, 3.2],
"FCalA":[1, 2.9, 4.9]}
70 lArDQGlobals.HVphi_HECFcal = {
"HECA":[32,-TMath.Pi(),TMath.Pi()],
"FCalA":[16, -3.2, 3.2]}
71 for par
in [
"HEC",
"FCal"]:
72 bins=lArDQGlobals.HVeta_HECFcal[par+
"A"]
73 lArDQGlobals.HVeta_HECFcal[par+
"C"]=[bins[0],-1*(bins[2]+0.01),-1*(bins[1]+0.01)]
74 lArDQGlobals.HVphi_HECFcal[par+
"C"]=lArDQGlobals.HVphi_HECFcal[par+
"A"]
76 lArDQGlobals.LB_Bins=3000
77 lArDQGlobals.LB_Min=-0.5
78 lArDQGlobals.LB_Max=lArDQGlobals.LB_Bins+lArDQGlobals.LB_Min
80 lArDQGlobals.BCID_Bins=3564
81 lArDQGlobals.BCID_Min=-0.5
82 lArDQGlobals.BCID_Max=lArDQGlobals.BCID_Min+lArDQGlobals.BCID_Bins
84 lArDQGlobals.colTime_BinWidth = 0.25*Units.nanosecond
85 lArDQGlobals.colTime_Min=-50.5*Units.nanosecond
86 lArDQGlobals.colTime_Max=50.5*Units.nanosecond
87 lArDQGlobals.colTime_Bins=(int)((lArDQGlobals.colTime_Max-lArDQGlobals.colTime_Min)//lArDQGlobals.colTime_BinWidth)
88 lArDQGlobals.avgColTime_BinWidth = 0.25*Units.nanosecond
89 lArDQGlobals.avgColTime_Min=-40*Units.nanosecond
90 lArDQGlobals.avgColTime_Max=40*Units.nanosecond
91 lArDQGlobals.avgColTime_Bins=(int)((lArDQGlobals.avgColTime_Max-lArDQGlobals.avgColTime_Min)//lArDQGlobals.avgColTime_BinWidth)
93 lArDQGlobals.etaCaloNoise_Bins=320
94 lArDQGlobals.etaCaloNoise_Max=3.2
95 lArDQGlobals.etaCaloNoise_Min=-3.2
96 lArDQGlobals.etaCaloNoise_FcalBins=500
97 lArDQGlobals.etaCaloNoise_FcalMax=5.0
98 lArDQGlobals.etaCaloNoise_FcalMin=-5.0
101 lArDQGlobals.FEB_Feedthrough={
"EMBA":[0,31],
"EMBC":[0,31],
"EMECA":[0,24],
"EMECC":[0,24],
"HECA":[0,24],
"HECC":[0,24],
"FCalA":[0,24],
"FCalC":[0,24]}
102 lArDQGlobals.FEB_Slot={
"EMBA":[1,14],
"EMBC":[1,14],
"EMECA":[1,15],
"EMECC":[1,15],
"HECA":[1,15],
"HECC":[1,15],
"FCalA":[1,15],
"FCalC":[1,15]}
103 lArDQGlobals.FEB_Crates={
"EMBA":[1,448],
"EMBC":[1,448],
"EMECA":[1,375],
"EMECC":[1,375],
"HECA":[1,375],
"HECC":[1,375],
"FCalA":[1,375],
"FCalC":[1,375]}
105 lArDQGlobals.FEB_N_channels=128
106 lArDQGlobals.FEB_channels_Min=-0.5
107 lArDQGlobals.FEB_channels_Max=lArDQGlobals.FEB_N_channels-0.5
110 lArDQGlobals.N_FEB=1524
111 lArDQGlobals.N_FEB_Parttions_Max=500
112 lArDQGlobals.N_Cells=200000
115 lArDQGlobals.Feedthrough_Slot_Nbins={p : (lArDQGlobals.FEB_Feedthrough[p][1]+1)*lArDQGlobals.FEB_Slot[p][1]
for p
in lArDQGlobals.FEB_Feedthrough }
116 lArDQGlobals.Feedthrough_Slot_range={p : [lArDQGlobals.FEB_Feedthrough[p][0]*lArDQGlobals.FEB_Slot[p][1]+lArDQGlobals.FEB_Slot[p][0]-0.5,lArDQGlobals.FEB_Feedthrough[p][1]*lArDQGlobals.FEB_Slot[p][1]+lArDQGlobals.FEB_Slot[p][1]+0.5]
for p
in lArDQGlobals.FEB_Feedthrough }
119 lArDQGlobals.Feedthrough_Slot_labels_Barrel=[
str(If)
if Is==1
else '' for If
in range_0_32
for Is
in range_1_15]
122 lArDQGlobals.Feedthrough_Slot_labels_Endcap=[
str(If)
if Is==1
else '' for If
in range_0_25
for Is
in range_1_16]
125 lArDQGlobals.Sides=[
"A",
"C"]
133 larStrHelp=LArStrHelper()
134 lArDQGlobals.febsBarrelA=[larStrHelp.febNameString(
True,1,i_ft,i_slot)
for i_ft
in range_0_32
for i_slot
in range_1_15]
135 lArDQGlobals.febsBarrelC=[larStrHelp.febNameString(
True,0,i_ft,i_slot)
for i_ft
in range_0_32
for i_slot
in range_1_15]
136 lArDQGlobals.febsEndcapA=[larStrHelp.febNameString(
False,1,i_ft,i_slot)
for i_ft
in range_0_25
for i_slot
in range_1_16]
137 lArDQGlobals.febsEndcapC=[larStrHelp.febNameString(
False,0,i_ft,i_slot)
for i_ft
in range_0_25
for i_slot
in range_1_16]
145 lArDQGlobals.ROD_Crates={
"EMBA":[1,4],
"EMBC":[1,4],
"EMECA":[1,3],
"EMECC":[1,3],
"HECA":[1],
"HECC":[1],
"FCalA":[1],
"FCalC":[1]}
146 lArDQGlobals.ROD_Slots={
"EMBA":[1,14],
"EMBC":[1,14],
"EMECA":[1,13],
"EMECC":[1,13],
"HECA":[1,6],
"HECC":[1,6],
"FCalA":[1,4],
"FCalC":[1,4]}
149 lArDQGlobals.ROS_link={
"EMBA":[0,31],
"EMBC":[0,31],
"EMECA":[0,24],
"EMECC":[0,24],
"HECA":[0,24],
"HECC":[0,24],
"FCalA":[0,24],
"FCalC":[0,24]}
152 lArDQGlobals.N_FEBErrors=13
153 lArDQGlobals.FEBErrors=[
"Parity",
"BCID",
"Sample Header",
"EVTID",
"SCAC status",
"Sca out of range",
"Gain mismatch",
"Type mismatch",
"# of samples",
"Empty data block",
"Checksum / block size",
"Missing header",
"Bad gain"]
156 lArDQGlobals.TotalNcell=182468
159 lArDQGlobals.N_Partitions=8
160 lArDQGlobals.Partitions=[
"EMBC",
"EMBA",
"EMECC",
"EMECA",
"HECC",
"HECA",
"FCalC",
"FCalA"]
161 lArDQGlobals.N_SubDet=4
162 lArDQGlobals.SubDet=[
"EMB",
"EMEC",
"HEC",
"FCal"]
163 lArDQGlobals.N_Gains=3
164 lArDQGlobals.Gains=[
"High Gain",
"Medium Gain",
"Low Gain"]
167 lArDQGlobals.N_DigitsSummary=4
168 lArDQGlobals.DigitsSummary=[
"OutOfRange",
"Saturation",
"Null Digits",
"Mean Time"]
171 lArDQGlobals.Samples_Bins=33
172 lArDQGlobals.Samples_Min=-0.5
173 lArDQGlobals.Samples_Max=lArDQGlobals.Samples_Bins-0.5
180 lArDQGlobals.Cell_Time_Min=-200
181 lArDQGlobals.Cell_Time_Max=200
184 lArDQGlobals.Emin=-20000.0
185 lArDQGlobals.Emax=20000.0
188 lArDQGlobals.DEmin=-512
189 lArDQGlobals.DEmax=512
193 lArDQGlobals.Qmax=6553
196 lArDQGlobals.DQmin=-3000
197 lArDQGlobals.DQmax=1000
200 lArDQGlobals.Tmin=-80000
201 lArDQGlobals.Tmax=80000
204 lArDQGlobals.Tmin=-80000
205 lArDQGlobals.Tmax=80000
208 lArDQGlobals.DTmin=-800
209 lArDQGlobals.DTmax=800
212 lArDQGlobals.Energy_Bins=300
213 lArDQGlobals.Energy_Min=0.
214 lArDQGlobals.Energy_Max=3000.
217 lArDQGlobals.MaxCellThresholdADC=1900
220 lArDQGlobals.DSPEnergy_Bins=400
221 lArDQGlobals.DSPEnergy_Min=-40.
222 lArDQGlobals.DSPEnergy_Max=40.
223 lArDQGlobals.DSPTime_Bins=400
224 lArDQGlobals.DSPTime_Min=-800.
225 lArDQGlobals.DSPTime_Max=800.
226 lArDQGlobals.DSPQuality_Bins=400
227 lArDQGlobals.DSPQuality_Min=-3000.
228 lArDQGlobals.DSPQuality_Max=3000.
229 lArDQGlobals.DSP1Energy_Bins=5000
230 lArDQGlobals.DSP1Energy_Min=-515.
231 lArDQGlobals.DSP1Energy_Max=515.
232 lArDQGlobals.DSPRanges_Bins=4
233 lArDQGlobals.DSPRanges_Min=0
234 lArDQGlobals.DSPRanges_Max=4
235 lArDQGlobals.DSPRanges=[
"E < 2^{13} MeV",
"E < 2^{16} MeV",
"E < 2^{19} MeV",
"E < 2^{22} MeV"]
236 lArDQGlobals.DSPEonEoff_Bins=300
237 lArDQGlobals.DSPEonEoff_Max=20000.
238 lArDQGlobals.DSPTonToff_Bins=300
239 lArDQGlobals.DSPTonToff_Max=80000.
240 lArDQGlobals.DSPQonQoff_Bins=300
241 lArDQGlobals.DSPQonQoff_Max=66000.
242 lArDQGlobals.DSPThr_Bins=2000
245 lArDQGlobals.L1Trig_Bins=256
246 lArDQGlobals.L1Trig_Min=-0.5
247 lArDQGlobals.L1Trig_Max=lArDQGlobals.L1Trig_Bins-0.5
250 lArDQGlobals.TTriggerTypeMax=256
253 lArDQGlobals.CorruptionSource=[
"Parity",
"BCID Mismatch",
"Sample header",
"EVT ID",
"SCAC status",
"Sca out of range",
"Gain mismatch",
"Type mismatch",
"# of samples",
"Empty data block",
"Checksum /block size",
"Missing header",
"Bad gain"]
256 lArDQGlobals.Evt_Bins = 15
257 lArDQGlobals.Evt_Min = -0.5
258 lArDQGlobals.Evt_Max = 14.5
259 lArDQGlobals.Evt_labels = [
"",
"Raw data - Transparent",
"",
"Result - Physic",
"",
"",
"Calibration",
"",
"",
"Pedestals",
"",
"",
"",
"Raw data+Result"]
260 lArDQGlobals.EvtRej_Bins = 8
261 lArDQGlobals.EvtRej_Min = 0
262 lArDQGlobals.EvtRej_Max = 8
263 lArDQGlobals.EvtRej_labels = [
">=1 FEB in error",
">=4 FEBs in error",
"LArError_DATACORRUPTED",
"LArError_DATACORRUPTEDNOVETO",
"LArError_DATACORRUPTEDVETO",
"LArError_NOISEBURSTVETO",
"Accepted",
"Total"]
265 lArDQGlobals.rejBits_Bins=8192
267 lArDQGlobals.defaultStreamNames = [
"express",
"Main",
"CosmicCalo",
"L1Calo",
"L1Topo",
"ZeroBias",
"Standby",
"LArCells",
"LArCellsEmpty",
"Background",
"others"]
270 lArDQGlobals.noisyFEB_Bins=51
271 lArDQGlobals.noisyFEB_Min=-0.5
272 lArDQGlobals.noisyFEB_Max=50.5
275 lArDQGlobals.Cell_Variables={}
276 lArDQGlobals.Variables=[
"etaRange",
"phiRange",
"etaNbin",
"phiNbin",
"etasize",
"etaCellSize",
"etaMin"]
277 lArDQGlobals.Layers=[
"0",
"1",
"2",
"3"]
278 for Variable
in lArDQGlobals.Variables :
279 lArDQGlobals.Cell_Variables[Variable]={}
280 for sdet
in lArDQGlobals.SubDet :
281 lArDQGlobals.Cell_Variables[Variable][sdet]={}
282 for Side
in lArDQGlobals.Sides :
283 lArDQGlobals.Cell_Variables[Variable][sdet][Side]={}
284 for Layer
in lArDQGlobals.Layers:
285 lArDQGlobals.Cell_Variables[Variable][sdet][Side][Layer]=
list()
288 lArDQGlobals.Cell_Variables[
"phiNbin"][
"EMB"][
"A"]= {
"0":64,
"1":256,
"2":256,
"3":256}
289 lArDQGlobals.Cell_Variables[
"phiNbin"][
"EMB"][
"C"]= lArDQGlobals.Cell_Variables[
"phiNbin"][
"EMB"][
"A"]
291 lArDQGlobals.Cell_Variables[
"phiNbin"][
"EMEC"][
"A"]= {
"0":64,
"1":64,
"2":256,
"3":256}
292 lArDQGlobals.Cell_Variables[
"phiNbin"][
"EMEC"][
"C"]= lArDQGlobals.Cell_Variables[
"phiNbin"][
"EMEC"][
"A"]
294 lArDQGlobals.Cell_Variables[
"phiNbin"][
"HEC"][
"A"]= {
"0":64,
"1":64,
"2":64,
"3":64}
295 lArDQGlobals.Cell_Variables[
"phiNbin"][
"HEC"][
"C"]= lArDQGlobals.Cell_Variables[
"phiNbin"][
"HEC"][
"A"]
297 lArDQGlobals.Cell_Variables[
"phiNbin"][
"FCal"][
"A"]= {
"1":16,
"2":16,
"3":16}
298 lArDQGlobals.Cell_Variables[
"phiNbin"][
"FCal"][
"C"]= lArDQGlobals.Cell_Variables[
"phiNbin"][
"FCal"][
"A"]
304 lArDQGlobals.Cell_Variables[
"etaNbin"][
"EMB"][
"A"]= {
"0":[0,61],
"1":[0,1,447,451],
"2":[0,58,60],
"3":[0, 27, 28]}
305 lArDQGlobals.Cell_Variables[
"etaMin" ][
"EMB"][
"A"]= {
"0":0.0,
"1":0.0,
"2":0.0,
"3":0.0}
306 lArDQGlobals.Cell_Variables[
"etaCellSize"][
"EMB"][
"A"]={
"0":[0.025],
"1":[0.025/4,0.025/8,0.025],
"2":[0.025,0.05],
"3":[0.05, 0.125]}
309 lArDQGlobals.Cell_Variables[
"etaNbin"][
"EMEC"][
"A"]= {
"0":[0,12],
"1":[0,1,3,107,155,219,223,230],
"2":[0,1,47,54],
"3":[0,20]}
310 lArDQGlobals.Cell_Variables[
"etaMin" ][
"EMEC"][
"A"]= {
"0":1.5,
"1":1.375,
"2":1.375,
"3":1.5}
311 lArDQGlobals.Cell_Variables[
"etaCellSize"][
"EMEC"][
"A"]= {
"0":[0.025],
"1":[0.05,0.025,0.025/8,0.025/6,0.025/4,0.025,0.1],
"2":[0.05,0.025,0.1],
"3":[0.05]}
314 lArDQGlobals.Cell_Variables[
"etaNbin"][
"HEC"][
"A"]= {
"0":[0,10,14],
"1":[0,10,13],
"2":[0,9,12],
"3":[0,8,12]}
315 lArDQGlobals.Cell_Variables[
"etaMin" ][
"HEC"][
"A"]= {
"0":1.5,
"1":1.5,
"2":1.6,
"3":1.7}
316 lArDQGlobals.Cell_Variables[
"etaCellSize"][
"HEC"][
"A"]= {
"0":[0.1,0.2],
"1":[0.1,0.2],
"2":[0.1,0.2],
"3":[0.1,0.2]}
319 lArDQGlobals.Cell_Variables[
"etaNbin"][
"FCal"][
"A"]= {
"1":[0, 3, 9, 13, 15],
"2":[0, 1, 4, 5, 6, 7, 10, 12, 13, 14, 17, 21, 25, 27, 28, 29, 30, 31],
"3":[0,2,4,5,6,8]}
320 lArDQGlobals.Cell_Variables[
"etaMin" ][
"FCal"][
"A"]= {
"1":3.08,
"2":3.192,
"3":3.27}
321 lArDQGlobals.Cell_Variables[
"etaCellSize"][
"FCal"][
"A"]= {
"1":[0.04, 0.1, 0.2, 0.11],
"2":[0.007, 0.0035, 0.008, 0.0005, 0.012, 0.01, 0.04, 0.03, 0.02, 0.043, 0.0125, 0.066, 0.132, 0.265, 0.135, 0.15, 0.16],
"3":[0.08, 0.135, 0.21, 0.42, 0.21]}
326 for Layer
in lArDQGlobals.Layers :
327 for sdet
in lArDQGlobals.SubDet:
332 phi_range=
range(lArDQGlobals.Cell_Variables[
"phiNbin"][sdet][
"A"][Layer]+1)
333 lArDQGlobals.Cell_Variables[
"phiRange"][sdet][
"A"][Layer]=[-0.5+x
for x
in phi_range]
334 lArDQGlobals.Cell_Variables[
"phiRange"][sdet][
"C"]=lArDQGlobals.Cell_Variables[
"phiRange"][sdet][
"A"]
336 phi_range=
range(lArDQGlobals.Cell_Variables[
"phiNbin"][sdet][
"A"][Layer]+1)
337 lArDQGlobals.Cell_Variables[
"phiRange"][sdet][
"A"][Layer]=[-TMath.Pi()+ x*2*TMath.Pi()/lArDQGlobals.Cell_Variables[
"phiNbin"][sdet][
"A"][Layer]
for x
in phi_range]
338 lArDQGlobals.Cell_Variables[
"phiRange"][sdet][
"C"]=lArDQGlobals.Cell_Variables[
"phiRange"][sdet][
"A"]
346 for sdet
in lArDQGlobals.SubDet:
347 for Lay
in lArDQGlobals.Layers:
348 if sdet==
"FCal" and Lay==
"0":
350 Ranges=lArDQGlobals.Cell_Variables[
"etaNbin"][sdet][
"A"][Lay]
351 Sizes=lArDQGlobals.Cell_Variables[
"etaCellSize"][sdet][
"A"][Lay]
352 if not len(Ranges)-len(Sizes)==1 :
353 print(
"Bad list of ranges and size please check")
356 etamin=lArDQGlobals.Cell_Variables[
"etaMin"][sdet][
"A"][Lay]
358 for k
in range(len(Ranges)-1) :
359 eta_range =
range(1,Ranges[k+1]-Ranges[k]+1)
360 currange+=[
round(currange[-1] + x * Sizes[k],5)
for x
in eta_range]
362 lArDQGlobals.Cell_Variables[
"etaRange"][sdet][
"A"][Lay]=currange
364 lArDQGlobals.Cell_Variables[
"etaRange"][sdet][
"C"][Lay] =
list(map(
lambda x: x*-1,lArDQGlobals.Cell_Variables[
"etaRange"][sdet][
"A"][Lay]))[::-1]
369 lArDQGlobals.SuperCell_Variables={}
370 lArDQGlobals.Variables=[
"etaRange",
"phiRange",
"etaNbin",
"phiNbin",
"etasize",
"etaCellSize",
"etaMin",
"phiMin"]
371 lArDQGlobals.Layers=[
"0",
"1",
"2",
"3"]
372 for Variable
in lArDQGlobals.Variables :
373 lArDQGlobals.SuperCell_Variables[Variable]={}
374 for sdet
in lArDQGlobals.SubDet :
375 lArDQGlobals.SuperCell_Variables[Variable][sdet]={}
376 for Side
in lArDQGlobals.Sides :
377 lArDQGlobals.SuperCell_Variables[Variable][sdet][Side]={}
378 for Layer
in lArDQGlobals.Layers:
379 lArDQGlobals.SuperCell_Variables[Variable][sdet][Side][Layer]=
list()
380 for Variable
in [
"etaRange",
"phiRange",
"phiNbin",
"phiMin"]:
381 lArDQGlobals.SuperCell_Variables[Variable][
"All"] = {}
382 lArDQGlobals.SuperCell_Variables[Variable][
"All"][
"All"]=
list()
383 for Layer
in lArDQGlobals.Layers:
384 lArDQGlobals.SuperCell_Variables[Variable][
"All"][Layer]=
list()
388 lArDQGlobals.SuperCell_Variables[
"phiNbin"][
"EMB"][
"A"]= {
"0":64,
"1":64,
"2":64,
"3":64}
389 lArDQGlobals.SuperCell_Variables[
"phiNbin"][
"EMB"][
"C"]= lArDQGlobals.SuperCell_Variables[
"phiNbin"][
"EMB"][
"A"]
391 lArDQGlobals.SuperCell_Variables[
"phiNbin"][
"EMEC"][
"A"]= {
"0":64,
"1":64,
"2":64,
"3":64}
392 lArDQGlobals.SuperCell_Variables[
"phiNbin"][
"EMEC"][
"C"]= lArDQGlobals.SuperCell_Variables[
"phiNbin"][
"EMEC"][
"A"]
394 lArDQGlobals.SuperCell_Variables[
"phiNbin"][
"HEC"][
"A"]= {
"0":64,
"1":64,
"2":64,
"3":64}
395 lArDQGlobals.SuperCell_Variables[
"phiNbin"][
"HEC"][
"C"]= lArDQGlobals.SuperCell_Variables[
"phiNbin"][
"HEC"][
"A"]
397 lArDQGlobals.SuperCell_Variables[
"phiNbin"][
"FCal"][
"A"]= {
"1":16,
"2":16,
"3":16}
398 lArDQGlobals.SuperCell_Variables[
"phiNbin"][
"FCal"][
"C"]= lArDQGlobals.SuperCell_Variables[
"phiNbin"][
"FCal"][
"A"]
400 lArDQGlobals.SuperCell_Variables[
"phiNbin"][
"All"]= {
"0":64,
"1":64,
"2":64,
"3":64,
"All":16}
401 lArDQGlobals.SuperCell_Variables[
"phiMin"][
"All"] = {
"0": -3.094550609588623,
"1": -3.0960847139358521,
"2": -3.0960847139358521,
"3": -TMath.Pi(),
"All": -TMath.Pi()}
406 lArDQGlobals.SuperCell_Variables[
"etaNbin"][
"EMB"][
"A"]= {
"0":[0,14,15],
"1":[0,59],
"2":[0,56,57],
"3":[0, 14]}
407 lArDQGlobals.SuperCell_Variables[
"etaMin" ][
"EMB"][
"A"]= {
"0":0.0,
"1":0.0,
"2":0.0,
"3":0.0}
408 lArDQGlobals.SuperCell_Variables[
"etaCellSize"][
"EMB"][
"A"]={
"0":[0.1,0.12],
"1":[0.025],
"2":[0.025,0.075],
"3":[0.1]}
411 lArDQGlobals.SuperCell_Variables[
"etaNbin"][
"EMEC"][
"A"]= {
"0":[0,3],
"1":[0,1,13,25,41,42],
"2":[0,1,44,47,48],
"3":[0,10,13,14]}
412 lArDQGlobals.SuperCell_Variables[
"etaMin" ][
"EMEC"][
"A"]= {
"0":1.5,
"1":1.375,
"2":1.375,
"3":1.5}
413 lArDQGlobals.SuperCell_Variables[
"etaCellSize"][
"EMEC"][
"A"]={
"0":[0.1],
"1":[0.125,0.025,0.1/6,0.025,0.1],
"2":[0.05,0.025,0.2,0.1],
"3":[0.1,0.2,0.1]}
416 lArDQGlobals.SuperCell_Variables[
"etaNbin"][
"HEC"][
"A"]= {
"0":[0,10,14],
"1":[0,10,14],
"2":[0,10,14],
"3":[0,10,14]}
417 lArDQGlobals.SuperCell_Variables[
"etaMin" ][
"HEC"][
"A"]= {
"0":1.5,
"1":1.5,
"2":1.5,
"3":1.5}
418 lArDQGlobals.SuperCell_Variables[
"etaCellSize"][
"HEC"][
"A"]= {
"0":[0.1,0.2],
"1":[0.1,0.2],
"2":[0.1,0.2],
"3":[0.1,0.2]}
421 lArDQGlobals.SuperCell_Variables[
"etaRange"][
"FCal"][
"A"][
"1"]=[3.10,3.20,3.30,3.37,3.45,3.55,3.6,3.65,3.80,3.9,3.972,4.30,4.50,4.66,4.90]
422 lArDQGlobals.SuperCell_Variables[
"etaRange"][
"FCal"][
"A"][
"2"]=[3.20,3.25,3.35,3.45,3.55,3.75,4.00,4.40,4.90]
423 lArDQGlobals.SuperCell_Variables[
"etaRange"][
"FCal"][
"A"][
"2"]=[3.20,3.24,3.25,3.35,3.45,3.55,3.65,3.75,4.00,4.40,4.90]
424 lArDQGlobals.SuperCell_Variables[
"etaRange"][
"FCal"][
"A"][
"3"]=[3.30,3.40,3.60,4.00,4.90]
427 for Layer
in lArDQGlobals.Layers :
428 for sdet
in lArDQGlobals.SubDet:
429 if sdet==
"FCal" and Layer ==
"0":
432 phi_range=
range(lArDQGlobals.SuperCell_Variables[
"phiNbin"][sdet][
"A"][Layer]+1)
433 lArDQGlobals.SuperCell_Variables[
"phiRange"][sdet][
"A"][Layer]=[-TMath.Pi()+ x*2*TMath.Pi()/lArDQGlobals.SuperCell_Variables[
"phiNbin"][sdet][
"A"][Layer]
for x
in phi_range]
434 lArDQGlobals.SuperCell_Variables[
"phiRange"][sdet][
"C"]=lArDQGlobals.SuperCell_Variables[
"phiRange"][sdet][
"A"]
439 for Layer
in [
"0",
"1",
"2",
"3",
"All"] :
440 if Layer ==
"3" or Layer ==
"All":
441 phi_range=
range(lArDQGlobals.SuperCell_Variables[
"phiNbin"][
"All"][Layer]+1)
442 lArDQGlobals.SuperCell_Variables[
"phiRange"][
"All"][Layer]=[lArDQGlobals.SuperCell_Variables[
"phiMin"][
"All"][Layer] + x*2*TMath.Pi()/lArDQGlobals.SuperCell_Variables[
"phiNbin"][
"All"][Layer]
for x
in phi_range]
444 phi_range=
range(lArDQGlobals.SuperCell_Variables[
"phiNbin"][
"All"][Layer])
445 phi_range1 = lArDQGlobals.SuperCell_Variables[
"phiRange"][
"All"][Layer]=[lArDQGlobals.SuperCell_Variables[
"phiMin"][
"All"][Layer] + x*2*TMath.Pi()/lArDQGlobals.SuperCell_Variables[
"phiNbin"][
"All"][Layer]
for x
in phi_range]
446 phi_range2 = [-1*x
for x
in phi_range1]
447 lArDQGlobals.SuperCell_Variables[
"phiRange"][
"All"][Layer] =
sorted(phi_range1 + phi_range2)
450 for sdet
in lArDQGlobals.SubDet:
451 for Lay
in lArDQGlobals.Layers:
452 if Lay
not in lArDQGlobals.SuperCell_Variables[
"etaNbin"][sdet][
"A"].
keys():
continue
454 lArDQGlobals.SuperCell_Variables[
"etaRange"][sdet][
"C"][Lay] =
list(map(
lambda x: x*-1,lArDQGlobals.SuperCell_Variables[
"etaRange"][sdet][
"A"][Lay]))[::-1]
456 Ranges=lArDQGlobals.SuperCell_Variables[
"etaNbin"][sdet][
"A"][Lay]
457 Sizes=lArDQGlobals.SuperCell_Variables[
"etaCellSize"][sdet][
"A"][Lay]
458 if not len(Ranges)-len(Sizes)==1 :
459 print(
"Bad list of ranges and size please check")
462 etamin=lArDQGlobals.SuperCell_Variables[
"etaMin"][sdet][
"A"][Lay]
464 for k
in range(len(Ranges)-1) :
465 eta_range =
range(1,Ranges[k+1]-Ranges[k]+1)
466 currange+=[
round(currange[-1] + x * Sizes[k],5)
for x
in eta_range]
468 lArDQGlobals.SuperCell_Variables[
"etaRange"][sdet][
"A"][Lay]=currange
469 lArDQGlobals.SuperCell_Variables[
"etaRange"][sdet][
"C"][Lay] =
list(map(
lambda x: x*-1,lArDQGlobals.SuperCell_Variables[
"etaRange"][sdet][
"A"][Lay]))[::-1]
471 for layer
in [
"0",
"1",
"2",
"3"]:
472 lArDQGlobals.SuperCell_Variables[
"etaRange"][
"All"][layer] =
sorted(
list(
set([item
for sublist
in [lArDQGlobals.SuperCell_Variables[
"etaRange"][det][side][layer]
for det
in [
"EMB",
"EMEC",
"HEC",
"FCal"]
for side
in [
"A",
"C"]
if layer
in lArDQGlobals.SuperCell_Variables[
"etaRange"][det][side].
keys()]
for item
in sublist ])))
475 eta_range =
sorted(
list(
set([item
for sublist
in [lArDQGlobals.SuperCell_Variables[
"etaRange"][
"EMB"][
"A"][
"1"], lArDQGlobals.SuperCell_Variables[
"etaRange"][
"EMEC"][
"A"][
"2"],lArDQGlobals.SuperCell_Variables[
"etaRange"][
"HEC"][
"A"][
"0"],lArDQGlobals.SuperCell_Variables[
"etaRange"][
"FCal"][
"A"][
"2"]]
for item
in sublist ])))
476 lArDQGlobals.SuperCell_Variables[
"etaRange"][
"All"][
"All"] =
sorted(
list(
set(eta_range + [-1*x
for x
in eta_range])))
479 lArDQGlobals.CNFN_tot = 80
480 lArDQGlobals.CNFXmin_tot = -400.
481 lArDQGlobals.CNFXmax_tot = 400.
482 lArDQGlobals.CNFN_ncoh = 120
483 lArDQGlobals.CNFXmin_ncoh = -40.
484 lArDQGlobals.CNFXmax_ncoh = 200.