Package org.jlab.rec.ahdc.Hit
Class HitReader
java.lang.Object
org.jlab.rec.ahdc.Hit.HitReader
Reads raw AHDC hits from the
AHDC::adc bank, applies calibration corrections
(time offsets, time-over-threshold, ADC gains), filters them against per-wire cuts in
data mode, and builds the list of Hit objects used by downstream reconstruction.
In simulation mode, the per-wire cuts and data-only ADC/ToT corrections are bypassed,
and truth information is additionally read from the MC::True bank into TrueHits.-
Constructor Summary
ConstructorsConstructorDescriptionHitReader(DataEvent event, AlertDCDetector detector, boolean simulation, IndexedTable rawHitCutsTable, IndexedTable timeOffsetsTable, IndexedTable timeToDistanceWireTable, IndexedTable timeOverThresholdTable, IndexedTable adcGainsTable) Constructs a HitReader and eagerly populates the hit lists from the given event. -
Method Summary
Modifier and TypeMethodDescriptionvoidset_AHDCHits(ArrayList<Hit> hits) Replaces the internally stored list of AHDC hits.voidset_TrueAHDCHits(ArrayList<TrueHit> trueHits) Replaces the internally stored list of MC-truth hits.
-
Constructor Details
-
HitReader
public HitReader(DataEvent event, AlertDCDetector detector, boolean simulation, IndexedTable rawHitCutsTable, IndexedTable timeOffsetsTable, IndexedTable timeToDistanceWireTable, IndexedTable timeOverThresholdTable, IndexedTable adcGainsTable) Constructs a HitReader and eagerly populates the hit lists from the given event. After construction, retrieve the results viaget_AHDCHits()and (in simulation)get_TrueAHDCHits().- Parameters:
event- current event containing theAHDC::adcbank (andMC::Truein sim)detector- AHDC geometry used to resolve wire positions on each hitsimulation-truefor Monte Carlo events; disables data-only cuts and correctionsrawHitCutsTable- per-wire acceptance cuts (time, ToT, ADC, pedestal min/max)timeOffsetsTable- per-wiret0offsets applied to the leading-edge timetimeToDistanceWireTable- per-wire T2D calibration coefficients used to convert time to DOCAtimeOverThresholdTable- per-wire ToT correction factors (applied in data mode only)adcGainsTable- per-wire ADC gain corrections (applied in data mode only)
-
-
Method Details
-
get_AHDCHits
- Returns:
- the calibrated AHDC hits produced from the current event; never
null(empty if theAHDC::adcbank is missing)
-
set_AHDCHits
Replaces the internally stored list of AHDC hits. Primarily used byfetch_AHDCHits(org.jlab.io.base.DataEvent, org.jlab.geom.detector.alert.AHDC.AlertDCDetector, org.jlab.utils.groups.IndexedTable, org.jlab.utils.groups.IndexedTable, org.jlab.utils.groups.IndexedTable, org.jlab.utils.groups.IndexedTable, org.jlab.utils.groups.IndexedTable).- Parameters:
hits- the list to store
-
get_TrueAHDCHits
- Returns:
- the MC-truth hits for the current event (populated only in simulation mode;
nullfor data events wherefetch_TrueAHDCHitswas not called)
-
set_TrueAHDCHits
Replaces the internally stored list of MC-truth hits. Primarily used byfetch_TrueAHDCHits(org.jlab.io.base.DataEvent).- Parameters:
trueHits- the list to store
-