25 NoisyFEBDefStr="(>30 chan
with Q>4000)
",
27 MNBTight_PsVetoFEBDefStr=
"",
28 MNBLooseFEBDefStr=
""):
31 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
33 from LArBadChannelTool.LArBadFebsConfig
import LArKnownBadFebCfg, LArKnownMNBFebCfg
37 larNoisyROMonAlg = helper.addAlgorithm(algoinstance,
'larNoisyROMonAlg')
39 NoisyROMonGroupName=
"LArNoisyROMonGroup"
41 from LArMonitoring.GlobalVariables
import lArDQGlobals
43 larNoisyROMonAlg.NoisyROGroupName=NoisyROMonGroupName
44 larNoisyROMonAlg.SubDetNames=lArDQGlobals.SubDet[0:2]
45 larNoisyROMonAlg.PartitionNames=lArDQGlobals.Partitions[0:4]
47 larNoisyROMonAlg.storeLooseMNBFEBs=
True
49 larNoisyROMonAlg.inputKey=inKey
53 LArNoisyROMonForceTrigger
55 LArNoisyROMonForceTrigger =
False
57 EFNoiseBurstTriggersList=[
58 "HLT_larnoiseburst_L1XE60",
59 "HLT_larnoiseburst_L1XE70",
60 "HLT_larnoiseburst_L1XE80",
61 "HLT_larnoiseburst_L1J100",
62 "HLT_larnoiseburst_L1J40_XE60",
63 "HLT_larnoiseburst_L1J40_XE50",
64 "HLT_larpsall_L1J12_FIRSTEMPTY",
65 "HLT_larpsall_L1J30_FIRSTEMPTY",
66 "HLT_larpsallem_L1EM7_FIRSTEMPTY"
68 L1NoiseBurstTriggersList = [
83 if flags.DQ.useTrigger
or LArNoisyROMonForceTrigger:
84 larNoisyROMonAlg.doTrigger =
True
85 larNoisyROMonAlg.EFNoiseBurstTriggers = EFNoiseBurstTriggersList
86 larNoisyROMonAlg.L1NoiseBurstTriggers = L1NoiseBurstTriggersList
88 larNoisyROMonAlg.doTrigger =
False
89 larNoisyROMonAlg.EFNoiseBurstTriggers = []
90 larNoisyROMonAlg.L1NoiseBurstTriggers = []
92 noisyROGroup = helper.addGroup(
99 larNoisyRO_hist_path=
'Summary/'
102 noisyROGroup.defineTree(
'time,time_ns,algo;LArNoise',path=larNoisyRO_hist_path,
103 treedef=
'time/i:time_ns/i:algo/b')
105 noisyROGroup.defineTree(
'candidate_MNB_time,candidate_MNB_time_ns,n_candidate_MNBTight_FEB,n_candidate_MNBTight_PsVeto_FEB,n_candidate_MNBLoose_FEB,v_candidate_MNBTightFEB,v_candidate_MNBTight_PsVetoFEB,v_candidate_MNBLooseFEB;CandidateMNBFebs',path=larNoisyRO_hist_path,
106 treedef=
'candidate_MNB_time/i:candidate_MNB_time_ns/i:n_candidate_MNBTight_FEB/i:n_candidate_MNBTight_PsVeto_FEB/i:n_candidate_MNBLoose_FEB/i:v_candidate_MNBTightFEB/vector<int>:v_candidate_MNBTight_PsVetoFEB/vector<int>:v_candidate_MNBLooseFEB/vector<int>')
109 noisyROGroup.defineHistogram(
'n_noisyFEBs;NoisyFEB',
110 title=
'Number of noisy FEB '+ NoisyFEBDefStr +
' per event;# of noisy FEB',
112 path=larNoisyRO_hist_path,
113 xbins=lArDQGlobals.noisyFEB_Bins,xmin=lArDQGlobals.noisyFEB_Min,xmax=lArDQGlobals.noisyFEB_Max)
114 noisyROGroup.defineHistogram(
'LBN;LBN',type=
'TH1I',
115 title=
'Event counter per LB',
116 path=larNoisyRO_hist_path,
117 xbins=lArDQGlobals.LB_Bins,xmin=lArDQGlobals.LB_Min,xmax=lArDQGlobals.LB_Max)
119 for subdet
in range(0,2):
120 hist_path=
'/LAr/NoisyRO/'+lArDQGlobals.SubDet[subdet]+
'/'
121 slot_low = lArDQGlobals.FEB_Slot[lArDQGlobals.Partitions[subdet*2]][0] - 0.5
122 slot_up = lArDQGlobals.FEB_Slot[lArDQGlobals.Partitions[subdet*2]][1] + 0.5
123 slot_n =
int(slot_up - slot_low)
124 ft_low = lArDQGlobals.FEB_Feedthrough[lArDQGlobals.Partitions[subdet*2]][0] - 0.5
125 ft_up = lArDQGlobals.FEB_Feedthrough[lArDQGlobals.Partitions[subdet*2]][1] + 0.5
126 ft_n =
int(ft_up - ft_low)
128 darray = helper.addArray([lArDQGlobals.Partitions[2*subdet:2*subdet+2]],larNoisyROMonAlg,lArDQGlobals.SubDet[subdet],topPath=
'/')
131 darray.defineHistogram(
'slotBad,FTBad;KnownBadFEB', title=
'Known Bad FEBs {0} ; Slot ; FT',
132 type=
'TH2I', path=hist_path,
133 xbins=slot_n,xmin=slot_low,xmax=slot_up,
134 ybins=ft_n, ymin=ft_low, ymax=ft_up,
137 darray.defineHistogram(
'slotMNB,FTMNB;MNBKnownFEB', title=
'Known MNB FEBs {0} ; Slot ; FT',
138 type=
'TH2I', path=hist_path,
139 xbins=slot_n,xmin=slot_low,xmax=slot_up,
140 ybins=ft_n, ymin=ft_low, ymax=ft_up,
144 darray.defineHistogram(
'slotNoisy,FTNoisy;NoisyFEBPerEvt', title=
'Yield of events with {0} FEB noisy -'+NoisyFEBDefStr+
' (only vetoed events) ; Slot ; FT',
145 type=
'TH2I', path=hist_path,
146 xbins=slot_n,xmin=slot_low,xmax=slot_up,
147 ybins=ft_n, ymin=ft_low, ymax=ft_up)
149 darray.defineHistogram(
'slotTight,FTTight;MNBTightFEBPerEvt', title=
'Yield of events with {0} FEB noisy -'+MNBTightFEBDefStr+
' (only vetoed events) ; Slot ; FT',
150 type=
'TH2I', path=hist_path,
151 xbins=slot_n,xmin=slot_low,xmax=slot_up,
152 ybins=ft_n, ymin=ft_low, ymax=ft_up)
154 darray.defineHistogram(
'slotTightCan,FTTightCan;CandidateMNBTightFEBPerEvt', title=
'Yield of events with {0} FEB noisy -'+MNBTightFEBDefStr+
' (only vetoed events) ; Slot ; FT',
155 type=
'TH2I', path=hist_path,
156 xbins=slot_n,xmin=slot_low,xmax=slot_up,
157 ybins=ft_n, ymin=ft_low, ymax=ft_up)
159 darray.defineHistogram(
'slot_PsVetoTight,FT_PsVetoTight;MNBTight_PsVetoFEBPerEvt', title=
'Yield of events with {0} FEB noisy -'+MNBTight_PsVetoFEBDefStr+
' (only vetoed events) ; Slot ; FT',
160 type=
'TH2I', path=hist_path,
161 xbins=slot_n,xmin=slot_low,xmax=slot_up,
162 ybins=ft_n, ymin=ft_low, ymax=ft_up)
164 darray.defineHistogram(
'slot_PsVetoTightCan,FT_PsVetoTightCan;CandidateMNBTight_PsVetoFEBPerEvt', title=
'Yield of events with {0} FEB noisy -'+MNBTight_PsVetoFEBDefStr+
' (only vetoed events) ; Slot ; FT',
165 type=
'TH2I', path=hist_path,
166 xbins=slot_n,xmin=slot_low,xmax=slot_up,
167 ybins=ft_n, ymin=ft_low, ymax=ft_up)
169 darray.defineHistogram(
'slotLoose,FTLoose;MNBLooseFEBPerEvt', title=
'Yield of events with {0} FEB noisy -'+MNBLooseFEBDefStr+
' (only vetoed events) ; Slot ; FT',
170 type=
'TH2I', path=hist_path,
171 xbins=slot_n,xmin=slot_low,xmax=slot_up,
172 ybins=ft_n, ymin=ft_low, ymax=ft_up)
174 darray.defineHistogram(
'slotLooseCan,FTLooseCan;CandidateMNBLooseFEBPerEvt', title=
'Yield of events with {0} FEB noisy -'+MNBLooseFEBDefStr+
' (only vetoed events) ; Slot ; FT',
175 type=
'TH2I', path=hist_path,
176 xbins=slot_n,xmin=slot_low,xmax=slot_up,
177 ybins=ft_n, ymin=ft_low, ymax=ft_up)
180 darray.defineHistogram(
'LBStd;NoisyEvent',type=
'TH1I', path=hist_path,
181 title=
'Yield of events flagged as RNB-Standard - {0} ; Luminosity Block; Number of events',
182 xbins=lArDQGlobals.LB_Bins,xmin=lArDQGlobals.LB_Min,xmax=lArDQGlobals.LB_Max)
184 darray.defineHistogram(
'LBSat;SaturatedNoisyEvent',type=
'TH1I', path=hist_path,
185 title=
'Yield of events flagged as RNB-Saturated - {0} ; Luminosity Block',
186 xbins=lArDQGlobals.LB_Bins,xmin=lArDQGlobals.LB_Min,xmax=lArDQGlobals.LB_Max)
188 darray.defineHistogram(
'LBMNBTight;MNBTightEvent',type=
'TH1I', path=hist_path,
189 title=
'Yield of events flagged as MNB-Tight - {0} ; Luminosity Block',
190 xbins=lArDQGlobals.LB_Bins,xmin=lArDQGlobals.LB_Min,xmax=lArDQGlobals.LB_Max)
192 darray.defineHistogram(
'LBMNBTight_PsVeto;MNBTight_PsVetoEvent',type=
'TH1I', path=hist_path,
193 title=
'Yield of events flagged as MNB-Tight_PsVeto - {0} ; Luminosity Block',
194 xbins=lArDQGlobals.LB_Bins,xmin=lArDQGlobals.LB_Min,xmax=lArDQGlobals.LB_Max)
196 darray.defineHistogram(
'LBMNBLoose;MNBLooseEvent',type=
'TH1I', path=hist_path,
197 title=
'Yield of events flagged as MNB-Loose - {0} ; Luminosity Block',
198 xbins=lArDQGlobals.LB_Bins,xmin=lArDQGlobals.LB_Min,xmax=lArDQGlobals.LB_Max)
201 darray.defineHistogram(
'LBStd_Veto;NoisyEvent_TimeVeto',type=
'TH1I', path=hist_path,
202 title=
'Yield of events flagged as RNB-Standard not vetoed by time window - {0} ; Luminosity Block',
203 xbins=lArDQGlobals.LB_Bins,xmin=lArDQGlobals.LB_Min,xmax=lArDQGlobals.LB_Max)
205 darray.defineHistogram(
'LBSat_Veto;SaturatedNoisyEvent_TimeVeto',type=
'TH1I', path=hist_path,
206 title=
'Yield of events flagged as RNB-Saturated not vetoed by time window - {0} ; Luminosity Block',
207 xbins=lArDQGlobals.LB_Bins,xmin=lArDQGlobals.LB_Min,xmax=lArDQGlobals.LB_Max)
209 darray.defineHistogram(
'LBMNBTight_Veto;MNBTightEvent_TimeVeto',type=
'TH1I', path=hist_path,
210 title=
'Yield of events flagged as MNB-Tight not vetoed by time window - {0} ; Luminosity Block',
211 xbins=lArDQGlobals.LB_Bins,xmin=lArDQGlobals.LB_Min,xmax=lArDQGlobals.LB_Max)
213 darray.defineHistogram(
'LBMNBTight_PsVeto_Veto;MNBTight_PsVetoEvent_TimeVeto',type=
'TH1I', path=hist_path,
214 title=
'Yield of events flagged as MNB-Tight_PsVeto not vetoed by time window - {0} ; Luminosity Block',
215 xbins=lArDQGlobals.LB_Bins,xmin=lArDQGlobals.LB_Min,xmax=lArDQGlobals.LB_Max)
217 darray.defineHistogram(
'LBMNBLoose_Veto;MNBLooseEvent_TimeVeto',type=
'TH1I', path=hist_path,
218 title=
'Yield of events flagged as MNB-Loose not vetoed by time window - {0} ; Luminosity Block',
219 xbins=lArDQGlobals.LB_Bins,xmin=lArDQGlobals.LB_Min,xmax=lArDQGlobals.LB_Max)
222 if larNoisyROMonAlg.doTrigger:
223 siz=len(larNoisyROMonAlg.EFNoiseBurstTriggers)
224 darray.defineHistogram(
'Triggers;NoisyEventTrigger',type=
'TH1I', path=hist_path,
225 title=
'Trigger fired for RNB flagged events - {0} ; Special trigger fired',
226 xbins=siz+1,xmin=0.5,xmax=siz+1.5,
227 xlabels=larNoisyROMonAlg.EFNoiseBurstTriggers.append(
"NONE"))
229 l1siz=len(larNoisyROMonAlg.L1NoiseBurstTriggers)
230 darray.defineHistogram(
'L1Triggers;NoisyEventL1Term',type=
'TH1I', path=hist_path,
231 title=
'L1 term fired for RNB flagged events - {0} ; Special trigger fired',
232 xbins=l1siz+1,xmin=0.5,xmax=l1siz+1.5,
233 xlabels=larNoisyROMonAlg.L1NoiseBurstTriggers.append(
"NONE"))
235 cfg.merge(helper.result())