|
MUSIC unknown
Analysis for the MUSIC active-target ionization chamber
|
Per-channel beam-peak calibration, gain matching and strip alignment. More...
#include <CalibrateBeam.hpp>
Static Public Member Functions | |
| static std::vector< ChannelCal > | BuildChannels () |
| One ChannelCal per readout channel in the active channel map. | |
| static void | CalibrateBeamOneSubfile (const FileSpec &spec, const std::vector< ChannelCal > &chans_template) |
| Calibrate one subfile end to end. | |
| static void | AggregateRidgeRatiosForRun (Int_t run, const std::vector< FileSpec > &specs) |
| Replace each subfile's ridge ratio and short-end offset with the run-level medians. | |
| static void | Run (const TString &file_label="") |
| Calibrate every configured subfile, then aggregate per run. | |
Per-channel beam-peak calibration, gain matching and strip alignment.
Runs after the pipeline over its events files. For each subfile it locates every channel's modal beam peak, matches the left and right gains of each segmented strip onto a common charge scale by anchoring both ends on the charge-sharing ridge, then aligns every strip's total so that the beam peak sits at 1.0 and the two-particle pile-up peak at 2.0.
The ridge ratios are per-channel constants rather than per-subfile measurements, and are aggregated to the run level once every subfile has been processed.
Definition at line 156 of file CalibrateBeam.hpp.
|
static |
Replace each subfile's ridge ratio and short-end offset with the run-level medians.
Replace each subfile's short-side gain with one built from the run-level median ridge ratio.
The ratio is a preamplifier gain ratio and the offset a channel property, so both are fixed per channel. Taking the median across the subfiles that measured the ridge makes the values robust for subfiles where it was not measurable.
| run | Run number. |
| specs | That run's subfiles. |
C_short/C_long is a ratio of preamp gains, so it is fixed per channel and does not vary subfile to subfile – the measured scatter is ~1%, well below the ~7% spread between strips. But a single subfile often cannot fit the ridge on the low-occupancy short ends (on 87Rb the even strips fit in only ~45% of subfiles, and 37Cl's upstream strips almost never do), so per-subfile fitting leaves a large fraction of strips on a fallback.
Aggregating fixes that without re-reading any event data: take the median ratio and the median short-end offset (both in units of C_long) per strip over the subfiles that did measure the ridge, then rebuild every subfile's short gain as 1/(ratio * C_long) and its short offset as offset * C_long, using that subfile's own C_long so per-subfile gain drift is preserved. Strips that no subfile could fit keep whatever the per-subfile fallback gave them.
Definition at line 1637 of file CalibrateBeam.cpp.
|
static |
One ChannelCal per readout channel in the active channel map.
Definition at line 34 of file CalibrateBeam.cpp.
Referenced by Run().
|
static |
Calibrate one subfile end to end.
| spec | Subfile to process. |
| chans_template | Channel templates from BuildChannels(); copied, not modified. |
Definition at line 1504 of file CalibrateBeam.cpp.
Referenced by Run(), and RunFusedPipelineForFile().
|
static |
Calibrate every configured subfile, then aggregate per run.
| file_label | Restrict to one subfile by its FileSet::FileLabel(). Empty, the default, processes all of them. |
Definition at line 1759 of file CalibrateBeam.cpp.
Referenced by main().