iceberg_dataprep_tools.fcl
Go to the documentation of this file.
1 # iceberg_dataprep_tools.fcl
2 #
3 # David Adams
4 # March 2020
5 #
6 # Define iceberg tools.
7 
8 # Include protodune_dataprep_tools before this.
9 check_have_protodune_dataprep_tools: @local::have_protodune_dataprep_tools
10 
11 ################################################################################
12 # Shared data.
13 ################################################################################
14 
15 data.ib_tpsChannelRanges: [tps0]
16 data.ib_ClockUnit: "Mtick"
17 data.ib_TriggerClockRate: 50000000.0
18 data.ib_Tick0: 500
19 
20 tools.tickRanges.plotTicks.begin: 0
21 tools.tickRanges.plotTicks.end: 2000
22 
23 ################################################################################
24 # Channel mapping.
25 ################################################################################
26 
27 tools.channelRangesIceberg: {
28  tool_type: HalfApaChannelRanges
29  LogLevel: 0
30  ApaNumbers: [1]
31  ApaLocationNames: ["Iceberg"]
32  ExtraRanges: ""
33 }
34 
35 tools.channelGroupsIceberg: {
36  tool_type: ApaChannelGroups
37  LogLevel: 0
38  ApaNumbers: []
39  IndexRangeTool: channelRanges
40 }
41 
42 tools.channelRanges: @local::tools.channelRangesIceberg
43 tools.channelGroups: @local::tools.channelGroupsIceberg
44 
45 tools.ib_onlineChannelMapByFemb: {
46  tool_type: IcebergOnlineChannel
47  LogLevel: 1
48  Ordering: "FEMB"
49 }
50 
51 ################################################################################
52 # Reco.
53 ################################################################################
54 
55 # Scale ke to ADC
56 tools.adcScaleKeToAdc.ScaleFactor: 41.442 # 24.13 e/ADC/ticks
57 
58 # Fit ADC distribution to get pedestal.
59 tools.ib3_adcPedestalFit: @local::tools.pd_adcPedestalFit
60 tools.ib3_adcPedestalFit.FitRmsMin: 1.0
61 
62 # Pedestal fitter for Iceberg 4 (COTS ADC, no sticky codes)
63 tools.ib4_adcPedestalFit: {
64  tool_type: AdcPedestalFitter
65  LogLevel: 1
66  AdcRange: 4096
67  SkipFlags: [8, 9, 10, 11, 12]
68  AdcFitRange: 100
69  FitOpt: 3
70  FitPrecision: 1.0
71  FitRmsMin: 0.5
72  FitRmsMax: 10.0
73  RemoveStickyCode: false
74  HistName: "adcped_ev%0EVENT%_ch%0CHAN%"
75  HistTitle: "ADC pedestal fit for run %RUN% event %EVENT% channel %CHAN%"
76  PlotFileName: ""
77  RootFileName: ""
78  HistManager: ""
79  PlotSizeX: 0
80  PlotSizeY: 0
81  PlotSplitX: 0
82  PlotSplitY: 0
83  PlotShowFit: 1
84 }
85 
86 # Pedestal fitters for Iceberg 5 (14-bit ADC, no sticky codes)
87 tools.ib5_adcPedestalFit: { tool_type: PleaseDefine_ib5_adcPedestalFit }
88 
89 # Config with conditions data.
90 tools.ib5cond_adcPedestalFit: @local::tools.ib4_adcPedestalFit
91 tools.ib5cond_adcPedestalFit.AdcRange: "16384"
92 tools.ib5cond_adcPedestalFit.AdcFitRange: "100*(1+int(0.01*[gain]))"
93 tools.ib5cond_adcPedestalFit.FitRmsMin: "0.5*[gain]"
94 tools.ib5cond_adcPedestalFit.FitRmsMax: "10.0*[gain]"
95 
96 # Period B
97 tmp.pedestalFitTemplate: @local::tools.ib4_adcPedestalFit
98 tmp.pedestalFitTemplate.AdcRange: 16384
99 tools.ib5B00_adcPedestalFit: @local::tmp.pedestalFitTemplate
100 tools.ib5B01_adcPedestalFit: @local::tmp.pedestalFitTemplate
101 tools.ib5B02_adcPedestalFit: @local::tmp.pedestalFitTemplate
102 tools.ib5B03_adcPedestalFit: @local::tmp.pedestalFitTemplate
103 tools.ib5B10_adcPedestalFit: @local::tmp.pedestalFitTemplate
104 tools.ib5B11_adcPedestalFit: @local::tmp.pedestalFitTemplate
105 tools.ib5B12_adcPedestalFit: @local::tmp.pedestalFitTemplate
106 tools.ib5B13_adcPedestalFit: @local::tmp.pedestalFitTemplate
107 tools.ib5B20_adcPedestalFit: @local::tmp.pedestalFitTemplate
108 tools.ib5B21_adcPedestalFit: @local::tmp.pedestalFitTemplate
109 tools.ib5B22_adcPedestalFit: @local::tmp.pedestalFitTemplate
110 tools.ib5B23_adcPedestalFit: @local::tmp.pedestalFitTemplate
111 tools.ib5B30_adcPedestalFit: @local::tmp.pedestalFitTemplate
112 tools.ib5B31_adcPedestalFit: @local::tmp.pedestalFitTemplate
113 tools.ib5B32_adcPedestalFit: @local::tmp.pedestalFitTemplate
114 tools.ib5B33_adcPedestalFit: @local::tmp.pedestalFitTemplate
115 tmp.pedestalFitTemplate: @erase
116 # Fit ranges
117 tools.ib5B00_adcPedestalFit.AdcFitRange: 100
118 tools.ib5B01_adcPedestalFit.AdcFitRange: 100
119 tools.ib5B02_adcPedestalFit.AdcFitRange: 100
120 tools.ib5B03_adcPedestalFit.AdcFitRange: 100
121 tools.ib5B10_adcPedestalFit.AdcFitRange: 100
122 tools.ib5B11_adcPedestalFit.AdcFitRange: 100
123 tools.ib5B12_adcPedestalFit.AdcFitRange: 100
124 tools.ib5B13_adcPedestalFit.AdcFitRange: 200
125 tools.ib5B20_adcPedestalFit.AdcFitRange: 100
126 tools.ib5B21_adcPedestalFit.AdcFitRange: 100
127 tools.ib5B22_adcPedestalFit.AdcFitRange: 200
128 tools.ib5B23_adcPedestalFit.AdcFitRange: 300
129 tools.ib5B30_adcPedestalFit.AdcFitRange: 100
130 tools.ib5B31_adcPedestalFit.AdcFitRange: 200
131 tools.ib5B32_adcPedestalFit.AdcFitRange: 300
132 tools.ib5B33_adcPedestalFit.AdcFitRange: 400
133 # Fit mins
134 tools.ib5B00_adcPedestalFit.FitRmsMin: 0.3
135 tools.ib5B01_adcPedestalFit.FitRmsMin: 0.6
136 tools.ib5B02_adcPedestalFit.FitRmsMin: 1.2
137 tools.ib5B03_adcPedestalFit.FitRmsMin: 1.8
138 tools.ib5B10_adcPedestalFit.FitRmsMin: 0.5
139 tools.ib5B11_adcPedestalFit.FitRmsMin: 1.0
140 tools.ib5B12_adcPedestalFit.FitRmsMin: 2.0
141 tools.ib5B13_adcPedestalFit.FitRmsMin: 3.0
142 tools.ib5B20_adcPedestalFit.FitRmsMin: 0.9
143 tools.ib5B21_adcPedestalFit.FitRmsMin: 1.8
144 tools.ib5B22_adcPedestalFit.FitRmsMin: 3.5
145 tools.ib5B23_adcPedestalFit.FitRmsMin: 5.0
146 tools.ib5B30_adcPedestalFit.FitRmsMin: 1.5
147 tools.ib5B31_adcPedestalFit.FitRmsMin: 3.0
148 tools.ib5B32_adcPedestalFit.FitRmsMin: 6.0
149 tools.ib5B33_adcPedestalFit.FitRmsMin: 10.0
150 # Fit maxs
151 tools.ib5B00_adcPedestalFit.FitRmsMax: 12
152 tools.ib5B01_adcPedestalFit.FitRmsMax: 24
153 tools.ib5B02_adcPedestalFit.FitRmsMax: 48
154 tools.ib5B03_adcPedestalFit.FitRmsMax: 72
155 tools.ib5B10_adcPedestalFit.FitRmsMax: 20
156 tools.ib5B11_adcPedestalFit.FitRmsMax: 40
157 tools.ib5B12_adcPedestalFit.FitRmsMax: 80
158 tools.ib5B13_adcPedestalFit.FitRmsMax: 120
159 tools.ib5B20_adcPedestalFit.FitRmsMax: 35
160 tools.ib5B21_adcPedestalFit.FitRmsMax: 70
161 tools.ib5B22_adcPedestalFit.FitRmsMax: 140
162 tools.ib5B23_adcPedestalFit.FitRmsMax: 400
163 tools.ib5B30_adcPedestalFit.FitRmsMax: 150
164 tools.ib5B31_adcPedestalFit.FitRmsMax: 300
165 tools.ib5B32_adcPedestalFit.FitRmsMax: 500
166 tools.ib5B33_adcPedestalFit.FitRmsMax: 800
167 # Periods a-q
168 tools.ib5a_adcPedestalFit: @local::tools.ib5B01_adcPedestalFit
169 tools.ib5b_adcPedestalFit: @local::tools.ib5B22_adcPedestalFit
170 tools.ib5c_adcPedestalFit: @local::tools.ib5B22_adcPedestalFit
171 tools.ib5d_adcPedestalFit: @local::tools.ib5B21_adcPedestalFit
172 tools.ib5e_adcPedestalFit: @local::tools.ib5B23_adcPedestalFit
173 tools.ib5f_adcPedestalFit: @local::tools.ib5B22_adcPedestalFit
174 tools.ib5g_adcPedestalFit: @local::tools.ib5B01_adcPedestalFit
175 tools.ib5h_adcPedestalFit: @local::tools.ib5B12_adcPedestalFit
176 tools.ib5i_adcPedestalFit: @local::tools.ib5B32_adcPedestalFit
177 tools.ib5j_adcPedestalFit: @local::tools.ib5B20_adcPedestalFit
178 tools.ib5k_adcPedestalFit: @local::tools.ib5B22_adcPedestalFit
179 tools.ib5l_adcPedestalFit: @local::tools.ib5B31_adcPedestalFit
180 tools.ib5m_adcPedestalFit: @local::tools.ib5B33_adcPedestalFit
181 tools.ib5n_adcPedestalFit: @local::tools.ib5B11_adcPedestalFit
182 tools.ib5o_adcPedestalFit: @local::tools.ib5B13_adcPedestalFit
183 tools.ib5p_adcPedestalFit: @local::tools.ib5B22_adcPedestalFit
184 tools.ib5q_adcPedestalFit: @local::tools.ib5B21_adcPedestalFit
185 
186 # Sticky code mitigation.
187 tools.ib_adcMitigate: {
188  tool_type: AdcCodeMitigator
189  LogLevel: 1
190  FixFlags: []
191  InterpolateFlags: [8, 9, 10, 11, 12]
192  SkipFlags: []
193  FixedCurvThresh: 20.0
194 }
195 
196 # Fill sample and apply calibration for iceberg3.
197 tools.ib3SampleCalibration: {
198  tool_type: FloatArrayGainCalibration
199  LogLevel: 1
200  Unit: "ke/tick"
201  GainDefault: 0.0
202  AdcUnderflowDefault: 0
203  AdcOverflowDefault: 4095
204  GainTool: "areaGain_ib3"
205  ScaleFactor: "1.0"
206 }
207 
208 # Fill sample and apply calibration for iceberg4.
209 tools.ib4SampleCalibration: {
210  tool_type: FloatArrayGainCalibration
211  LogLevel: 1
212  Unit: "ke/tick"
213  GainDefault: 0.0
214  AdcUnderflowDefault: 0
215  AdcOverflowDefault: 4095
216  GainTool: "areaGain_ib4"
217  ScaleFactor: "1.0"
218 }
219 
220 # Fill sample and apply calibration for iceberg5
221 # for user-specified calibration array.
222 # Caller must set areaGain_ib5 to the desired calibration array.
223 tools.ib5RunPeriodSampleCalibration: {
224  tool_type: FloatArrayGainCalibration
225  LogLevel: 1
226  Unit: "ke/tick"
227  GainDefault: -1.0
228  AdcUnderflowDefault: 0
229  AdcOverflowDefault: 16383
230  GainTool: "areaGain_ib5"
231  ScaleFactor: "1.0"
232 }
233 
234 # Fill sample and apply calibration for iceberg5
235 # using the same conditions-based gain for all channels.
236 tools.ib5CondSVSampleCalibration: {
237  tool_type: FloatArrayGainCalibration
238  LogLevel: 1
239  Unit: "ke/tick"
240  GainDefault: "([run]<8198||[run]>9743)?0.0:([run]<8951?0.2201:0.1927)/[gain]/[shaping]"
241  AdcUnderflowDefault: 0
242  AdcOverflowDefault: 16383
243  GainTool: ""
244  ScaleFactor: "1.0"
245 }
246 
247 tools.ib5SampleCalibration: "Please_define_tool_ib5SampleCalibration"
248 
249 #############################################################
250 # Fill sample and apply calibration for iceberg5
251 # for user-specified calibration array.
252 # Caller must set areaGain_ib5 to the desired calibration array.
253 tools.ib5RunPeriodSampleCalibration: {
254  tool_type: FloatArrayGainCalibration
255  LogLevel: 1
256  Unit: "ke/tick"
257  GainDefault: -1.0
258  AdcUnderflowDefault: 0
259  AdcOverflowDefault: 16383
260  GainTool: "areaGain_ib5"
261  ScaleFactor: "1.0"
262 }
263 
264 #############################################################
265 
266 # Signal finder to use with tail removal.
267 tools.ib3TailSignalFinderAdc: {
268  tool_type: AdcThresholdSignalFinder
269  LogLevel: 1
270  Threshold: "15.0"
271  BinsBefore: 10
272  BinsAfter: 20
273  FlagPositive: true
274  FlagNegative: true
275 }
276 
277 tools.ib3TailRemovalAdc: {
278  tool_type: ExpTailRemover
279  LogLevel: 1
280  DecayTime: 2000
281  SignalFlag: 3
282  SignalIterationLimit: 10
283  SignalTool: adcTailSignalFinderAdc
284  IncludeChannelRanges: ["apaz1", "apaz2"]
285  ExcludeChannelRanges: []
286 }
287 
288 tools.ib3TailSignalFinderKe: @local::tools.ib3TailSignalFinderAdc
289 tools.ib3TailSignalFinderKe.Threshold: 0.4
290 
291 tools.ib3TailRemovalKe: @local::tools.ib3TailRemovalAdc
292 tools.ib3TailRemovalKe.SignalTool: ib3TailSignalFinderKe
293 
294 # Tail+ped removal 2020.
295 tools.ib4TailPedRemovalZKe: {
296  tool_type: ExpTailPedRemover
297  LogLevel: 1
298  DecayTime: 2000
299  SignalFlag: 3
300  SignalIterationLimit: 10
301  SignalTool: ib3TailSignalFinderKe
302  MaxTick: 2000
303  PedDegree: 1 # 1 ==> linear variation in pedestal
304  PedTick0: 1000
305  PedFreqs: []
306  NoWarnStatuses: [1, 2]
307  IncludeChannelRanges: ["apaz"]
308  ExcludeChannelRanges: []
309 }
310 
311 tools.ib4TailPedRemovalIKe: @local::tools.ib4TailPedRemovalZKe
312 tools.ib4TailPedRemovalIKe.DecayTime: 6000
313 tools.ib4TailPedRemovalIKe.IncludeChannelRanges: ["apai"]
314 
315 tools.ib4PedRemovalIKe: @local::tools.ib4TailPedRemovalIKe
316 tools.ib4PedRemovalIKe.DecayTime: 0
317 
318 # Iceberg 5 Conditions-based threshold for an area-calibrated signal.
319 tools.ib5CondTailPedSignalFinderKe: @local::tools.ib3TailSignalFinderKe
320 tools.ib5CondTailPedSignalFinderKe.BinsBefore: 20
321 tools.ib5CondTailPedSignalFinderKe.BinsAfter: 30
322 tools.ib5CondTailPedSignalFinderKe.Threshold: "0.6/[shaping]"
323 
324 ############# Obsolete below ###############
325 
326 # Tail/pedestal signal finders for Iceberg 5.
327 # Iceberg 5 ped/tail signal finder for periods b, c, f (14 mV/fC, 2.0 us).
328 tools.ib5TailPedSignalFinderKe: @local::tools.ib3TailSignalFinderKe
329 tools.ib5TailPedSignalFinderKe.BinsBefore: 20
330 tools.ib5TailPedSignalFinderKe.BinsAfter: 30
331 tools.ib5TailPedSignalFinderKe.Threshold: 0.3
332 
333 tools.ib5aTailPedSignalFinder: @local::tools.ib5TailPedSignalFinderKe
334 tools.ib5bTailPedSignalFinder: @local::tools.ib5TailPedSignalFinderKe
335 tools.ib5cTailPedSignalFinder: @local::tools.ib5TailPedSignalFinderKe
336 tools.ib5dTailPedSignalFinder: @local::tools.ib5TailPedSignalFinderKe
337 tools.ib5eTailPedSignalFinder: @local::tools.ib5TailPedSignalFinderKe
338 tools.ib5fTailPedSignalFinder: @local::tools.ib5TailPedSignalFinderKe
339 tools.ib5gTailPedSignalFinder: @local::tools.ib5TailPedSignalFinderKe
340 tools.ib5hTailPedSignalFinder: @local::tools.ib5TailPedSignalFinderKe
341 tools.ib5iTailPedSignalFinder: @local::tools.ib5TailPedSignalFinderKe
342 tools.ib5jTailPedSignalFinder: @local::tools.ib5TailPedSignalFinderKe
343 tools.ib5kTailPedSignalFinder: @local::tools.ib5TailPedSignalFinderKe
344 tools.ib5lTailPedSignalFinder: @local::tools.ib5TailPedSignalFinderKe
345 tools.ib5mTailPedSignalFinder: @local::tools.ib5TailPedSignalFinderKe
346 tools.ib5nTailPedSignalFinder: @local::tools.ib5TailPedSignalFinderKe
347 tools.ib5oTailPedSignalFinder: @local::tools.ib5TailPedSignalFinderKe
348 tools.ib5pTailPedSignalFinder: @local::tools.ib5TailPedSignalFinderKe
349 tools.ib5qTailPedSignalFinder: @local::tools.ib5TailPedSignalFinderKe
350 tools.ib5C00TailPedSignalFinder: @local::tools.ib5TailPedSignalFinderKe
351 tools.ib5C01TailPedSignalFinder: @local::tools.ib5TailPedSignalFinderKe
352 tools.ib5C02TailPedSignalFinder: @local::tools.ib5TailPedSignalFinderKe
353 tools.ib5C03TailPedSignalFinder: @local::tools.ib5TailPedSignalFinderKe
354 tools.ib5C10TailPedSignalFinder: @local::tools.ib5TailPedSignalFinderKe
355 tools.ib5C11TailPedSignalFinder: @local::tools.ib5TailPedSignalFinderKe
356 tools.ib5C12TailPedSignalFinder: @local::tools.ib5TailPedSignalFinderKe
357 tools.ib5C13TailPedSignalFinder: @local::tools.ib5TailPedSignalFinderKe
358 tools.ib5C20TailPedSignalFinder: @local::tools.ib5TailPedSignalFinderKe
359 tools.ib5C21TailPedSignalFinder: @local::tools.ib5TailPedSignalFinderKe
360 tools.ib5C22TailPedSignalFinder: @local::tools.ib5TailPedSignalFinderKe
361 tools.ib5C23TailPedSignalFinder: @local::tools.ib5TailPedSignalFinderKe
362 tools.ib5C30TailPedSignalFinder: @local::tools.ib5TailPedSignalFinderKe
363 tools.ib5C31TailPedSignalFinder: @local::tools.ib5TailPedSignalFinderKe
364 tools.ib5C32TailPedSignalFinder: @local::tools.ib5TailPedSignalFinderKe
365 tools.ib5C33TailPedSignalFinder: @local::tools.ib5TailPedSignalFinderKe
366 
367 tools.ib5aTailPedSignalFinder.Threshold: 0.6
368 tools.ib5bTailPedSignalFinder.Threshold: 0.3
369 tools.ib5cTailPedSignalFinder.Threshold: 0.3
370 tools.ib5dTailPedSignalFinder.Threshold: 0.6
371 tools.ib5eTailPedSignalFinder.Threshold: 0.2
372 tools.ib5fTailPedSignalFinder.Threshold: 0.3
373 tools.ib5gTailPedSignalFinder.Threshold: 0.3
374 tools.ib5hTailPedSignalFinder.Threshold: 0.3
375 tools.ib5iTailPedSignalFinder.Threshold: 0.3
376 tools.ib5jTailPedSignalFinder.Threshold: 1.2
377 tools.ib5kTailPedSignalFinder.Threshold: 0.3
378 tools.ib5lTailPedSignalFinder.Threshold: 0.6
379 tools.ib5mTailPedSignalFinder.Threshold: 0.2
380 tools.ib5nTailPedSignalFinder.Threshold: 0.6
381 tools.ib5oTailPedSignalFinder.Threshold: 0.2
382 tools.ib5pTailPedSignalFinder.Threshold: 0.3
383 tools.ib5qTailPedSignalFinder.Threshold: 0.6
384 tools.ib5C00TailPedSignalFinder.Threshold: 1.2
385 tools.ib5C01TailPedSignalFinder.Threshold: 0.6
386 tools.ib5C02TailPedSignalFinder.Threshold: 0.3
387 tools.ib5C03TailPedSignalFinder.Threshold: 0.2
388 tools.ib5C10TailPedSignalFinder.Threshold: 1.2
389 tools.ib5C11TailPedSignalFinder.Threshold: 0.6
390 tools.ib5C12TailPedSignalFinder.Threshold: 0.3
391 tools.ib5C13TailPedSignalFinder.Threshold: 0.2
392 tools.ib5C20TailPedSignalFinder.Threshold: 1.2
393 tools.ib5C21TailPedSignalFinder.Threshold: 0.6
394 tools.ib5C22TailPedSignalFinder.Threshold: 0.3
395 tools.ib5C23TailPedSignalFinder.Threshold: 0.2
396 tools.ib5C30TailPedSignalFinder.Threshold: 1.2
397 tools.ib5C31TailPedSignalFinder.Threshold: 0.6
398 tools.ib5C32TailPedSignalFinder.Threshold: 0.3
399 tools.ib5C33TailPedSignalFinder.Threshold: 0.2
400 
401 # Force high level fcl to set this.
402 tools.ib5TailPedSignalFinder: { tool_type: PleaseDefine_ib5TailPedSignalFinder }
403 
404 ############# Obsolete above ###############
405 
406 # Pedestal removal for iceberg 5.
407 # We expect no tails. For all planes.
408 tools.ib5PedRemoval: @local::tools.ib4TailPedRemovalZKe
409 tools.ib5PedRemoval.PedDegree: 0
410 tools.ib5PedRemoval.IncludeChannelRanges: []
411 tools.ib5PedRemoval.MaxTick: 2184
412 tools.ib5PedRemoval.SignalTool: ib5CondTailPedSignalFinderKe
413 
414 # Remove coherent noise (not high frequency noise) with local
415 # ROI finding at ADC scale.
416 tools.ibNoiseRemovalAdc: {
417  tool_type: PdspNoiseRemoval
418  LogLevel: 1
419  RemoveHighFrequency: false
420  RemoveCoherent: true
421  CutoffFrequency: 400 # cutoff frequency in kHz for Butterworth low-pass filter
422  CorrMode: "median" # mean or median waveform for coherent noise determination
423  CoherentOffline16: false # remove coherent noise for every 16 offline channels
424  CoherentOffline16Groups: [] # remove coherent noise for all groups if list is empty
425  CoherentDaq8: false # remove coherent noise for every 8 online DAQ channels on the same ASIC
426  CoherentDaq8Groups: [] # remove coherent noise for all groups if list is empty
427  CoherentDaq16: false # remove coherent noise for every 16 online DAQ channels on the same chip
428  CoherentDaq16Groups: [] # remove coherent noise for all groups if list is empty
429  CoherentFEMB128: true # remove coherent noise for every 128 online DAQ channels on the same FEMB
430  CoherentFEMB128Groups: [] # remove coherent noise for all groups if list is empty
431  UseBasicROIForCNR: true # use simple threshold ROI finder
432  RoiStartThreshold: 20 # threshold on the leading edge
433  RoiEndThreshold: 20 # threshold on the trailing edge
434  RoiPadLow: 8 # low bin extension
435  RoiPadHigh: 20 # high bin extension
436 }
437 
438 # Remove coherent noise and high frequency noise with local
439 # ROI finding at ke scale.
440 tools.ibNoiseRemovalKe: @local::tools.ibNoiseRemovalAdc
441 tools.ibNoiseRemovalKe.RoiStartThreshold: 0.4
442 tools.ibNoiseRemovalKe.RoiEndThreshold: 0.4
443 
444 # Remove coherent noise and high frequency noise with ROIs taken from data.
445 tools.ibNoiseRemovalData: @local::tools.ibNoiseRemovalKe
446 tools.ibNoiseRemovalData.UseBasicROIForCNR: false
447 
448 ################################################################################
449 # ADC channel-tick plots for Iceberg.
450 ################################################################################
451 
452 ibcht_template: @local::pdcht_template
453 ibcht_template.PlotSizeY: 900
454 ibcht_template.TickRebin: 2
455 ibcht_template.HistTitle: "Raw ADC for Iceberg %CRLABEL%"
456 ibcht_template.PlotTitle: "Run %RUN% event %EVENT% %UTCTIME2% UTC"
457 
458 # One plot for the full APA.
459 tools.ibcht_Apas: @local::ibcht_template
460 tools.ibcht_Apas.ChannelRanges: [apa]
461 tools.ibcht_Apas.ChannelLinePattern: [400, 800, 1050]
462 tools.ibcht_Apas.HistTitle: "Raw ADC for Iceberg"
463 #tools.ibcht_Apas.PlotSizeY: 1600
464 
465 # One plot for each Z-plane.
466 tools.ibcht_Zplanes: @local::ibcht_template
467 tools.ibcht_Zplanes.ChannelRanges: [apaz1, apaz2]
468 tools.ibcht_Zplanes.ChannelLineModulus: 1280
469 tools.ibcht_Zplanes.ChannelLinePattern: [ 848, 896, 944, 992, 1040, 1088, 1136, 1184, 1232]
470 
471 # One plot for both collection planes.
472 tools.ibcht_Xplanes: @local::tools.ibcht_Zplanes
473 tools.ibcht_Xplanes.ChannelRanges: [apaz]
474 tools.ibcht_Xplanes.PlotSizeY: 900
475 
476 # One plot for each induction plane.
477 tools.ibcht_Iplanes: @local::ibcht_template
478 tools.ibcht_Iplanes.ChannelRanges: [apau, apav]
479 tools.ibcht_Iplanes.ChannelLineModulus: 40
480 tools.ibcht_Iplanes.ChannelLinePattern: [0]
481 
482 ################################################################################
483 # Ke-scale channel-tick plots for Iceberg.
484 ################################################################################
485 
486 ibchtke_template: @local::pdcht_template
487 ibchtke_template.HistTitle: "Prepared TPC for Iceberg %CRLABEL%"
488 
489 # One plot for both collection planes.
490 tools.ibchtke_Zplanes: @local::ibchtke_template
491 tools.ibchtke_Zplanes.ChannelRanges: [apaz]
492 tools.ibchtke_Zplanes.PlotSizeY: 900
493 
494 # One plot for each induction plane.
495 tools.ibchtke_Iplanes: @local::ibchtke_template
496 tools.ibchtke_Iplanes.ChannelRanges: [apau, apav]
497 tools.ibchtke_Iplanes.ChannelLineModulus: 40
498 tools.ibchtke_Iplanes.ChannelLinePattern: [0]
499 
500 
501 ################################################################################
502 # Display tools.
503 ################################################################################
504 
505 tools.ibNfemb: {
506  tool_type: AdcEventViewer
507  LogLevel: 2
508  EventHists: ["hnfemb:11:0:11"]
509  EventGraphs: ["event:events:1:nfemb:0:11"]
510  ChannelRanges: []
511  ChannelRangeLabel: "%CRLABEL%"
512  ClockUnit: @local::data.pd_ClockUnit
513  ClockRate: @local::data.pd_TriggerClockRate
514 }
515 
516 ################################################################################
517 # ADC channel metric plotters for Iceberg.
518 ################################################################################
519 
520 ibFembPat: [
521  0, 40, 80, 120, 160, 200, 240, 280, 320, 360,
522  400, 440, 480, 520, 560, 600, 640, 680, 720, 760,
523  800, 848, 896, 944, 992,
524  1040, 1088, 1136, 1184, 1232, 1280
525 ]
526 
527 tools.ibmet_adcChannelPedestalPlotter: @local::tools.pdtps_adcChannelPedestalPlotter
528 tools.ibmet_adcChannelPedestalPlotter.ChannelRanges: [all]
529 tools.ibmet_adcChannelPedestalPlotter.HistTitle: "ADC pedestals for Iceberg run %RUN% event %EVENT%"
530 tools.ibmet_adcChannelPedestalPlotter.ChannelLinePattern: @local::ibFembPat
531 
532 tools.ibmet_adcChannelPedestalNoisePlotter: @local::tools.pdtps_adcChannelPedestalNoisePlotter
533 tools.ibmet_adcChannelPedestalNoisePlotter.ChannelRanges: [all]
534 tools.ibmet_adcChannelPedestalNoisePlotter.HistTitle: "ADC pedestal noise for Iceberg run %RUN% event %EVENT%"
535 tools.ibmet_adcChannelPedestalNoisePlotter.ChannelLinePattern: @local::ibFembPat
536 
537 tools.ibmet_adcChannelOrfPlotter: @local::tools.pdtps_adcChannelOrfPlotter
538 tools.ibmet_adcChannelOrfPlotter.ChannelRanges: [all]
539 tools.ibmet_adcChannelOrfPlotter.HistTitle: "ADC out-of-range fraction for Iceberg run %RUN% event %EVENT%"
540 tools.ibmet_adcChannelOrflPlotter.ChannelLinePattern: @local::ibFembPat
541 
542 tools.ibmet_adcChannelPeakBinExcessPlotter: @local::tools.pdtps_adcChannelPeakBinExcessPlotter
543 tools.ibmet_adcChannelPeakBinExcessPlotter.ChannelRanges: [all]
544 tools.ibmet_adcChannelPeakBinExcessPlotter.HistTitle: "ADC peak bin excess for Iceberg run %RUN% event %EVENT%"
545 tools.ibmet_adcChannelPeakBinExcessPlotter.ChannelLinePattern: @local::ibFembPat
546 
547 tools.ibmet_adcChannelRawRmsPlotter: @local::tools.pdtps_adcChannelRawRmsPlotter
548 tools.ibmet_adcChannelRawRmsPlotter.ChannelRanges: [all]
549 tools.ibmet_adcChannelRawRmsPlotter.HistTitle: "ADC raw RMS for Iceberg run %RUN% event %EVENT%"
550 tools.ibmet_adcChannelRawRmsPlotter.ChannelLinePattern: @local::ibFembPat
551 
552 tools.ibmet_adcChannelRawTailPlotter: @local::tools.pdtps_adcChannelRawTailPlotter
553 tools.ibmet_adcChannelRawTailPlotter.ChannelRanges: [all]
554 tools.ibmet_adcChannelRawTailPlotter.HistTitle: "ADC pedestal tail for Iceberg run %RUN% event %EVENT%"
555 tools.ibmet_adcChannelRawTailPlotter.ChannelLinePattern: @local::ibFembPat
556 
557 tools.ibmet_adcChannelReducedChiSquarePlotter: @local::tools.pdtps_adcChannelReducedChiSquarePlotter
558 tools.ibmet_adcChannelReducedChiSquarePlotter.ChannelRanges: [all]
559 tools.ibmet_adcChanneleducedChiSquareRPlotter.HistTitle: "ADC pedestal #chi^{2}/DOF for Iceberg run %RUN% event %EVENT%"
560 tools.ibmet_adcChannelRReducedChiSquarePlotter.ChannelLinePattern: @local::ibFembPat
561 
562 # Add a plot of UTC (aka GMT, unix time)
563 tools.ibmet_adcChannelUtcPlotter: @local::tools.ibmet_adcChannelPedestalPlotter
564 tools.ibmet_adcChannelUtcPlotter.Metric: "time"
565 tools.ibmet_adcChannelUtcPlotter.MetricMin: 0.0
566 tools.ibmet_adcChannelUtcPlotter.MetricMax: 0.0
567 tools.ibmet_adcChannelUtcPlotter.MetricLabel: "UTC [sec]"
568 #tools.ibmet_adcChannelUtcPlotter.MetricMin: 1527811200 # 2018-06-01
569 #tools.ibmet_adcChannelUtcPlotter.MetricMax: 1843430400 # 2028-06-01
570 tools.ibmet_adcChannelUtcPlotter.Label: "UTC [sec]"
571 tools.ibmet_adcChannelUtcPlotter.HistName: "hchutc%CRNAME%_run%0RUN%_%0EVENT%"
572 tools.ibmet_adcChannelUtcPlotter.HistTitle: "ADC UTC for Iceberg run %RUN% event %EVENT%"
573 tools.ibmet_adcChannelUtcPlotter.PlotFileName: "chmet_utc_%CRNAME%_run%0RUN%.png"
574 
575 # UTC range: (val-error, val+error)
576 tools.ibmet_adcChannelUtcRangePlotter: @local::tools.ibmet_adcChannelUtcPlotter
577 tools.ibmet_adcChannelUtcRangePlotter.MetricSummaryView: "center:halfRange"
578 tools.ibmet_adcChannelUtcRangePlotter.HistTitle: "ADC UTC range for Iceberg run %RUN% event %EVENT%"
579 tools.ibmet_adcChannelUtcRangePlotter.PlotFileName: "chmet_utcran_%CRNAME%_run%0RUN%.{png,tpad}"
580 
581 # -- Noise signal finder plots --
582 
583 # Noise signal finder noise level at ke scale.
584 tools.ibmet_nsfNoise: @local::tools.pdtps_nsfNoise
585 tools.ibmet_nsfNoise.ChannelRanges: [all]
586 tools.ibmet_nsfNoise.ChannelLinePattern: @local::ibFembPat
587 tools.ibmet_nsfNoise.MetricMax: 0.3
588 tools.ibmet_nsfNoise.MetricLabel: "Noise [ke/tick]"
589 
590 # Noise signal finder threshold at ke scale.
591 tools.ibmet_nsfThresh: @local::tools.pdtps_nsfThresh
592 tools.ibmet_nsfThresh.ChannelRanges: [all]
593 tools.ibmet_nsfThresh.ChannelLinePattern: @local::ibFembPat
594 tools.ibmet_nsfThresh.MetricMax: 1.5
595 tools.ibmet_nsfThresh.MetricLabel: "Threshold [ke]"
596 
597 # Noise signal finder signal fraction.
598 tools.ibmet_nsfSigFrac: @local::tools.pdtps_nsfSigFrac
599 tools.ibmet_nsfSigFrac.ChannelRanges: [all]
600 tools.ibmet_nsfSigFrac.ChannelLinePattern: @local::ibFembPat