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 Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    assignInvalidType(org.jlab.detector.pulse.ModeAHDC.AHDCPulse p)
    This method assigns an invalid type (-1) to the waveform
    void
    assignValidType(int type, org.jlab.detector.pulse.ModeAHDC.AHDCPulse p)
    This method assigns a new type to the waveform by checking if another more restrictive type had already been assigned
    void
    baselineComputation(org.jlab.detector.pulse.ModeAHDC.AHDCPulse p)
    This method computes the waveform baseline from the average of the first few samples
    int
    computeTimeUsingConstantFractionDiscriminator(org.jlab.detector.pulse.ModeAHDC.AHDCPulse p)
    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
    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
    void
    preProcess(org.jlab.detector.pulse.ModeAHDC.AHDCPulse p)
     
    void
    update(int n, IndexedTable it, DataEvent event, String wfBankName, String adcBankName)
    This could be overriden, e.g., for non-standard ADC banks.
    protected void
    update(int n, IndexedTable it, org.jlab.jnp.hipo4.data.Bank wfBank, org.jlab.jnp.hipo4.data.Bank adcBank)
    This could be overriden, e.g., for non-standard ADC banks.
    int
    waveformADCProcessing(org.jlab.detector.pulse.ModeAHDC.AHDCPulse p)
    This method subtracts the baseline, computes the max ADC and corresponding time and the integral of the wf
    int
    waveformCFAprocessing(org.jlab.detector.pulse.ModeAHDC.AHDCPulse p)
    This method computes the leading edge time and time over threshold over a constant fraction of the peak value

    Methods inherited from class org.jlab.detector.pulse.HipoExtractor

    copyIndices, copyIndices, getIndices, getIndices, getPulses, getPulses, update

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ModeAHDC

      public ModeAHDC()
  • Method Details

    • preProcess

      public void preProcess(org.jlab.detector.pulse.ModeAHDC.AHDCPulse p)
    • baselineComputation

      public void baselineComputation(org.jlab.detector.pulse.ModeAHDC.AHDCPulse p)
      This method computes the waveform baseline from the average of the first few samples
    • assignValidType

      public void assignValidType(int type, org.jlab.detector.pulse.ModeAHDC.AHDCPulse p)
      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

      public void assignInvalidType(org.jlab.detector.pulse.ModeAHDC.AHDCPulse p)
      This method assigns an invalid type (-1) to the waveform
    • waveformADCProcessing

      public int waveformADCProcessing(org.jlab.detector.pulse.ModeAHDC.AHDCPulse p)
      This method subtracts the baseline, computes the max ADC and corresponding time and the integral of the wf
      Returns:
      an int for status
    • waveformCFAprocessing

      public int waveformCFAprocessing(org.jlab.detector.pulse.ModeAHDC.AHDCPulse p)
      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

      public int computeTimeUsingConstantFractionDiscriminator(org.jlab.detector.pulse.ModeAHDC.AHDCPulse p)
      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

      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

      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

      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