MarlinTPC
1.2.0
|
Implementation of the ALTRO electronics shaping and ADC. More...
#include <ALTROADCPulse.h>
Public Member Functions | |
ALTROADCPulse (double frequencyMHz, double peakingTime, double nElectronsDynamicRange, int ADCMaxValue, int threshold) | |
The constructor. More... | |
void | add (double startTime, int nElectrons) |
Add signal from charge (nElectrons) arriving. More... | |
![]() | |
ADCPulse (double frequencyMHz, int ADCMaxValue, int threshold) | |
virtual double | getEndTime () const |
Get the end time of the last bin in the pulse (in ns) | |
virtual int | getStartBin () const |
virtual int | getChannelNumber () const |
Returns the channel number. | |
virtual int | getModuleID () const |
Returns the module ID. | |
virtual void | clear (int newChannelNumber, int modID=0, int noiseSwitch=0, double noiseLevel=0.0, double noiseWidth=0.0, double noiseCutoff=4.0) |
Clear the data vector, set startBin to -1, set the new channel number, set random noise parameters. | |
virtual void | setJitterValues (std::map< int, double > timeJitter) |
clock jitter values for an event | |
virtual const std::vector < float > & | getRawDataVec () const |
Provides access to the raw data of the pulse. | |
virtual std::list < EVENT::TrackerRawData * > | getLCIORawData () const |
Returns a vector of TrackerRawData objects to be stored in an lcio file. More... | |
Protected Member Functions | |
double | _gamma4 (double x, double ADCChargeValue, double startTime) |
gamma4 shaping function | |
Protected Attributes | |
double | _g4Par1 |
shaping function order | |
double | _g4expPar1 |
helper variable to avoid recalculation: exp(shaping function order) | |
double | _peakingTime |
Peaking time ALTRO electronics in ns(time from start of pulse to maximum) | |
![]() | |
std::vector< float > | _rawData |
The raw data of the pulse, still in floats to avoid rounding errors. | |
double | _frequencyGHz |
Readout frequency of the ADC in GHz. | |
int | _ADCMaxValue |
The maximum of the dynamic range in ADC counts. | |
int | _startBin |
The bin number of the first entry in the data vector. | |
int | _channelNumber |
The channel in which the pulse is simulated. | |
int | _moduleID |
double | _ADCChargeFactor |
The factor to multiply the number of electron per bin to obtain. More... | |
float | _ADCThreshold |
The threshold of the ADC (in ADC counts) | |
bool | _addNoise |
whether to add noise to the ADC signal or not | |
double | _padNoise |
Central value of the pedestal width used to add noise to the ADC spectrum. | |
bool | _useJitter |
if clock jitter should be used | |
std::map< int, double > | _timeJitter |
clock jitter: map of zBin, jitter | |
Implementation of the ALTRO electronics shaping and ADC.
the ADC and its shaping amplifier.
The shaping is implemented with a Gamma4 function. The height is given by the number of electrons.
Charge arriving at different times can be added to one pulse. However, there are two limitations to get proper results:
For convenience this class also holds the channel number.
marlintpc::ALTROADCPulse::ALTROADCPulse | ( | double | frequencyMHz, |
double | peakingTime, | ||
double | nElectronsDynamicRange, | ||
int | ADCMaxValue, | ||
int | threshold | ||
) |
The constructor.
frequency | ADC readout frequency in MHz |
peakingTime | Peaking time ALTRO electronics in ns (time from start of pulse to maximum) |
nElectronsDynamicRange | The number of electrons which correspond to the dynamic range of the ADC (ADCMaxValue) |
ADCMaxValue | The dynamic range of the ADC in ADC counts |
threshold | Minimum number of ADC counts for a sample to be accepted. Attention: A threshold of 0 turns off part of the zero suppression. 1 is the smallest reasonable value. The parameter intentionally is an int. It will be converted to float internally. |
References marlintpc::ADCPulse::_ADCChargeFactor, marlintpc::ADCPulse::_ADCMaxValue, _g4expPar1, _g4Par1, and marlintpc::ADCPulse::_useJitter.
|
virtual |
Add signal from charge (nElectrons) arriving.
at startTime
to the pulse
Implements marlintpc::ADCPulse.
References marlintpc::ADCPulse::_ADCChargeFactor, marlintpc::ADCPulse::_frequencyGHz, _gamma4(), _peakingTime, marlintpc::ADCPulse::_rawData, marlintpc::ADCPulse::_startBin, marlintpc::ADCPulse::_timeJitter, marlintpc::ADCPulse::_useJitter, and marlintpc::ADCPulse::getEndTime().