Class ModeAHDC

All Implemented Interfaces:
IExtractor

public class ModeAHDC extends HipoExtractor
A new extraction method dedicated to the AHDC signal waveform Some blocks of code are inspired by MVTFitter.java and Bonus12 (`createBonusBank()`) To do list: - read pedestal from the DB when a baseline cannot be computed - change the definition of ADC to be the max of the peak? - fit waveforms to define arrival time (and charge)
Author:
ftouchte, pilleux
  • Constructor Details Link icon

    • ModeAHDC Link icon

      public ModeAHDC()
  • Method Details Link icon

    • baselineSlope Link icon

      public void baselineSlope()
      This method checks if the wf starts with a flat baseline
    • baselineComputation Link icon

      public void baselineComputation()
      This method computes the waveform baseline from the average of the first few samples
    • assignValidType Link icon

      public void assignValidType(int type)
      This method assigns a new type to the waveform by checking if another more restrictive type had already been assigned
      Parameters:
      type - an int that is the new wf type to be applied
    • assignInvalidType Link icon

      public void assignInvalidType()
      This method assigns an invalid type (-1) to the waveform
    • waveformADCProcessing Link icon

      public int waveformADCProcessing()
      This method subtracts the baseline, computes the max ADC and corresponding time and the integral of the wf
      Returns:
      an int for status
    • waveformCFAprocessing Link icon

      public int waveformCFAprocessing()
      This method computes the leading edge time and time over threshold over a constant fraction of the peak value
      Returns:
      an int for status
    • computeTimeUsingConstantFractionDiscriminator Link icon

      public int computeTimeUsingConstantFractionDiscriminator()
      This methods extracts a time using the Constant Fraction Discriminator (CFD) algorithm as described in https://commons.wikimedia.org/wiki/File:CFD_Diagram1.jpg for example
      Returns:
      an int for status
    • extract Link icon

      public List<Pulse> extract(NamedEntry pars, int id, long timestamp, long time_ZS, short... samples)
      This method extracts relevant information from the waveform and builds a pulse from it
      Parameters:
      pars - CCDB row
      id - link to row in source bank
      timestamp - ...
      time_ZS - time_ZS time bin of the first channel of the AHDC pulse (linked to zero suppression; if ZS=0, time_ZS == 0)
      samples - ADC samples
    • update Link icon

      public void update(int n, IndexedTable it, DataEvent event, String wfBankName, String adcBankName)
      Description copied from class: HipoExtractor
      This could be overriden, e.g., for non-standard ADC banks.
      Overrides:
      update in class HipoExtractor
      Parameters:
      n - number of samples in readout
      it - CCDB table containing extraction initialization parameters
      event - the event to modify
      wfBankName - name of the input waveform bank
      adcBankName - name of the output ADC bank
    • update Link icon

      protected void update(int n, IndexedTable it, org.jlab.jnp.hipo4.data.Bank wfBank, org.jlab.jnp.hipo4.data.Bank adcBank)
      Description copied from class: HipoExtractor
      This could be overriden, e.g., for non-standard ADC banks.
      Overrides:
      update in class HipoExtractor
      Parameters:
      n - number of samples in readout
      it - CCDB table containing extraction initialization parameters
      wfBank - input waveform bank
      adcBank - output ADC bank