Skip to content

Commit 6db5047

Browse files
committed
minor update on PDVD top RMS cut and PDHD FEMB noise filtering
1 parent 4852d2b commit 6db5047

2 files changed

Lines changed: 28 additions & 3 deletions

File tree

cfg/pgrapher/experiment/protodunevd/chndb-base.jsonnet

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -624,15 +624,15 @@ top_u_groups:
624624
{ l: 120.0, v: 9.0 * gain_scale },
625625
{ l: 172.0, v: 10.0 * gain_scale },
626626
] },
627-
max_rms_cut: 50.0 * gain_scale },
627+
max_rms_cut: 20.0 * gain_scale },
628628
{ channels: v_chans,
629629
min_rms_cut: { type: 'piecewise_linear_in_wirelength',
630630
points: [
631631
{ l: 0.0, v: 9.1 * gain_scale },
632632
{ l: 120.0, v: 9.1 * gain_scale },
633633
{ l: 172.0, v: 11.0 * gain_scale },
634634
] },
635-
max_rms_cut: 30.0 * gain_scale },
635+
max_rms_cut: 20.0 * gain_scale },
636636
{ channels: w_chans, min_rms_cut: 10.0 * gain_scale, max_rms_cut: 30.0 * gain_scale },
637637
] else [
638638
// Bottom TPCs: W flat; U and V linear-in-wirelength on min

sigproc/src/ProtoduneHD.cxx

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1137,7 +1137,32 @@ WireCell::Waveform::ChannelMaskMap PDHD::FEMBNoiseSub::apply(channel_signals_t&
11371137
const bool pass_p0 = Is_FEMB_noise(chansig_p0, rois_p0, m_width, m_pad_nticks, m_nsigma);
11381138
const bool pass_p1 = Is_FEMB_noise(chansig_p1, rois_p1, m_width, m_pad_nticks, m_nsigma);
11391139
const bool pass_p2 = Is_FEMB_noise(chansig_p2, rois_p2, m_width, m_pad_nticks, m_nsigma);
1140-
if (!(pass_p0 && pass_p1 && pass_p2)) {
1140+
const int npass = int(pass_p0) + int(pass_p1) + int(pass_p2);
1141+
if (npass < 2) {
1142+
return ret;
1143+
}
1144+
1145+
if (npass == 2) {
1146+
// Two of three planes confirm: mask only the two confirming planes,
1147+
// each over the ROIs found on its own projection. The plane that
1148+
// failed confirmation is left untouched.
1149+
const bool passes[3] = {pass_p0, pass_p1, pass_p2};
1150+
const channel_signals_t* plane_sigs[3] = {&chansig_p0, &chansig_p1, &chansig_p2};
1151+
const WireCell::Waveform::BinRangeList* plane_rois[3] = {&rois_p0, &rois_p1, &rois_p2};
1152+
size_t nchan_marked = 0;
1153+
for (int p = 0; p < 3; ++p) {
1154+
if (!passes[p]) continue;
1155+
for (auto const& cs : *plane_sigs[p]) {
1156+
for (const auto& br : *plane_rois[p]) {
1157+
ret["femb_noise"][cs.first].push_back(br);
1158+
}
1159+
++nchan_marked;
1160+
}
1161+
}
1162+
if (m_log) {
1163+
m_log->debug("PDHD FEMBNoiseSub: 2/3 planes confirm, marked {} channels on the two passing planes",
1164+
nchan_marked);
1165+
}
11411166
return ret;
11421167
}
11431168

0 commit comments

Comments
 (0)