Skip to content

Commit 3aa14b7

Browse files
Merge branch 'develop' into feature/aliciavr_XARAPUCA_offline_decoder-to-production
2 parents 4cad84b + aafa4f7 commit 3aa14b7

11 files changed

Lines changed: 303 additions & 99 deletions

File tree

sbndcode/Calibration/DQM/FilterChoppy_module.cc

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,13 @@ namespace filt{
105105
// exit if the data isn't present
106106
if (!timestamp_handle.isValid()) {
107107
std::cerr << "Error: missing timestamps with producer (" << "daq" << ")" << std::endl;
108-
return false;
108+
return true; // don't want to filter out events missing TPC data (e.g. CRT-only runs)
109109
}
110+
if (timestamp_handle->size() == 0) {
111+
std::cerr << "Error: missing timestamps with producer (" << "daq" << ")" << std::endl;
112+
return true; // don't want to filter out events missing TPC data (e.g. CRT-only runs)
113+
}
114+
110115
art::fill_ptr_vector(raw_timestamps_handle, timestamp_handle);
111116

112117
// collect TS

sbndcode/Decoders/XARAPUCA/SBNDXARAPUCADecoder_module.cc

Lines changed: 251 additions & 79 deletions
Large diffs are not rendered by default.

sbndcode/Decoders/XARAPUCA/run_xarapucadecoder.fcl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#include "xarapucadecoder.fcl"
2+
#include "spectdc_decoder_sbnd.fcl"
23

34
process_name: XARAPUCADecoder
45

@@ -21,6 +22,7 @@ outputs: {
2122
physics: {
2223

2324
producers: {
25+
tdcdecoder: @local::spec_tdc_decoder_sbnd
2426
xarapucadecoder: @local::xarapucadecoder
2527
}
2628

@@ -29,7 +31,7 @@ physics: {
2931
analyzers:{}
3032

3133

32-
reco: [xarapucadecoder]
34+
reco: [tdcdecoder, xarapucadecoder]
3335

3436

3537
# Defines the output stream, there could be more than one if using filters.

sbndcode/Decoders/XARAPUCA/xarapucadecoder.fcl

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,22 @@ xarapucadecoder:
1414
fragment_id_offset: 41216 # Offset to be applied to the fragment IDs (0xA100).
1515
board_id_list: [7, 13, 16, 19] # Slots where the boards are installed.
1616
# - Timing configuration.
17+
timing_priority: 0 # 0 SPEC-TDC ETT, 1 CAEN-only.
1718
ns_per_sample: 16 # Nanoseconds per sample.
19+
# - SPEC-TDC access configuration
20+
spectdc_product_name: "tdcdecoder" # Name for getting SPEC-TDC Decoder products.
21+
spectdc_ftrig_ch: 3 # Channel assigned to flash triggers.
22+
spectdc_etrig_ch: 4 # Channel assigned to event triggers.
1823

1924
# OUTPUT configuration:
2025
# - Output data product instance name.
21-
product_instance_name: "XARAPUCAChannels" # Name for the instance product created.
22-
store_debug_waveforms: 0 # Number of waveforms to store (0: none, -1: all, n: first n waveforms).
26+
waveforms_instance_name: "XARAPUCAChannels" # Name for the instance product containing the raw decoded waveforms.
27+
timing_instance_name: "" # Name for the instance product containing the timing reference information.
28+
store_debug_waveforms: 0 # Number of waveforms to store (0: none, -1: all, n: first n waveforms).
2329
# - Debug options.
2430
debug_all: false # (De)activates all debug options.
25-
debug_handle: false # (De)activates art::Handle data printing.
31+
debug_tdc_handle: false # (De)activates SPEC-TDC art::Handle information printing.
32+
debug_fragments_handle: false # (De)activates V1740B CAEN fragments art::Handle information printing.
2633
debug_timing: false # (De)activates timing data printing.
2734
debug_buffer: false # (De)activates buffer status printing.
2835
debug_waveforms: false # (De)activates waveforms decoding printing.

sbndcode/Utilities/badchannels_sbnd.fcl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ sbnd_data_badchannels_west_plane0_shorted: [ 7169 ]
3232
sbnd_data_badchannels_west_plane1_shorted: [ 8378 ]
3333

3434
#No response from channels
35-
sbnd_data_badchannels_no_response: [ 546, 607, 8574 ]
35+
sbnd_data_badchannels_no_response: [ 546, 607, 2781, 7167, 8574, 8395, 11147 ]
3636

3737
#noisy channels
3838
sbnd_data_badchannels_noisy: [ 5060, 5636, 5637 ]

sbndcode/WireCell/cfg/pgrapher/experiment/sbnd/chndb-base.jsonnet

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,24 +20,32 @@ function(params, anode, field, n, rms_cuts=[])
2020
// For MicroBooNE, channel groups is a 2D list. Each element is
2121
// one group of channels which should be considered together for
2222
// coherent noise filtering.
23-
// 5638 is the number of channels in a single APA, (1984*2 + 1670), including the 6 channel gap.
24-
// 4806 is the number of channels for both induction + half of real collection wires + 6 channel gap
25-
groups: [std.range( 0 + n * 5638 + g*32, 0 + n * 5638 + (g+1)*32 - 1) for g in std.range(0,150)] +
26-
[std.range(4806 + n * 5638 + g*32, 4806 + n * 5638 + (g+1)*32 - 1) for g in std.range(0,26)] ,
23+
// 5638 is the number of channels in a single APA, (1984*2 + 1670),
24+
// including the 6 channel gap.
25+
// The induction planes have to types of ch grouping (due to FEMB),
26+
// one where the grouping is 32 channels wide and one where it is 128 channels wide.
27+
// The collection planes are grouped by 64.
2728

29+
groups: [std.range( 0 + n * 5638 + g*32 , 0 + n * 5638 + (g+1)*32 - 1) for g in std.range(0,26)] + # first section of u
30+
[std.range( 832 + n * 5638 + g*128, 832 + n * 5638 + (g+1)*128 - 1) for g in std.range(0,9)] + # second section of u
31+
[std.range(1984 + n * 5638 + g*128, 1984 + n * 5638 + (g+1)*128 - 1) for g in std.range(0,9)] + # first section of v
32+
[std.range(3136 + n * 5638 + g*32 , 3136 + n * 5638 + (g+1)*32 - 1) for g in std.range(0,26)] + # second section of v
33+
[std.range(3974 + n * 5638 + g*64 , 3974 + n * 5638 + (g+1)*64 - 1) for g in std.range(0,13)] + # first half of w
34+
[std.range(4806 + n * 5638 + g*64 , 4806 + n * 5638 + (g+1)*64 - 1) for g in std.range(0,13)] , # second half of w
2835

2936
// Externally determined "bad" channels.
3037
//
3138
// Dead channels: 3232:3263 (inclusive) (East V). 4160:4191 (East Y)
3239
// Jumpered region: 4800:4805 (inclusive, East Y), 10438:10443 (inclusive, West Y)
3340
// No response: 546, 607, 8574
3441
// Shorted channels: 7169 (West U), 8378 (West V).
42+
// Unresponsive channels: 546, 607, 2781, 7167, 8574, 8395, 11147
3543
// There are four physically missing wires ( = bad channels) due to combs, in the center of each 1/2 APA.
3644
// They are 4374 and 5231 (East Y), 10012 and 10869 (West Y).
37-
// So in total, there are 88 bad channels.
45+
// So in total, there are 76 bad channels + 12 from jumpered region + 4 missing
3846
//
3947
//bad: [],
40-
bad: [546, 607] + std.range(3232, 3263) + std.range(4160, 4191) + [4374, 4800, 4801, 4802, 4803, 4804, 4805, 5060, 5231, 5636, 5637, 7169, 8378, 8574, 10012, 10869, 10438, 10439, 10440, 10441, 10442, 10443],
48+
bad: [546, 607, 2781] + std.range(3232, 3263) + std.range(4160, 4191) + [4374, 4800, 4801, 4802, 4803, 4804, 4805, 5060, 5231, 5636, 5637, 7167, 7169, 8378, 8395, 8574, 10012, 10869, 10438, 10439, 10440, 10441, 10442, 10443, 11147],
4149

4250
// Overide defaults for specific channels. If an info is
4351
// mentioned for a particular channel in multiple objects in this

sbndcode/WireCell/cfg/pgrapher/experiment/sbnd/chndb-perfect.jsonnet

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,22 +20,32 @@ function(params, anode, field, n, rms_cuts=[])
2020
// For MicroBooNE, channel groups is a 2D list. Each element is
2121
// one group of channels which should be considered together for
2222
// coherent noise filtering.
23-
groups: [std.range( 0 + n * 5638 + g*32, 0 + n * 5638 + (g+1)*32 - 1) for g in std.range(0,149)] +
24-
[std.range(4806 + n * 5638 + g*32, 4806 + n * 5638 + (g+1)*32 - 1) for g in std.range(0,25)] ,
23+
// 5638 is the number of channels in a single APA, (1984*2 + 1670),
24+
// including the 6 channel gap.
25+
// The induction planes have to types of ch grouping (due to FEMB),
26+
// one where the grouping is 32 channels wide and one where it is 128 channels wide.
27+
// The collection planes are grouped by 64.
2528

29+
groups: [std.range( 0 + n * 5638 + g*32 , 0 + n * 5638 + (g+1)*32 - 1) for g in std.range(0,26)] + # first section of u
30+
[std.range( 832 + n * 5638 + g*128, 832 + n * 5638 + (g+1)*128 - 1) for g in std.range(0,9)] + # second section of u
31+
[std.range(1984 + n * 5638 + g*128, 1984 + n * 5638 + (g+1)*128 - 1) for g in std.range(0,9)] + # first section of v
32+
[std.range(3136 + n * 5638 + g*32 , 3136 + n * 5638 + (g+1)*32 - 1) for g in std.range(0,26)] + # second section of v
33+
[std.range(3974 + n * 5638 + g*64 , 3974 + n * 5638 + (g+1)*64 - 1) for g in std.range(0,13)] + # first half of w
34+
[std.range(4806 + n * 5638 + g*64 , 4806 + n * 5638 + (g+1)*64 - 1) for g in std.range(0,13)] , # second half of w
2635

2736
// Externally determined "bad" channels.
2837
//
2938
// Dead channels: 3232:3263 (inclusive) (East V). 4160:4191 (East Y)
3039
// Jumpered region: 4800:4805 (inclusive, East Y), 10438:10443 (inclusive, West Y)
3140
// No response: 546, 607, 8574
3241
// Shorted channels: 7169 (West U), 8378 (West V).
42+
// Unresponsive channels: 546, 607, 2781, 7167, 8574, 8395, 11147
3343
// There are four physically missing wires ( = bad channels) due to combs, in the center of each 1/2 APA.
3444
// They are 4374 and 5231 (East Y), 10012 and 10869 (West Y).
35-
// So in total, there are 88 bad channels.
45+
// So in total, there are 76 bad channels + 12 from jumpered region + 4 missing
3646
//
3747
//bad: [],
38-
bad: [546, 607] + std.range(3232, 3263) + std.range(4160, 4191) + [4374, 4800, 4801, 4802, 4803, 4804, 4805, 5060, 5231, 5636, 5637, 7169, 8378, 8574, 10012, 10869, 10438, 10439, 10440, 10441, 10442, 10443],
48+
bad: [546, 607, 2781] + std.range(3232, 3263) + std.range(4160, 4191) + [4374, 4800, 4801, 4802, 4803, 4804, 4805, 5060, 5231, 5636, 5637, 7167, 7169, 8378, 8395, 8574, 10012, 10869, 10438, 10439, 10440, 10441, 10442, 10443, 11147],
3949

4050
// Overide defaults for specific channels. If an info is
4151
// mentioned for a particular channel in multiple objects in this

sbndcode/WireCell/cfg/pgrapher/experiment/sbnd/nf.jsonnet

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ function(params, anode, chndbobj, n, name='', dft=default_dft)
6161
wc.tn(single),
6262
],
6363
grouped_filters: [
64-
// wc.tn(grouped),
64+
wc.tn(grouped),
6565
],
6666
channel_status_filters: [
6767
],

sbndcode/WireCell/cfg/pgrapher/experiment/sbnd/params.jsonnet

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ base {
123123
// The "absolute" time (ie, relative to trigger time?) that the lower edge
124124
// of final readout tick #0 should correspond to. This is a
125125
// "fixed" notion.
126-
local tick0_time = -200*wc.us,
126+
local tick0_time = -205*wc.us, // updated in January 2025, front porch in data = 410 ticks
127127

128128
// Open the ductor's gate a bit early.
129129
local response_time_offset = $.det.response_plane / $.lar.drift_speed,

sbndcode/WireCell/cfg/pgrapher/experiment/sbnd/sp-filters.jsonnet

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ local wf(name, data={}) = {
7575
[
7676
lf('ROI_tight_lf', { tau: 0.0185 * wc.megahertz }), // 0.02
7777
lf('ROI_tighter_lf', { tau: 0.145 * wc.megahertz }), // 0.1
78-
lf('ROI_loose_lf', { tau: 0.00175 * wc.megahertz }), // 0.0025
78+
lf('ROI_loose_lf', { tau: 0.006 * wc.megahertz }), // updated from 0.00175 for data teardrop removal
7979

8080
hf('Gaus_tight'),
8181
hf('Gaus_wide', { sigma: 0.10 * wc.megahertz }),

0 commit comments

Comments
 (0)