CbmRoot
Loading...
Searching...
No Matches
CbmStsParAsic Class Reference

Parameters of the STS readout ASIC. More...

#include <CbmStsParAsic.h>

Public Member Functions

 CbmStsParAsic ()
 Default constructor.
 
 CbmStsParAsic (uint16_t nChannels, uint16_t nAdc, double dynRange, double threshold, double timeResol, double deadTime, double noise, double znr)
 Constructor with parameters.
 
 CbmStsParAsic (const CbmStsParAsic &)
 Copy constructor (implicitely disable move constructor and assignment)
 
CbmStsParAsicoperator= (const CbmStsParAsic &other)
 Copy assignment operator.
 
 ~CbmStsParAsic ()
 Destructor.
 
double AdcToCharge (uint16_t adc) const
 Charge from ADC channel (mean)
 
uint16_t DeactivateRandomChannels (double fraction)
 Randomly deactivate a fraction of the channels.
 
uint16_t ChargeToAdc (double charge) const
 ADC channel for a given charge.
 
double GetDeadTime () const
 Single-channel dead time.
 
double GetDynRange () const
 Dynamic range of ADC.
 
uint16_t GetNofAdc () const
 Number of ADC channels.
 
uint16_t GetNofChannels () const
 Number of readout channels.
 
double GetNoise () const
 Electronic noise RMS.
 
double GetNoiseRate () const
 Single-channel noise rate.
 
double GetRandomNoiseCharge () const
 Random noise charge.
 
double GetThreshold () const
 ADC Threshold.
 
double GetTimeResol () const
 Time resolution.
 
double GetZeroNoiseRate () const
 Zero-crossing noise rate.
 
void Init ()
 Initialisation.
 
Bool_t IsChannelActive (uint16_t channel) const
 Check for a channel being active.
 
void Set (uint16_t nChannels, uint16_t nAdc, double dynRange, double threshold, double timeResol, double deadTime, double noise, double zeroNoiseRate, std::set< uint16_t > deadChannels={})
 Set parameters.
 
void SetTimeOffset (double offset)
 Set time offset.
 
void SetWalkCoef (std::array< double, 31 > par)
 Set coefficients for walk correction.
 
double GetWalkCoef (uint32_t uIdx) const
 Get one of the coefficients for walk correction.
 
std::string ToString () const
 Info to string.
 

Private Member Functions

 ClassDefNV (CbmStsParAsic, 4)
 

Private Attributes

uint16_t fNofChannels = 0
 Number of readout channels.
 
uint16_t fNofAdc = 0
 Number of ADC channels.
 
double fDynRange = 0.
 Dynamic range [e].
 
double fThreshold = 0.
 Threshold [e].
 
double fTimeResolution = 0.
 Time resolution [ns].
 
double fDeadTime = 0.
 Channel dead time [ns].
 
double fNoise = 0.
 RMS of noise [e].
 
double fZeroNoiseRate = 0.
 Zero-crossing noise rate [1/ns].
 
double fTimeOffset = 0.
 Time offset [ns].
 
std::array< double, 31 > fWalkCoef = {}
 Parameters for correction of walk effect.
 
std::set< uint16_t > fDeadChannels {}
 Map of dead channels.
 
bool fIsInit = kFALSE
 
TF1 * fNoiseCharge = nullptr
 Flag for being initialised.
 

Detailed Description

Parameters of the STS readout ASIC.

Author
Volker Friese v.fri.nosp@m.ese@.nosp@m.gsi.d.nosp@m.e
Since
23.03.2020

This class represents the configuration parameters of a readout ASIC of the STS (STSXYTER).

Definition at line 24 of file CbmStsParAsic.h.

Constructor & Destructor Documentation

◆ CbmStsParAsic() [1/3]

CbmStsParAsic::CbmStsParAsic ( )
inline

Default constructor.

Definition at line 28 of file CbmStsParAsic.h.

◆ CbmStsParAsic() [2/3]

CbmStsParAsic::CbmStsParAsic ( uint16_t nChannels,
uint16_t nAdc,
double dynRange,
double threshold,
double timeResol,
double deadTime,
double noise,
double znr )

Constructor with parameters.

