MarlinTPC
1.2.0
|
A simple Gaussian shaping. More...
#include <GaussianADCPulse.h>
Public Member Functions | |
GaussianADCPulse (double frequencyMHz, double riseTime, double asymmetry, 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 Attributes | |
double | _riseTime |
Rise time of the pulse. | |
double | _asym |
double | _sqrt2_sigma |
![]() | |
![]() | |
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 | |
A simple Gaussian shaping.
The shaping is implemented as a Gaussian smearing, the left edge (-2 from the centre of the Gaussian) is the time when the charge arrives. Afterwards the number of electrons arriving in the time bins is calculated by integrating the Gaussian within this time bin. An asymmetry can be assigned to the Gaussian to account for slower falling tails
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::GaussianADCPulse::GaussianADCPulse | ( | double | frequencyMHz, |
double | riseTime, | ||
double | asymmetry, | ||
double | nElectronsDynamicRange, | ||
int | ADCMaxValue, | ||
int | threshold | ||
) |
The constructor.
frequency | ADC readout frequency in MHz |
riseTime | The rise time of the pulse in ns |
asymmetry | between width left and right of maximum: w_left=asym*w_right |
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 auf 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, marlintpc::ADCPulse::_frequencyGHz, _sqrt2_sigma, 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, marlintpc::ADCPulse::_rawData, _riseTime, _sqrt2_sigma, marlintpc::ADCPulse::_startBin, marlintpc::ADCPulse::_timeJitter, marlintpc::ADCPulse::_useJitter, and marlintpc::ADCPulse::getEndTime().
|
protected |
is often needed during calculation, where
= riseTime / 3 is the width of the Gaussian
Referenced by add(), and GaussianADCPulse().