3 from DCSCalculator2.lib
import DCSC_Subdetector, DCSC_Variable
4 from DQUtils.sugar
import IOVSet
7 return IOVSet(iov._replace(channel=iov.channel+offset)
for iov
in iovs)
9 BAR_MAX_ID, ECA_MAX_ID, ECC_MAX_ID = 710, 640, 640
20 Different regions are stored in different folders, but they are the same
24 def read(self, query_range, folder_base, folder_name):
25 normal_read = super(DCSC_Variable_TRT_HV, self).read
27 iovs_bar = normal_read(query_range, folder_base,
"HV/BARREL")
28 iovs_eca = normal_read(query_range, folder_base,
"HV/ENDCAPA")
29 iovs_ecc = normal_read(query_range, folder_base,
"HV/ENDCAPC")
32 iovs_bar = [i
for i
in iovs_bar
if 0 < i.channel <= BAR_MAX_ID]
33 iovs_eca = [i
for i
in iovs_eca
if 0 < i.channel <= ECA_MAX_ID]
34 iovs_ecc = [i
for i
in iovs_ecc
if 0 < i.channel <= ECC_MAX_ID]
39 return sorted(iovs_bar + iovs_eca + iovs_ecc,
40 key =
lambda i: (i.channel, i.since))
42 class TRT(DCSC_Subdetector):
47 folder_base =
"/TRT/DCS"
50 121:
list(
range(1, BAR_MAX_ID + 1 - BAR_REMOVED_IDS)),
51 124:
list(
range(1 + BAR_MAX_ID, 1 + BAR_MAX_ID + ECA_MAX_ID)),
52 125:
list(
range(1 + BAR_MAX_ID + ECA_MAX_ID, 1 + BAR_MAX_ID + ECA_MAX_ID + ECC_MAX_ID)),
59 dead_fraction_caution = 0.05
60 dead_fraction_bad = 0.20