Parameters
nChannelsNumber of readout channels
nAdcNumber of ADC channels
dynRangeDynamic range of ADC [e]
thresholdADC threshold [e]
timeResolTime resolution [ns]
deadTimeSingle-channel dead time [ns]
noiseNoise RMS [e]
znrZero-crossing noise rate [1/ns]

◆ CbmStsParAsic() [3/3]

CbmStsParAsic::CbmStsParAsic ( const CbmStsParAsic & other)

Copy constructor (implicitely disable move constructor and assignment)

Definition at line 30 of file CbmStsParAsic.cxx.

References fDeadTime, fDynRange, fNofAdc, fNofChannels, fNoise, fThreshold, fTimeOffset, fTimeResolution, fWalkCoef, fZeroNoiseRate, Set(), SetTimeOffset(), and SetWalkCoef().

◆ ~CbmStsParAsic()

CbmStsParAsic::~CbmStsParAsic ( )

Destructor.

Definition at line 51 of file CbmStsParAsic.cxx.

References fNoiseCharge.

Member Function Documentation

◆ AdcToCharge()

double CbmStsParAsic::AdcToCharge ( uint16_t adc) const
inline

Charge from ADC channel (mean)

Parameters
adcADC channel
Returns
Mean charge in ADC channel [e]

Definition at line 61 of file CbmStsParAsic.h.

References fDynRange, fNofAdc, and fThreshold.

Referenced by TEST(), TEST(), TEST(), and CbmStsAlgoAnaCluster::WeightedMean().

◆ ChargeToAdc()

uint16_t CbmStsParAsic::ChargeToAdc ( double charge) const
inline

ADC channel for a given charge.

Parameters
chargeCharge [e]
Returns
ADC channel number

Returns 0 for charge below threshold.

Definition at line 77 of file CbmStsParAsic.h.

References fDynRange, fNofAdc, and fThreshold.

Referenced by TEST(), TEST(), and TEST().

◆ ClassDefNV()

CbmStsParAsic::ClassDefNV ( CbmStsParAsic ,
4  )
private

◆ DeactivateRandomChannels()

uint16_t CbmStsParAsic::DeactivateRandomChannels ( double fraction)

Randomly deactivate a fraction of the channels.

Parameters
fractionFraction of channels to deactivate
Returns
Number of deactivated channels

Definition at line 58 of file CbmStsParAsic.cxx.

References fDeadChannels, fNofChannels, and IsChannelActive().

◆ GetDeadTime()

double CbmStsParAsic::GetDeadTime ( ) const
inline

Single-channel dead time.

Returns
Dead time [ns]

Definition at line 86 of file CbmStsParAsic.h.

References fDeadTime.

Referenced by CbmStsSimModule::AddSignal(), CbmStsDigitizeQaReport::Create(), CbmRecoSts::CreateModules(), and CbmTaskStsHitFinderParWrite::CreateModules().

◆ GetDynRange()

double CbmStsParAsic::GetDynRange ( ) const
inline

Dynamic range of ADC.

Returns
Dynamic range [e]

Definition at line 92 of file CbmStsParAsic.h.

References fDynRange.

Referenced by CbmStsDigitizeQaReport::Create(), CbmRecoSts::CreateModules(), CbmTaskStsHitFinderParWrite::CreateModules(), TEST(), and TEST().

◆ GetNofAdc()

uint16_t CbmStsParAsic::GetNofAdc ( ) const
inline

Number of ADC channels.

Returns
Number of ADC channels

Definition at line 98 of file CbmStsParAsic.h.

References fNofAdc.

Referenced by CbmStsDigitizeQaReport::Create(), CbmStsDigitizeQa::CreateDigiHistograms(), CbmRecoSts::CreateModules(), CbmTaskStsHitFinderParWrite::CreateModules(), TEST(), and TEST().

◆ GetNofChannels()

uint16_t CbmStsParAsic::GetNofChannels ( ) const
inline

Number of readout channels.

Returns
Number of readout channels

Definition at line 104 of file CbmStsParAsic.h.

References fNofChannels.

Referenced by CbmStsParModule::SetAllAsics().

◆ GetNoise()

double CbmStsParAsic::GetNoise ( ) const
inline

Electronic noise RMS.

Returns
Noise RMS [e]

Definition at line 110 of file CbmStsParAsic.h.

References fNoise.

