Class ModeAHDC
java.lang.Object
ModeAHDC
A new extraction method dedicated to the AHDC signal waveform
Some blocks of code are inspired by MVTFitter.java
- Author:
- ftouchte
-
Field Summary
Modifier and TypeFieldDescriptionstatic final short
private float
short
float
int
private int
private int
private int
float
float
private float
private short[]
float
int
private float
private float
private float
private float
private float
private long
long
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate void
computeTimeAtConstantFractionAmplitude
(float samplingTime, float amplitudeFractionCFA) This method determines the moment when the signal reaches a Constant Fraction of its Amplitude (i.e fraction*adcMax) It fills the attributs : timeRiseCFA, timeFallCFA, timeOverThresholdCFAprivate void
computeTimeUsingConstantFractionDiscriminator
(float samplingTime, float fractionCFD, int binDelayCFD) This methods extracts a time using the Constant Fraction Discriminator (CFD) algorithm It fills the attribut : timeCFDextract
(short... samples) This method extracts relevant informations from the digitized signal (the samples) and store them in a Pulseprivate void
fineTimeStampCorrection
(long timeStamp, float fineTimeStampResolution) From MVTFitter.java Make fine timestamp correction (using dream (=electronic chip) clock)private void
fitAverage
(float samplingTime) This method gives a more precise value of the max of the waveform by computing the average of five points around the binMax It is an alternative to fitParabolic() The suitability of one of these fits can be the subject of a study Remark : This method updates adcMax but doesn't change timeMaxprivate void
fitParabolic
(float samplingTime) Fit the max of the pulse using parabolic fit, this method updates the timeMax and adcMax valuesstatic void
private void
waveformCorrection
(short[] samples, short adcOffset, float samplingTime, int sparseSample) This method subtracts the pedestal (noise) from samples and stores it in : samplesCorr It also computes a first value for : adcMax, binMax, timeMax and integral This code is inspired by the one of MVTFitter.java
-
Field Details
-
samplingTime
public float samplingTime -
sparseSample
public int sparseSample -
adcOffset
public short adcOffset -
timeStamp
public long timeStamp -
fineTimeStampResolution
public float fineTimeStampResolution -
ADC_LIMIT
public static final short ADC_LIMIT- See Also:
-
amplitudeFractionCFA
public float amplitudeFractionCFA -
binDelayCFD
public int binDelayCFD -
fractionCFD
public float fractionCFD -
binMax
private int binMax -
binOffset
private int binOffset -
adcMax
private float adcMax -
timeMax
private float timeMax -
integral
private float integral -
timestamp
private long timestamp -
samplesCorr
private short[] samplesCorr -
binNumber
private int binNumber -
timeRiseCFA
private float timeRiseCFA -
timeFallCFA
private float timeFallCFA -
timeOverThresholdCFA
private float timeOverThresholdCFA -
timeCFD
private float timeCFD
-
-
Constructor Details
-
ModeAHDC
public ModeAHDC()
-
-
Method Details
-
extract
This method extracts relevant informations from the digitized signal (the samples) and store them in a Pulse- Parameters:
pars
- CCDB rowid
- link to row in source banksamples
- ADC samples
-
waveformCorrection
private void waveformCorrection(short[] samples, short adcOffset, float samplingTime, int sparseSample) This method subtracts the pedestal (noise) from samples and stores it in : samplesCorr It also computes a first value for : adcMax, binMax, timeMax and integral This code is inspired by the one of MVTFitter.java- Parameters:
samples
- ADC samplesadcOffset
- pedestal or noise levelsamplingTime
- time between two adc binssparseSample
- used to define binOffset
-
fitAverage
private void fitAverage(float samplingTime) This method gives a more precise value of the max of the waveform by computing the average of five points around the binMax It is an alternative to fitParabolic() The suitability of one of these fits can be the subject of a study Remark : This method updates adcMax but doesn't change timeMax- Parameters:
samplingTime
- time between 2 ADC bins
-
fitParabolic
private void fitParabolic(float samplingTime) Fit the max of the pulse using parabolic fit, this method updates the timeMax and adcMax values- Parameters:
samplingTime
- time between 2 ADC bins
-
fineTimeStampCorrection
private void fineTimeStampCorrection(long timeStamp, float fineTimeStampResolution) From MVTFitter.java Make fine timestamp correction (using dream (=electronic chip) clock)- Parameters:
timeStamp
- timing informations (used to make fine corrections)fineTimeStampResolution
- precision of dream clock (usually 8)
-
computeTimeAtConstantFractionAmplitude
private void computeTimeAtConstantFractionAmplitude(float samplingTime, float amplitudeFractionCFA) This method determines the moment when the signal reaches a Constant Fraction of its Amplitude (i.e fraction*adcMax) It fills the attributs : timeRiseCFA, timeFallCFA, timeOverThresholdCFA- Parameters:
samplingTime
- time between 2 ADC binsamplitudeFraction
- amplitude fraction between 0 and 1
-
computeTimeUsingConstantFractionDiscriminator
private void computeTimeUsingConstantFractionDiscriminator(float samplingTime, float fractionCFD, int binDelayCFD) This methods extracts a time using the Constant Fraction Discriminator (CFD) algorithm It fills the attribut : timeCFD- Parameters:
samplingTime
- time between 2 ADC binsfractionCFD
- CFD fraction parameter between 0 and 1binDelayCFD
- CFD delay parameter
-
main
-