./preprocess.sh /path/to/your/magnify.root
This is a wrapper for merging magnify histograms from all APAs. See more detailed description through "./preprocess.sh -h".
cd scripts/
root -l loadClasses.C 'Magnify.C("path/to/rootfile")'
# or
root -l loadClasses.C 'Magnify.C("path/to/rootfile", <threshold>, "<frame>", <rebin>)'
The second argument is the default threshold for showing a box.
The third, optional argument names which output from the signal processing to display. Likely names are:
deconproduced by the Wire Cell prototype (default).wienerproduced by the Wire Cell toolkit, used to define ROI or "hits".gaussproduced by the Wire Cell toolkit, used for charge measurement.
The call to ROOT can be be called somewhat more easily via a shell script wrapper. It assumes to stay in the source directory:
/path/to/magnify/magnify.sh /path/to/wcp-rootfile.root
# or
/path/to/magnify/magnify.sh /path/to/wct-rootfile.root 500 gauss 4
An example ROOT file of waveforms can be found at twister:/home/wgu/Event27.root
If one omits the file name, a dialog will open to let user select the file:
cd scripts/
root -l loadClasses.C Magnify.C
Computes per-channel noise RMS for one or more Magnify ROOT files in batch (no display). Output is written alongside each input as <file>.rms.root.
./scripts/run_rms_analysis.sh input_files/040475_1/magnify-run040475-evt1-anode0.root
# or process multiple files at once
./scripts/run_rms_analysis.sh input_files/040475_1/magnify-run040475-evt1-anode*.root
./scripts/run_rms_analysis.sh input_files/*/magnify-*.root
The algorithm follows the WCT percentile-based method (matching Microboone.cxx):
- Preliminary RMS on unflagged ADC samples.
- Signal flagging: mark |ADC| > 4×RMS bins, padded ±8 ticks.
- Final RMS recomputed with signal-flagged samples excluded.
Results are stored in a TTree (one row per channel) inside the .rms.root cache file and are automatically loaded by the viewer at startup to apply per-channel Wiener thresholds.
./channelscan.sh path/to/rootfile
This is a wrapper for looping over channels where the channel list can be predefined in the bad tree or a text file.
See detailed usage via ./channelscan.sh -h.