vdcb_tools.fcl
Go to the documentation of this file.
1 # vdcb_tools.fcl
2 
3 # Dataprep tools for the 2021 vertical detector cold box test.
4 
5 ################################################################################
6 # Shared data.
7 ################################################################################
8 
9 # Flag so other fcl files can check if this file has been included.
10 have_vdcb_dataprep_tools: true
11 
12 data.vdcb_tpsChannelRanges: [cru]
13 data.vdcb_ClockUnit: "Mtick"
14 data.vdcb_TriggerClockRate: 50000000.0
15 data.vdcb_Tick0: 500
16 
17 tools.tickRanges.plotTicks.begin: 0
18 tools.tickRanges.plotTicks.end: 1000
19 
20 tools.tickRanges.plotTicks10000: @local::tools.tickRanges.plotTicks
21 tools.tickRanges.plotTicks10000.end: 10000
22 
23 data.vdcb_fembu:
24  [femb01u, femb02u, femb03u, femb04u, femb05u, femb06u, femb07u, femb08u, femb09u, femb10u, femb11u]
25 data.vdcb_femby:
26  [femb01y, femb02y, femb03y, femb04y, femb11y, femb12y, femb13y]
27 data.vdcb_fembz:
28  [femb04z, femb05z, femb06z, femb07z, femb08z, femb09z, femb10z, femb11z]
29 data.vdcb_fembviews: [@sequence::data.vdcb_fembu, @sequence::data.vdcb_femby, @sequence::data.vdcb_fembz]
30 
31 data.vdbcb_planeBounds: [1600, 1984, 2624]
32 data.vdbcb_fembBounds: [
33  1600, 1632, 1664, 1700, 1738, 1778, 1817, 1856, 1896, 1936, 1975,
34  1984, 2064, 2144, 2236, 2304, 2432, 2560,
35  2624, 2646, 2734, 2823, 1856, 2912, 3000, 3088, 3177, 3200, 3200
36 ]
37 
38 ######### top drift channels #########
39 data.vdtcb_planeBounds: [384, 1024, 1600]
40 data.vdtcb_adaBounds: [
41  64, 128, 192, 256, 320, 384,
42  544, 704, 864, 1024,
43  1152, 1312, 1472
44 ]
45 
46 # channels grouped by adapter boards
47 data.vdcb_adau: [
48  "ADA6_U:0:64", "ADA5_U:64:128", "ADA5_U:128:192",
49  "ADA3_U:192:256", "ADA2_U:256:320", "ADA1_U:320:384"
50 ]
51 data.vdcb_aday: [
52  "ADA7_Y:384:544", "ADA8_Y:544:704",
53  "ADA2_Y:704:864", "ADA1_Y:864:1024"
54 ]
55 data.vdcb_adaz: [
56  "ADA6_Z:1024:1152", "ADA5_Z:1152:1312",
57  "ADA4_Z:1312:1472", "ADA3_Z:1472:1600"
58 ]
59 data.vdcb_adaviews: [@sequence::data.vdcb_adau, @sequence::data.vdcb_aday, @sequence::data.vdcb_adaz]
60 
61 # channels grouped by 32 ch KEL connectors on the adapter boards
62 data.vdcb_kelu: [
63  "KEL39_U:0:32", "KEL36_U:32:64", "KEL33_U:64:96", "KEL29_U:96:128", "KEL26_U:128:160", "KEL22_U:160:192",
64  "KEL19_U:192:224", "KEL16_U:224:256", "KEL13_U:256:288", "KEL9_U:288:320", "KEL6_U:320:352", "KEL2_U:352:384"
65 ]
66 data.vdcb_kely: [
67  "KEL41_Y:384:416", "KEL42_Y:416:448", "KEL43_Y:448:480",
68  "KEL44_Y:480:512", "KEL45_Y:512:544", "KEL46_Y:544:576",
69  "KEL47_Y:576:608", "KEL48_Y:608:640", "KEL49_Y:640:672",
70  "KEL50_Y:672:704", "KEL14_Y:704:736", "KEL12_Y:736:768",
71  "KEL11_Y:768:800", "KEL10_Y:800:832", "KEL8_Y:832:864",
72  "KEL7_Y:864:896", "KEL5_Y:896:928", "KEL4_Y:928:960",
73  "KEL3_Y:960:992", "KEL1_Y:992:1024"
74 ]
75 data.vdcb_kelz: [
76  "KEL40_Z:1024:1056", "KEL38_Z:1056:1088", "KEL37_Z:1088:1120",
77  "KEL35_Z:1120:1152", "KEL34_Z:1152:1184", "KEL32_Z:1184:1216",
78  "KEL31_Z:1216:1248", "KEL30_Z:1248:1280", "KEL28_Z:1280:1312",
79  "KEL27_Z:1312:1344", "KEL25_Z:1344:1376", "KEL24_Z:1376:1408",
80  "KEL23_Z:1408:1440", "KEL21_Z:1440:1472", "KEL20_Z:1472:1504",
81  "KEL18_Z:1504:1536", "KEL17_Z:1536:1568", "KEL15_Z:1568:1600"
82 ]
83 data.vdcb_kelviews: [@sequence::data.vdcb_kelu, @sequence::data.vdcb_kely, @sequence::data.vdcb_kelz]
84 
85 ################################################################################
86 # Templates.
87 ################################################################################
88 
89 # Template for metric plots by readout plane.
90 # Note that the field Metric must be added.
91 tmp.vdbcb_chmet_template: {
92  tool_type: AdcChannelMetric
93  LogLevel: 1
94  DataView: ""
95  PedestalReference: ""
96  MetricSummaryView: "mean:dmean"
97  MetricMin: 0.0
98  MetricMax: 1.0
99  MetricBins: 0
100  ChannelRanges: [crb]
101  ChannelLineModulus: 1600
102  ChannelLinePattern: @local::data.vdbcb_fembBounds
103  ChannelLinePatternSolid: @local::data.vdbcb_planeBounds
104  HistName: ""
105  HistTitle: ""
106  MetricLabel: ""
107  PlotSizeX: 1400
108  PlotSizeY: 500
109  PlotUsesStatus: 1
110  PlotFileName: ""
111  RootFileName: ""
112  MetadataFlags: [write]
113 }
114 
115 ################################################################################
116 # Helpers.
117 ################################################################################
118 
119 ################# Range tools ####################
120 
121 tools.channelRangesVdcb: {
122  tool_type: VDColdboxChannelRanges
123  LogLevel: 0 # To remove noise in pdChannelRange
124  GhostRange: [3200, 3392]
125 }
126 
127 tools.channelGroupsVdcb: {
128  tool_type: VDColdboxChannelGroups
129  LogLevel: 0 # To remove noise in pdChannelRange
130 }
131 
132 tools.onlineChannelMapVdcb: {
133  tool_type: VDColdboxOnlineChannel
134  LogLevel: 1
135 }
136 
137 tools.channelRanges: @local::tools.channelRangesVdcb
138 tools.channelGroups: @local::tools.channelGroupsVdcb
139 
140 ################################################################################
141 # Reco tools.
142 ################################################################################
143 
144 ############## Charge calibration ###################
145 
146 # Scale samples from ke to ADC count for bottom CRU
147 tools.vdbcb_adcScaleAdcToKe: @local::tools.adcScaleAdcToKe
148 tools.vdbcb_adcScaleAdcToKe.ScaleFactor: 0.025
149 tools.vdbcb_adcScaleKeToAdc: @local::tools.adcScaleKeToAdc
150 tools.vdbcb_adcScaleKeToAdc.ScaleFactor: 40.0
151 
152 
153 # Scale samples from ke to ADC count for Top CRU
154 tools.vdtcb_adcScaleAdcToKe: @local::tools.adcScaleAdcToKe
155 tools.vdtcb_adcScaleAdcToKe.ScaleFactor: 0.034
156 tools.vdtcb_adcScaleKeToAdc: @local::tools.adcScaleKeToAdc
157 tools.vdtcb_adcScaleKeToAdc.ScaleFactor: 29.41
158 
159 ################# Noise removal. ####################
160 
161 # Raw RMS for each TPS channel.
162 tools.vdbcb_adcChannelRawRmsFiller: @local::tmp.vdbcb_chmet_template
163 tools.vdbcb_adcChannelRawRmsFiller.Metric: rawRms
164 
165 # Remove only coherent noise (no high frequency filter) and
166 # Set high threshold so no signal is removed.
167 tools.vdbcb_fembNoiseRemovalKePdsp: @local::tools.pdsp_noiseRemovalKe
168 tools.vdbcb_fembNoiseRemovalKePdsp.RemoveHighFrequency: false
169 tools.vdbcb_fembNoiseRemovalKePdsp.UseBasicROIForCNR: true # use simple threshold ROI finder
170 tools.vdbcb_fembNoiseRemovalKePdsp.RoiStartThreshold: 99999 # threshold on the leading edge
171 tools.vdbcb_fembNoiseRemovalKePdsp.RoiEndThreshold: 99999 # threshold on the leading edge
172 
173 #### Bottom ####
174 
175 # Old (no weighting) CNR tool.
176 tools.vdbcb_cnr: {
177  tool_type: CnrByGroup
178  LogLevel: 1
179  Options: ["median"]
180  Groups: @local::data.vdcb_fembviews
181 }
182 
183 # Weighted CNR tool without weighting. To set weight:
184 # tools.vdbcb_cnrw.Weight: myWeights
185 tools.vdbcb_cnrw: {
186  tool_type: CnrGroupWeighted
187  LogLevel: 1
188  Weight: "rawRms"
189  Options: ["median"]
190  Groups: @local::data.vdcb_fembviews
191 }
192 
193 #### Top ####
194 
195 tools.vdtcb_cnr: {
196  tool_type: CnrByGroup
197  LogLevel: 1
198  Options: ["median"]
199  Groups: @local::data.vdcb_kelviews
200 }
201 
202 tools.vdtcb_cnr_ada: {
203  tool_type: CnrByGroup
204  LogLevel: 1
205  Options: ["median"]
206  Groups: @local::data.vdcb_adaviews
207 }
208 
209 ################# Signal finder ####################
210 
211 tools.vdc_thresholdSignalFinder: @local::tools.adcThresholdSignalFinder
212 tools.vdc_thresholdSignalFinder.Threshold: 1.0
213 
214 tools.vdcb_noiseSignalFinder: @local::tools.adcNoiseSignalFinder
215 tools.vdcb_noiseSignalFinder.ThresholdMin: 0.2
216 
217 ################################################################################
218 # Performance tools.
219 ################################################################################
220 
221 ################# Event display ####################
222 
223 tools.cht_vdcb_raw: {
224  tool_type: AdcDataPlotter
225  LogLevel: 1
226  DataType: 1 # 0 for prepared, 1 for raw-pedestal, 2 is signal
227  DataView: ""
228  TickRange: plotTicks
229  TickRebin: 1
230  ChannelRanges: []
231  ClockFactor: 0.0
232  ClockOffset: 12524
233  FembTickOffsets: []
234  MaxSignal: 50
235  SkipChannelStatus: []
236  EmptyColor: 18
237  ChannelLineModulus: 3200
238  ChannelLinePattern: @local::data.vdbcb_fembBounds
239  Palette: 2020
240  HistName: "hadcraw_%CRNAME%_run%0RUN%_evt%0EVENT%"
241  HistTitle: "Pedestal subtracted ADC"
242  PlotTitle: "Run %RUN% event %EVENT% %UTCTIME2% UTC (%TRIGNAME% trigger)"
243  PlotSizeX: 1400
244  PlotSizeY: 1000
245  PlotFileName: "adcraw_%CRNAME%_run%0RUN%_evt%0EVENT%.png"
246  RootFileName: "" # or "adc_evt%EVENT%.root"
247 }
248 
249 tools.cht_vdbcbu_raw: @local::tools.cht_vdcb_raw
250 tools.cht_vdbcbu_raw.ChannelRanges: [crbu]
251 
252 tools.cht_vdbcby_raw: @local::tools.cht_vdcb_raw
253 tools.cht_vdbcby_raw.ChannelRanges: [crby]
254 
255 tools.cht_vdbcbz_raw: @local::tools.cht_vdcb_raw
256 tools.cht_vdbcbz_raw.ChannelRanges: [crbz]
257 
258 tools.cht_vdtcbu_raw: @local::tools.cht_vdcb_raw
259 tools.cht_vdtcbu_raw.ChannelRanges: [crtu]
260 tools.cht_vdtcbu_raw.TickRange: plotTicks10000
261 
262 tools.cht_vdtcby_raw: @local::tools.cht_vdcb_raw
263 tools.cht_vdtcby_raw.ChannelRanges: [crty]
264 tools.cht_vdtcby_raw.TickRange: plotTicks10000
265 
266 tools.cht_vdtcbz_raw: @local::tools.cht_vdcb_raw
267 tools.cht_vdtcbz_raw.ChannelRanges: [crtz]
268 tools.cht_vdtcbz_raw.TickRange: plotTicks10000
269 
270 # Prepared data.
271 tools.cht_vdcb_prp: @local::tools.cht_vdcb_raw
272 tools.cht_vdcb_prp.DataType: 0
273 tools.cht_vdcb_prp.MaxSignal: 10
274 tools.cht_vdcb_prp.SkipChannelStatus: [1, 2]
275 tools.cht_vdcb_prp.HistName: "hadcprp_%CRNAME%_run%0RUN%_evt%0EVENT%"
276 tools.cht_vdcb_prp.HistTitle: "Calibrated sample"
277 tools.cht_vdcb_prp.PlotFileName: "adcprp_%CRNAME%_run%0RUN%_evt%0EVENT%.png"
278 
279 tools.cht_vdbcbu_prp: @local::tools.cht_vdcb_prp
280 tools.cht_vdbcbu_prp.ChannelRanges: [crbu]
281 
282 tools.cht_vdbcby_prp: @local::tools.cht_vdcb_prp
283 tools.cht_vdbcby_prp.ChannelRanges: [crby]
284 
285 tools.cht_vdbcbz_prp: @local::tools.cht_vdcb_prp
286 tools.cht_vdbcbz_prp.ChannelRanges: [crbz]
287 
288 tools.cht_vdtcbu_prp: @local::tools.cht_vdcb_prp
289 tools.cht_vdtcbu_prp.ChannelRanges: [crtu]
290 tools.cht_vdtcbu_prp.TickRange: plotTicks10000
291 tools.cht_vdtcbu_prp.MaxSignal: 2
292 
293 tools.cht_vdtcby_prp: @local::tools.cht_vdcb_prp
294 tools.cht_vdtcby_prp.ChannelRanges: [crty]
295 tools.cht_vdtcby_prp.TickRange: plotTicks10000
296 tools.cht_vdtcby_prp.MaxSignal: 2
297 
298 tools.cht_vdtcbz_prp: @local::tools.cht_vdcb_prp
299 tools.cht_vdtcbz_prp.ChannelRanges: [crtz]
300 tools.cht_vdtcbz_prp.TickRange: plotTicks10000
301 tools.cht_vdtcbz_prp.MaxSignal: 2
302 
303 # Signal (ROI) data.
304 tools.cht_vdcb_sig: @local::tools.cht_vdcb_prp
305 tools.cht_vdcb_sig.DataType: 2
306 tools.cht_vdcb_sig.HistName: "hadcsig_%CRNAME%_run%0RUN%_evt%0EVENT%"
307 tools.cht_vdcb_sig.HistTitle: "Calibrated signal"
308 tools.cht_vdcb_sig.PlotFileName: "adcsig_%CRNAME%_run%0RUN%_evt%0EVENT%.png"
309 
310 tools.cht_vdbcbu_sig: @local::tools.cht_vdcb_sig
311 tools.cht_vdbcbu_sig.ChannelRanges: [crbu]
312 
313 tools.cht_vdbcby_sig: @local::tools.cht_vdcb_sig
314 tools.cht_vdbcby_sig.ChannelRanges: [crby]
315 
316 tools.cht_vdbcbz_sig: @local::tools.cht_vdcb_sig
317 tools.cht_vdbcbz_sig.ChannelRanges: [crbz]
318 
319 tools.cht_vdtcbu_sig: @local::tools.cht_vdcb_sig
320 tools.cht_vdtcbu_sig.ChannelRanges: [crtu]
321 tools.cht_vdtcbu_sig.TickRange: plotTicks10000
322 
323 tools.cht_vdtcby_sig: @local::tools.cht_vdcb_sig
324 tools.cht_vdtcby_sig.ChannelRanges: [crty]
325 tools.cht_vdtcby_sig.TickRange: plotTicks10000
326 
327 tools.cht_vdtcbz_sig: @local::tools.cht_vdcb_sig
328 tools.cht_vdtcbz_sig.ChannelRanges: [crtz]
329 tools.cht_vdtcbz_sig.TickRange: plotTicks10000
330 
331 ################# Metric plotters ####################
332 
333 ##### Tools for bottom channels.
334 
335 # FEMB for each TPS channel.
336 tools.vdbcb_adcChannelFembIdPlotter: @local::tmp.vdbcb_chmet_template
337 tools.vdbcb_adcChannelFembIdPlotter.Metric: apaFembID
338 tools.vdbcb_adcChannelFembIdPlotter.MetricMax: 15
339 tools.vdbcb_adcChannelFembIdPlotter.HistName: "hchpd%CRNAME%_fembid_%0RUN%_%0EVENT%"
340 tools.vdbcb_adcChannelFembIdPlotter.HistTitle: "FEMB IDs for run %RUN% event %EVENT% %CRLABEL%"
341 tools.vdbcb_adcChannelFembIdPlotter.MetricLabel: "FEMB ID"
342 tools.vdbcb_adcChannelFembIdPlotter.PlotFileName: "chmet_fembid_%CRNAME%_run%0RUN%_evt%0EVENT%.png"
343 
344 # FEMB asic for each TPS channel.
345 tools.vdbcb_adcChannelAsicPlotter: @local::tmp.vdbcb_chmet_template
346 tools.vdbcb_adcChannelAsicPlotter.Metric: asic
347 tools.vdbcb_adcChannelAsicPlotter.MetricMin: 0
348 tools.vdbcb_adcChannelAsicPlotter.MetricMax: 9
349 tools.vdbcb_adcChannelAsicPlotter.HistName: "hchpd%CRNAME%_asic_%0RUN%_%0EVENT%"
350 tools.vdbcb_adcChannelAsicPlotter.HistTitle: "ASIC IDs for run %RUN% event %EVENT% %CRLABEL%"
351 tools.vdbcb_adcChannelAsicPlotter.MetricLabel: "ASIC ID"
352 tools.vdbcb_adcChannelAsicPlotter.PlotFileName: "chmet_asic_%CRNAME%_run%0RUN%_evt%0EVENT%.png"
353 
354 # FEMB channel for each TPS channel.
355 tools.vdbcb_adcChannelFembChanPlotter: @local::tmp.vdbcb_chmet_template
356 tools.vdbcb_adcChannelFembChanPlotter.Metric: fembChannel
357 tools.vdbcb_adcChannelFembChanPlotter.MetricMin: -1
358 tools.vdbcb_adcChannelFembChanPlotter.MetricMax: 129
359 tools.vdbcb_adcChannelFembChanPlotter.HistName: "hchpd%CRNAME%_fembchan_%0RUN%_%0EVENT%"
360 tools.vdbcb_adcChannelFembChanPlotter.HistTitle: "FEMB channels for run %RUN% event %EVENT% %CRLABEL%"
361 tools.vdbcb_adcChannelFembChanPlotter.MetricLabel: "FEMB channel"
362 tools.vdbcb_adcChannelFembChanPlotter.PlotFileName: "chmet_fembchan_%CRNAME%_run%0RUN%_evt%0EVENT%.png"
363 
364 # Pedestal for each TPS channel.
365 tools.vdbcb_adcChannelPedestalPlotter: @local::tmp.vdbcb_chmet_template
366 tools.vdbcb_adcChannelPedestalPlotter.Metric: pedestal
367 tools.vdbcb_adcChannelPedestalPlotter.MetricMax: 4096
368 tools.vdbcb_adcChannelPedestalPlotter.HistName: "hchpd%CRNAME%_ped_%0RUN%_%0EVENT%"
369 tools.vdbcb_adcChannelPedestalPlotter.HistTitle: "ADC pedestals for run %RUN% event %EVENT% %CRLABEL%"
370 tools.vdbcb_adcChannelPedestalPlotter.MetricLabel: "Pedestal [ADC count]"
371 tools.vdbcb_adcChannelPedestalPlotter.PlotFileName: "chmet_ped_%CRNAME%_run%0RUN%_evt%0EVENT%.png"
372 
373 # Raw RMS for each TPS channel.
374 tools.vdbcb_adcChannelRawRmsPlotter: @local::tmp.vdbcb_chmet_template
375 tools.vdbcb_adcChannelRawRmsPlotter.Metric: rawRms
376 tools.vdbcb_adcChannelRawRmsPlotter.MetricMax: 20
377 tools.vdbcb_adcChannelRawRmsPlotter.HistName: "hchrawrms%CRNAME%_ped_%0RUN%_%0EVENT%"
378 tools.vdbcb_adcChannelRawRmsPlotter.HistTitle: "ADC-pedestal RMS for run %RUN% event %EVENT% %CRLABEL%"
379 tools.vdbcb_adcChannelRawRmsPlotter.MetricLabel: "RMS [ADC count]"
380 tools.vdbcb_adcChannelRawRmsPlotter.PlotFileName: "chmet_rawrms_%CRNAME%_run%0RUN%_evt%0EVENT%.png"
381 
382 # Sample RMS for each TPS channel.
383 tools.vdbcb_adcChannelSamRmsPlotter: @local::tmp.vdbcb_chmet_template
384 tools.vdbcb_adcChannelSamRmsPlotter.Metric: samRms
385 tools.vdbcb_adcChannelSamRmsPlotter.MetricMax: 0.5
386 tools.vdbcb_adcChannelSamRmsPlotter.HistName: "hchsamrms%CRNAME%_ped_%0RUN%_%0EVENT%"
387 tools.vdbcb_adcChannelSamRmsPlotter.HistTitle: "Sample RMS for run %RUN% event %EVENT% %CRLABEL%"
388 tools.vdbcb_adcChannelSamRmsPlotter.MetricLabel: "RMS [ke]"
389 tools.vdbcb_adcChannelSamRmsPlotter.PlotFileName: "chmet_samrms_%CRNAME%_run%0RUN%_evt%0EVENT%.png"
390 
391 # Integrated RMS for each TPS channel.
392 tools.vdbcb_adcChannelSamRms30Plotter: @local::tmp.vdbcb_chmet_template
393 tools.vdbcb_adcChannelSamRms30Plotter.Metric: samRms30
394 tools.vdbcb_adcChannelSamRms30Plotter.MetricMax: 20.0
395 tools.vdbcb_adcChannelSamRms30Plotter.HistName: "hchsamrms30%CRNAME%_ped_%0RUN%_%0EVENT%"
396 tools.vdbcb_adcChannelSamRms30Plotter.HistTitle: "30-sample RMS for run %RUN% event %EVENT% %CRLABEL%"
397 tools.vdbcb_adcChannelSamRms30Plotter.MetricLabel: "RMS [ke]"
398 tools.vdbcb_adcChannelSamRms30Plotter.PlotFileName: "chmet_samrms30_%CRNAME%_run%0RUN%_evt%0EVENT%.png"
399 
400 # Integrated 50-sample RMS for each TPS channel.
401 tools.vdbcb_adcChannelSamRms50Plotter: @local::tmp.vdbcb_chmet_template
402 tools.vdbcb_adcChannelSamRms50Plotter.Metric: samRms50
403 tools.vdbcb_adcChannelSamRms50Plotter.MetricMax: 20.0
404 tools.vdbcb_adcChannelSamRms50Plotter.HistName: "hchsamrms50%CRNAME%_ped_%0RUN%_%0EVENT%"
405 tools.vdbcb_adcChannelSamRms50Plotter.HistTitle: "50-sample RMS for run %RUN% event %EVENT% %CRLABEL%"
406 tools.vdbcb_adcChannelSamRms50Plotter.MetricLabel: "RMS [ke]"
407 tools.vdbcb_adcChannelSamRms50Plotter.PlotFileName: "chmet_samrms50_%CRNAME%_run%0RUN%_evt%0EVENT%.png"
408 
409 
410 ##### Tools for top channels.
411 
412 tmp.vdtcb_chmet_template: {
413  tool_type: AdcChannelMetric
414  LogLevel: 1
415  DataView: ""
416  PedestalReference: ""
417  MetricSummaryView: "mean:dmean"
418  MetricMin: 0.0
419  MetricBins: 0
420  ChannelRanges: [crt]
421  ChannelLineModulus: 0
422  ChannelLinePattern: @local::data.vdtcb_adaBounds
423  ChannelLinePatternSolid: @local::data.vdtcb_planeBounds
424  PlotSizeX: 1400
425  PlotSizeY: 500
426  PlotUsesStatus: 1
427  RootFileName: ""
428  MetadataFlags: [write]
429 }
430 
431 # Pedestal for each TPS channel.
432 tools.vdtcb_adcChannelPedestalPlotter: @local::tmp.vdtcb_chmet_template
433 tools.vdtcb_adcChannelPedestalPlotter.Metric: pedestal
434 tools.vdtcb_adcChannelPedestalPlotter.MetricMin: 1900
435 tools.vdtcb_adcChannelPedestalPlotter.MetricMax: 2200
436 tools.vdtcb_adcChannelPedestalPlotter.HistName: "hchpd%CRNAME%_ped_%0RUN%_%0EVENT%"
437 tools.vdtcb_adcChannelPedestalPlotter.HistTitle: "ADC pedestals for run %RUN% event %EVENT% %CRLABEL%"
438 tools.vdtcb_adcChannelPedestalPlotter.MetricLabel: "Pedestal [ADC count]"
439 tools.vdtcb_adcChannelPedestalPlotter.PlotFileName: "chmet_ped_%CRNAME%_run%0RUN%_evt%0EVENT%.png"
440 
441 # Raw RMS for each TPS channel.
442 tools.vdtcb_adcChannelRawRmsPlotter: @local::tmp.vdtcb_chmet_template
443 tools.vdtcb_adcChannelRawRmsPlotter.Metric: rawRms
444 tools.vdtcb_adcChannelRawRmsPlotter.MetricMax: 20
445 tools.vdtcb_adcChannelRawRmsPlotter.HistName: "hchrawrms%CRNAME%_ped_%0RUN%_%0EVENT%"
446 tools.vdtcb_adcChannelRawRmsPlotter.HistTitle: "ADC-pedestal RMS for run %RUN% event %EVENT% %CRLABEL%"
447 tools.vdtcb_adcChannelRawRmsPlotter.MetricLabel: "RMS [ADC count]"
448 tools.vdtcb_adcChannelRawRmsPlotter.PlotFileName: "chmet_rawrms_%CRNAME%_run%0RUN%_evt%0EVENT%.png"
449 
450 # Sample RMS for each TPS channel.
451 tools.vdtcb_adcChannelSamRmsPlotter: @local::tmp.vdtcb_chmet_template
452 tools.vdtcb_adcChannelSamRmsPlotter.Metric: samRms
453 tools.vdtcb_adcChannelSamRmsPlotter.MetricMax: 0.5
454 tools.vdtcb_adcChannelSamRmsPlotter.HistName: "hchsamrms%CRNAME%_ped_%0RUN%_%0EVENT%"
455 tools.vdtcb_adcChannelSamRmsPlotter.HistTitle: "Sample RMS for run %RUN% event %EVENT% %CRLABEL%"
456 tools.vdtcb_adcChannelSamRmsPlotter.MetricLabel: "RMS [ke]"
457 tools.vdtcb_adcChannelSamRmsPlotter.PlotFileName: "chmet_samrms_%CRNAME%_run%0RUN%_evt%0EVENT%.png"
458 
459 # Integrated RMS for each TPS channel.
460 tools.vdtcb_adcChannelSamRms30Plotter: @local::tmp.vdtcb_chmet_template
461 tools.vdtcb_adcChannelSamRms30Plotter.Metric: samRms30
462 tools.vdtcb_adcChannelSamRms30Plotter.MetricMax: 20.0
463 tools.vdtcb_adcChannelSamRms30Plotter.HistName: "hchsamrms30%CRNAME%_ped_%0RUN%_%0EVENT%"
464 tools.vdtcb_adcChannelSamRms30Plotter.HistTitle: "30-sample RMS for run %RUN% event %EVENT% %CRLABEL%"
465 tools.vdtcb_adcChannelSamRms30Plotter.MetricLabel: "RMS [ke]"
466 tools.vdtcb_adcChannelSamRms30Plotter.PlotFileName: "chmet_samrms30_%CRNAME%_run%0RUN%_evt%0EVENT%.png"
467 
468 # Integrated 50-sample RMS for each TPS channel.
469 tools.vdtcb_adcChannelSamRms50Plotter: @local::tmp.vdtcb_chmet_template
470 tools.vdtcb_adcChannelSamRms50Plotter.Metric: samRms50
471 tools.vdtcb_adcChannelSamRms50Plotter.MetricMax: 20.0
472 tools.vdtcb_adcChannelSamRms50Plotter.HistName: "hchsamrms50%CRNAME%_ped_%0RUN%_%0EVENT%"
473 tools.vdtcb_adcChannelSamRms50Plotter.HistTitle: "50-sample RMS for run %RUN% event %EVENT% %CRLABEL%"
474 tools.vdtcb_adcChannelSamRms50Plotter.MetricLabel: "RMS [ke]"
475 tools.vdtcb_adcChannelSamRms50Plotter.PlotFileName: "chmet_samrms50_%CRNAME%_run%0RUN%_evt%0EVENT%.png"
476 
477 
478 ##### Tools for ghost channels.
479 
480 tools.vdgcb_adcChannelFembIdPlotter: @local::tools.vdbcb_adcChannelFembIdPlotter
481 tools.vdgcb_adcChannelFembIdPlotter.ChannelRanges: [crbg]
482 
483 tools.vdgcb_adcChannelFembChanPlotter: @local::tools.vdbcb_adcChannelFembChanPlotter
484 tools.vdgcb_adcChannelFembChanPlotter.ChannelRanges: [crbg]
485 
486 tools.vdgcb_adcChannelPedestalPlotter: @local::tools.vdbcb_adcChannelPedestalPlotter
487 tools.vdgcb_adcChannelPedestalPlotter.ChannelRanges: [crbg]
488 
489 tools.vdgcb_adcChannelRawRmsPlotter: @local::tools.vdbcb_adcChannelRawRmsPlotter
490 tools.vdgcb_adcChannelRawRmsPlotter.ChannelRanges: [crbg]
491 
492 ################# Roi tree ####################
493 
494 # Write all ROIs to a TTree.
495 tools.adcRoiTreeMaker: {
496  tool_type: AdcRoiToTree
497  LogLevel: 1
498  OutFile: "adcrois.root"
499  MetadataFields: [samRms]
500 }