Referenced by CbmStsAlgoAnaCluster::AnaSizeN(), CbmStsDigitizeQaReport::Create(), CbmRecoSts::CreateModules(), and CbmTaskStsHitFinderParWrite::CreateModules().

◆ GetNoiseRate()

double CbmStsParAsic::GetNoiseRate ( ) const

Single-channel noise rate.

Returns
Noise rate [1/s]

Definition at line 87 of file CbmStsParAsic.cxx.

References fNoise, fThreshold, and fZeroNoiseRate.

Referenced by ToString().

◆ GetRandomNoiseCharge()

double CbmStsParAsic::GetRandomNoiseCharge ( ) const

Random noise charge.

Returns
Charge of a random noise signal [e]

The noise charge is samples from a Gaussian with zero mean and width equal to the noise RMS, starting from threshold and up to 10 times the noise RMS.

Definition at line 97 of file CbmStsParAsic.cxx.

References fIsInit, and fNoiseCharge.

◆ GetThreshold()

double CbmStsParAsic::GetThreshold ( ) const
inline

ADC Threshold.

Returns
Threshold [e]

Definition at line 132 of file CbmStsParAsic.h.

References fThreshold.

Referenced by CbmStsDigitizeQaReport::Create(), CbmRecoSts::CreateModules(), CbmTaskStsHitFinderParWrite::CreateModules(), TEST(), TEST(), TEST(), and TEST().

◆ GetTimeResol()

double CbmStsParAsic::GetTimeResol ( ) const
inline

◆ GetWalkCoef()

double CbmStsParAsic::GetWalkCoef ( uint32_t uIdx) const
inline

Get one of the coefficients for walk correction.

Parameters
uIdxIndex of the correction parameter
Returns
Double value of coeff

Definition at line 193 of file CbmStsParAsic.h.

References fWalkCoef.

◆ GetZeroNoiseRate()

double CbmStsParAsic::GetZeroNoiseRate ( ) const
inline

Zero-crossing noise rate.

Returns
Zero-crossing noise rate [1/ns]

Definition at line 144 of file CbmStsParAsic.h.

References fZeroNoiseRate.

Referenced by CbmRecoSts::CreateModules(), and CbmTaskStsHitFinderParWrite::CreateModules().

◆ Init()

void CbmStsParAsic::Init ( )

Initialisation.

Calculates the noise charge distribution.

Definition at line 106 of file CbmStsParAsic.cxx.

References fIsInit, fNoise, fNoiseCharge, and fThreshold.

Referenced by Set(), and CbmStsParModule::SetAllAsics().

◆ IsChannelActive()

Bool_t CbmStsParAsic::IsChannelActive ( uint16_t channel) const
inline

Check for a channel being active.

Parameters
channelChannel number within ASIC
Returns
True if the channel is active

Definition at line 158 of file CbmStsParAsic.h.

References fDeadChannels.

Referenced by DeactivateRandomChannels(), and CbmStsParModule::IsChannelActive().

◆ operator=()

CbmStsParAsic & CbmStsParAsic::operator= ( const CbmStsParAsic & other)

◆ Set()

void CbmStsParAsic::Set ( uint16_t nChannels,
uint16_t nAdc,
double dynRange,
double threshold,
double timeResol,
double deadTime,
double noise,
double zeroNoiseRate,
std::set< uint16_t > deadChannels = {} )

Set parameters.

Parameters
nChannelsNumber of readout channels
nAdcNumber of ADC channels
dynRangeDynamic range [e]
thresholdThreshold [e]
timeResolTime resolution [ns]
deadTimeChannel dead time [ns]
noiseNoise RMS
zeroNoiseRateZero-crossing noise rate
deadChannelsSet of dead channels

Definition at line 117 of file CbmStsParAsic.cxx.

References fDeadChannels, fDeadTime, fDynRange, fNofAdc, fNofChannels, fNoise, fThreshold, fTimeResolution, fZeroNoiseRate, and Init().

Referenced by CbmStsParAsic(), and operator=().

◆ SetTimeOffset()

void CbmStsParAsic::SetTimeOffset ( double offset)
inline

Set time offset.

Parameters
offsetTime offset for this ASIC [ns]

The time offset will be subtracted from the message at the unpacking stage.

Definition at line 181 of file CbmStsParAsic.h.

References fTimeOffset.

Referenced by CbmStsParAsic(), and operator=().

◆ SetWalkCoef()

