Skip to content

Latest commit

 

History

History
105 lines (83 loc) · 4.23 KB

File metadata and controls

105 lines (83 loc) · 4.23 KB

wirecell-sigproc

The wirecell-sigproc CLI provides commands related to WCT signal processing (the sigproc/ subpackage). See main and command help.

wirecell-sigproc -h

Track response

The track-response subcommand computes the FR⊗ER perpendicular-line track response for U and V planes of a given detector and writes two-panel PNG plots (ADC waveform + |FFT| spectrum) with a chndb-resp overlay for comparison.

wirecell-sigproc track-response --help

Supported detectors

Detector flagDescription
ubooneMicroBooNE
sbndSBND
pdhdProtoDUNE-HD
pdvd-bottomProtoDUNE-VD bottom CRP
pdvd-topProtoDUNE-VD top CRP (JsonElecResponse)

Basic usage

Run with detector defaults (FR file, electronics, ADC parameters, and chndb-resp overlay path are all resolved via WIRECELL_PATH):

wirecell-sigproc track-response -d pdhd -o /tmp/tr

Produces track_response_pdhd_U.png and track_response_pdhd_V.png in /tmp/tr.

Overriding defaults

Any default can be overridden on the command line:

wirecell-sigproc track-response -d uboone \
    --gain "14.0*mV/fC" --shaping "2.2*us" \
    --postgain 1.2 --adc-per-mv 2.048 --adc-tick "500*ns" \
    --fr ub-10-half.json.bz2 \
    --chndb-resp pgrapher/experiment/uboone/chndb-resp.jsonnet \
    -o /tmp/tr

The --gain, --shaping, --adc-tick, and --output-window options accept WireCell unit expressions (e.g. "14.0*mV/fC", "2.2*us", "160*us").

--output-window extends the FR/ER convolution buffer beyond the FR file’s native length. This is needed when the FR file is shorter than the detector’s bipolar induction tail: without padding the FFT-based convolve() wraps the trailing recovery region back into the early bins. Both pdvd-bottom and pdvd-top default to "160*us" (the PDVD FR file native length is ~132.5 µs).

Exporting a chndb-resp.jsonnet kernel

Use --export-jsonnet PATH to write a chndb-resp-style jsonnet file ({u_resp:[...], v_resp:[...]}) alongside the PNGs. The arrays contain the FR⊗ER × ADC waveform digitised at the detector’s post-resampler tick (500 ns for all detectors) at the reference electronics parameters stored in track_response_defaults.jsonnet.

wirecell-sigproc track-response -d pdhd \
    -o /tmp/tr \
    --export-jsonnet /tmp/tr/chndb-resp.jsonnet

The header comment in the generated file records the exact parameters used. When the kernel is loaded into chndb-base.jsonnet the waveform should be scaled by gain_scale = params.elec.gain / (14*wc.mV/wc.fC) to compensate for any runtime FE gain that differs from the reference 14 mV/fC.

Implementation notes

  • Field response files are loaded via wirecell.sigproc.response.persist.load and resolved through WIRECELL_PATH.
  • The line-source integral uses the per-region mirror + non-uniform trapezoidal recipe (Option B), which correctly handles FR files that store impacts on only one side of the wire centerline per region (ub-10-half, dune-garfield-1d565, protodunevd_FR_norminal_260324). The built-in response.average() is not used because it normalises each region to a full pitch regardless of actual impact coverage, which overweights odd regions in these half-stored files.
  • For pdvd-top the electronics response is loaded from a JsonElecResponse JSON.bz2 file (dunevd-coldbox-elecresp-top-psnorm_400.json.bz2) rather than the parametric cold-electronics model.
  • Per-detector defaults (FR file, ER kind, gain, shaping, postgain, ADC/mV, ADC tick, chndb-resp path, output_window) live in wirecell/sigproc/track_response_defaults.jsonnet. Unit-bearing strings are evaluated via wirecell.util.functions.unitify so all internal arithmetic stays in WC units.
  • For PDVD the two CRP electronics sets use separate chndb-resp files: chndb-resp-bot.jsonnet (cold ER, gain 7.8 mV/fC) and chndb-resp-top.jsonnet (JsonElecResponse, postgain 1.52).