Class HitReader

java.lang.Object
org.jlab.rec.ahdc.Hit.HitReader

public class HitReader extends Object
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 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 via get_AHDCHits() and (in simulation) get_TrueAHDCHits().
      Parameters:
      event - current event containing the AHDC::adc bank (and MC::True in sim)
      detector - AHDC geometry used to resolve wire positions on each hit
      simulation - true for Monte Carlo events; disables data-only cuts and corrections
      rawHitCutsTable - per-wire acceptance cuts (time, ToT, ADC, pedestal min/max)
      timeOffsetsTable - per-wire t0 offsets applied to the leading-edge time
      timeToDistanceWireTable - per-wire T2D calibration coefficients used to convert time to DOCA
      timeOverThresholdTable - 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

      public ArrayList<Hit> get_AHDCHits()
      Returns:
      the calibrated AHDC hits produced from the current event; never null (empty if the AHDC::adc bank is missing)
    • set_AHDCHits

      public void set_AHDCHits(ArrayList<Hit> hits)
      Replaces the internally stored list of AHDC hits. Primarily used by fetch_AHDCHits(DataEvent, AlertDCDetector, IndexedTable, IndexedTable, IndexedTable, IndexedTable, IndexedTable).
      Parameters:
      hits - the list to store
    • get_TrueAHDCHits

      public ArrayList<TrueHit> get_TrueAHDCHits()
      Returns:
      the MC-truth hits for the current event (populated only in simulation mode; null for data events where fetch_TrueAHDCHits was not called)
    • set_TrueAHDCHits

      public void set_TrueAHDCHits(ArrayList<TrueHit> trueHits)
      Replaces the internally stored list of MC-truth hits. Primarily used by fetch_TrueAHDCHits(DataEvent).
      Parameters:
      trueHits - the list to store