Contents
- Description
- Constructor Summary
- Method Summary
- Constructor Details
- Method Details
- baselineSlope()
- baselineComputation()
- assignValidType(int)
- assignInvalidType()
- waveformADCProcessing()
- waveformCFAprocessing()
- computeTimeUsingConstantFractionDiscriminator()
- extract(NamedEntry, int, long, long, short...)
- update(int, IndexedTable, DataEvent, String, String)
- update(int, IndexedTable, Bank, Bank)
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 TypeMethodDescriptionvoid
This method assigns an invalid type (-1) to the waveformvoid
assignValidType
(int type) This method assigns a new type to the waveform by checking if another more restrictive type had already been assignedvoid
This method computes the waveform baseline from the average of the first few samplesvoid
This method checks if the wf starts with a flat baselineint
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 itvoid
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
This method subtracts the baseline, computes the max ADC and corresponding time and the integral of the wfint
This method computes the leading edge time and time over threshold over a constant fraction of the peak valueMethods inherited from class org.jlab.detector.pulse.HipoExtractor
copyIndices, copyIndices, getIndices, getIndices, getPulses, getPulses, update
-
Constructor Details
-
Method Details
-
baselineSlope
public void baselineSlope()This method checks if the wf starts with a flat baseline -
baselineComputation
public void baselineComputation()This method computes the waveform baseline from the average of the first few samples -
assignValidType
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
public void assignInvalidType()This method assigns an invalid type (-1) to the waveform -
waveformADCProcessing
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
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
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
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:HipoExtractor
This could be overriden, e.g., for non-standard ADC banks.- Overrides:
update
in 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:HipoExtractor
This could be overriden, e.g., for non-standard ADC banks.- Overrides:
update
in classHipoExtractor
- Parameters:
n
- number of samples in readoutit
- CCDB table containing extraction initialization parameterswfBank
- input waveform bankadcBank
- output ADC bank
-