Class ModeAHDC
java.lang.Object
org.jlab.detector.pulse.HipoExtractor
org.jlab.detector.pulse.ModeAHDC
- All Implemented Interfaces:
IExtractor
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 -
Method Summary
Modifier and TypeMethodDescriptionvoidassignInvalidType(org.jlab.detector.pulse.ModeAHDC.AHDCPulse p) This method assigns an invalid type (-1) to the waveformvoidassignValidType(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 assignedvoidbaselineComputation(org.jlab.detector.pulse.ModeAHDC.AHDCPulse p) This method computes the waveform baseline from the average of the first few samplesintcomputeTimeUsingConstantFractionDiscriminator(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 exampleextract(NamedEntry pars, int id, long timestamp, long time_ZS, short... samples) This method extracts relevant information from the waveform and builds a pulse from itvoidpreProcess(org.jlab.detector.pulse.ModeAHDC.AHDCPulse p) voidupdate(int n, IndexedTable it, DataEvent event, String wfBankName, String adcBankName) This could be overriden, e.g., for non-standard ADC banks.protected voidupdate(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.intwaveformADCProcessing(org.jlab.detector.pulse.ModeAHDC.AHDCPulse p) This method subtracts the baseline, computes the max ADC and corresponding time and the integral of the wfintwaveformCFAprocessing(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 valueMethods inherited from class HipoExtractor
copyIndices, copyIndices, getIndices, getIndices, getPulses, getPulses, update
-
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
This method extracts relevant information from the waveform and builds a pulse from it- Parameters:
pars- CCDB rowid- link to row in source banktimestamp- ...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
Description copied from class:HipoExtractorThis could be overriden, e.g., for non-standard ADC banks.- Overrides:
updatein classHipoExtractor- Parameters:
n- number of samples in readoutit- CCDB table containing extraction initialization parametersevent- the event to modifywfBankName- name of the input waveform bankadcBankName- 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:HipoExtractorThis could be overriden, e.g., for non-standard ADC banks.- Overrides:
updatein classHipoExtractor- Parameters:
n- number of samples in readoutit- CCDB table containing extraction initialization parameterswfBank- input waveform bankadcBank- output ADC bank
-