void CbmStsParAsic::SetWalkCoef ( std::array< double, 31 > par)
inline

Set coefficients for walk correction.

Parameters
parArray of correction parameters

Definition at line 187 of file CbmStsParAsic.h.

References fWalkCoef.

Referenced by CbmStsParAsic(), and operator=().

◆ ToString()

std::string CbmStsParAsic::ToString ( ) const

Member Data Documentation

◆ fDeadChannels

std::set<uint16_t> CbmStsParAsic::fDeadChannels {}
private

Map of dead channels.

Definition at line 214 of file CbmStsParAsic.h.

Referenced by DeactivateRandomChannels(), IsChannelActive(), and Set().

◆ fDeadTime

double CbmStsParAsic::fDeadTime = 0.
private

Channel dead time [ns].

Definition at line 209 of file CbmStsParAsic.h.

Referenced by CbmStsParAsic(), GetDeadTime(), operator=(), Set(), and ToString().

◆ fDynRange

double CbmStsParAsic::fDynRange = 0.
private

Dynamic range [e].

Definition at line 206 of file CbmStsParAsic.h.

Referenced by AdcToCharge(), CbmStsParAsic(), ChargeToAdc(), GetDynRange(), operator=(), Set(), and ToString().

◆ fIsInit

bool CbmStsParAsic::fIsInit = kFALSE
private

Definition at line 216 of file CbmStsParAsic.h.

Referenced by GetRandomNoiseCharge(), and Init().

◆ fNofAdc

uint16_t CbmStsParAsic::fNofAdc = 0
private

Number of ADC channels.

Definition at line 205 of file CbmStsParAsic.h.

Referenced by AdcToCharge(), CbmStsParAsic(), ChargeToAdc(), GetNofAdc(), operator=(), Set(), and ToString().

◆ fNofChannels

uint16_t CbmStsParAsic::fNofChannels = 0
private

Number of readout channels.

Definition at line 204 of file CbmStsParAsic.h.

Referenced by CbmStsParAsic(), DeactivateRandomChannels(), GetNofChannels(), operator=(), and Set().

◆ fNoise

double CbmStsParAsic::fNoise = 0.
private

RMS of noise [e].

Definition at line 210 of file CbmStsParAsic.h.

Referenced by CbmStsParAsic(), GetNoise(), GetNoiseRate(), Init(), operator=(), Set(), and ToString().

◆ fNoiseCharge

TF1* CbmStsParAsic::fNoiseCharge = nullptr
private

Flag for being initialised.

Noise charge distribution. Is instantiated by the Init method in order to avoid frequent re-calculation.

Definition at line 220 of file CbmStsParAsic.h.

Referenced by GetRandomNoiseCharge(), Init(), and ~CbmStsParAsic().

◆ fThreshold

double CbmStsParAsic::fThreshold = 0.
private

Threshold [e].

Definition at line 207 of file CbmStsParAsic.h.

Referenced by AdcToCharge(), CbmStsParAsic(), ChargeToAdc(), GetNoiseRate(), GetThreshold(), Init(), operator=(), Set(), and ToString().

◆ fTimeOffset

double CbmStsParAsic::fTimeOffset = 0.
private

Time offset [ns].

Definition at line 212 of file CbmStsParAsic.h.

Referenced by CbmStsParAsic(), operator=(), and SetTimeOffset().

◆ fTimeResolution

double CbmStsParAsic::fTimeResolution = 0.
private

Time resolution [ns].

Definition at line 208 of file CbmStsParAsic.h.

Referenced by CbmStsParAsic(), GetTimeResol(), operator=(), Set(), and ToString().

◆ fWalkCoef

std::array<double, 31> CbmStsParAsic::fWalkCoef = {}
private

Parameters for correction of walk effect.

Definition at line 213 of file CbmStsParAsic.h.

Referenced by CbmStsParAsic(), GetWalkCoef(), operator=(), and SetWalkCoef().

◆ fZeroNoiseRate

double CbmStsParAsic::fZeroNoiseRate = 0.
private

Zero-crossing noise rate [1/ns].

Definition at line 211 of file CbmStsParAsic.h.

Referenced by CbmStsParAsic(), GetNoiseRate(), GetZeroNoiseRate(), operator=(), Set(), and ToString().


The documentation for this class was generated from the following files: