CbmRoot
|
#include <CbmTrdSpadic.h>
Public Types | |
enum class | eResponsePars : size_t { kShapingTime = 0 , kShapingOrder , kInputCharge , kBinTimeshift , kNrPresamples , kChargeToMaxAdcCal , kMipCal } |
enum for response parameters More... | |
Public Member Functions | |
CbmTrdSpadic () | |
Construct a new CbmTrdSpadic object Default and standard c'tor for a CbmTrdSpadic object. | |
CbmTrdSpadic (const CbmTrdSpadic &)=delete | |
Copy construct a new CbmTrdSpadic object (not implemented!) | |
CbmTrdSpadic & | operator= (const CbmTrdSpadic &) |
Assignment of CbmTrdSpadic objects (not implemented!) | |
virtual | ~CbmTrdSpadic () |
Destroy the Cbm Trd Spadic object. | |
Double_t | GetParameter (eResponsePars partype) |
Get the Parameter value. | |
std::vector< std::int16_t > | GetAnalogResponsePulse (Double_t inputCharge, Double_t binTimeshift=0.0) |
Get the Analog Response to a given input charge per adc time bin. | |
Int_t | GetNoise (Double_t sigmaNoise) |
Get a Noise value based on the width of the noise distribution in sigmas. | |
UInt_t | GetBaselineLvl () |
Get the Baseline Lvl value. | |
template<class Pulse > | |
void | ApplyClipping (Pulse *pulse) |
Check the passed pulse for samples in clipping and reduce the value of those to fClippingStart. | |
Double_t | GetAnalyticTimeshift (Double_t absolutetime) |
Get the Analytic Timeshift value ns precision Calculate the timeshift within the spadic response based on the idea that on an analytical base it is only related to the offset between the clock cycle and the absolute time. | |
UInt_t | GetDynamicRange () |
Get the Dynamic Range value. | |
UInt_t | GetPeakingSamplePos () |
Get the Peaking Sample Pos. | |
Int_t | GetClippingStart () |
Get the Clipping Start value. | |
Float_t | GetAdcNoiseLevel () |
Get the Adc Noise Level value. | |
Float_t | GetMaxAdcToEnergyCal () |
Get the Max Adc To Energy Cal value. | |
Double_t | GetMipCalibration () |
Get the MaxAdc to Mip Calibration value. | |
Float_t | GetModuleThickness () |
Get the Module Thickness value. | |
bool | GetUseBaselineAvg () |
Get the Use Baseline Avg flag. | |
Float_t | MaxAdcToEnergyCal (Float_t maxadc) |
Return energy [keV (MC input GeV)] for a given max adc value, based on max adc to energy calibration. | |
template<class precision > | |
CbmTrdDigi::eTriggerType | GetTriggerDecision (std::vector< precision > *pulse, UInt_t *sndtriggersample=nullptr) |
Get the Trigger Decision Get the trigger decision for the spadic. Currently this is based on the & differential trigger approach. | |
void | SetDynamicRange (UInt_t value) |
Set the Dynamic Range value. | |
void | SetClippingStart (Int_t value) |
Set the Clipping Start value. | |
void | SetNoiseLevel (Double_t value) |
void | SetFstTriggerSlopeCondition (Double_t value) |
Set the Trigger Slope Condition value. | |
void | SetSndTriggerSlopeCondition (Double_t value) |
Set the Trigger Slope Condition value. | |
void | SetMaxAdcToEnergyCal (Double_t value) |
Set the Max Adc To Energy Cal value. | |
void | SetMipCalibration (Double_t value) |
Set the max adc to mip calibration value. | |
void | SetModuleThickness (Double_t value) |
Set the Module Thickness value. | |
void | SetBaselineLvl (UInt_t value) |
Set the Baseline Lvl value. | |
void | SetUseBaselineAverage (bool value=true) |
Set the Use Baseline Average flag. | |
Double_t | Response (UInt_t samplenr) |
Response of the SPADIC v2.2 to an input charge, for a given timesample. | |
void | SetParameter (eResponsePars ipar, Double_t value) |
ClassDef (CbmTrdSpadic, 2) | |
Static Public Member Functions | |
static UInt_t | GetNrChannels () |
static std::shared_ptr< TF1 > | GetResponseFunc () |
Get a TF1 response function object. | |
static constexpr UInt_t | GetNrOfAdcSamples () |
Get the Nr Of Adc Samples (Spadic default) | |
static constexpr UInt_t | GetNrOfPresamples () |
Get the Nr Of Preamples. | |
static constexpr UInt_t | GetShapingOrder () |
Get the Shaping Order. | |
static Float_t | GetShapingTime () |
Get the Shaping Time (Spadic default) | |
static Double_t | GetClockCycle () |
Get the Clock Cycle. | |
static Double_t | GetChargeToMaxAdcCal () |
Get the Charge To Max Adc Calibration value. | |
static Double_t | Response (Double_t *samplenr, Double_t *par) |
Response of the SPADIC v2.2 to an input charge, for a given timesample. | |
Private Attributes | |
std::vector< Double_t > | fvecResponsePars |
Vector for the response parameters. Order based on eResponsePars. The given values here correspond to the design/default values for SPADIC v2.2. | |
UInt_t | fDynamicRange = std::pow(2, 9) |
Dynamic range of the spadic The Spadic uses a 9-Bit ADC. | |
Int_t | fClippingStart = fDynamicRange |
Value where a analog and or digital clipping appears By default it is set to the dynamic range of Spadic. | |
Int_t | fTriggerSlopeConditionFst = 15 |
Slope trigger condition for a two stage differential triggger. | |
Int_t | fTriggerSlopeConditionSnd = 9 |
Slope trigger condition for a two stage differential triggger. | |
Float_t | fModuleThickness = 1.20 |
Thickness of the module [cm] this spadic is mounted on. Should be setted during runtime from parameters. For the time being the default 1.2 cm should be fine, since all modules with spadics have the same thickness. | |
UInt_t | fBaselineLvl = 0 |
Baseline level of the current Spadic Used for MaxAdcToMip calibration and baseline placement in Analogue Response. | |
Float_t | fMaxAdcToMipCal |
Calibration for MIP to 7% of MaxAdc dynamic range. 0.65 = charge from PRF broad distribution on central pad fModuleThickness * CbmTrdMipDeDx() = mean deposited mip energy per chamber fgChargeToMaxAdcCal = Factor between input charge for spadic response and max adc value handled in response function 0.08 * (fDynamicRange - 10) = 8% of the dynamic range with 10 ADU as baseline approximation. | |
Float_t | fMaxAdcToEnergyCal = fMaxAdcToMipCal |
Calibration value to calculate energy in keV based on the max adc value. Default = Simulation calibration. | |
Float_t | fNoiseLvl = 1 |
Noise level for signal response simulation [gaus sigmas]. | |
bool | fDoUseBaselineAvg = false |
Flag wether we have n standard presamples or the average baseline in a single presamples. | |
Static Private Attributes | |
static const Double_t | fgClockCycleLength = CbmTrdDigi::Clk(CbmTrdDigi::eCbmTrdAsicType::kSPADIC) |
Clockcycle length of SPADIC v2.2. | |
static constexpr UInt_t | fgNrOfAdcSamples = 32 |
Number of ADC samples. | |
static const Double_t | fgShapingTime = 120.0 |
Spadic shaping time. | |
static constexpr UInt_t | fgShapingOrder = 1 |
Spadic Shaping order. | |
static constexpr UInt_t | fgNrOfPresamples = 1 |
Number of presamples in the ADC signal in front of the actual signal. | |
static const Double_t | fgChargeToMaxAdcCal = 2.73 |
Calibration factor for input charges. | |
Definition at line 36 of file CbmTrdSpadic.h.
|
strong |
enum for response parameters
Enumerator | |
---|---|
kShapingTime | |
kShapingOrder | |
kInputCharge | |
kBinTimeshift | |
kNrPresamples | |
kChargeToMaxAdcCal | |
kMipCal |
Definition at line 70 of file CbmTrdSpadic.h.
CbmTrdSpadic::CbmTrdSpadic | ( | ) |
Construct a new CbmTrdSpadic object Default and standard c'tor for a CbmTrdSpadic object.
Definition at line 24 of file CbmTrdSpadic.cxx.
|
delete |
Copy construct a new CbmTrdSpadic object (not implemented!)
|
virtual |
Destroy the Cbm Trd Spadic object.
Definition at line 25 of file CbmTrdSpadic.cxx.
|
inline |
Check the passed pulse for samples in clipping and reduce the value of those to fClippingStart.
Pulse |
pulse |
Definition at line 187 of file CbmTrdSpadic.h.
References fClippingStart.
CbmTrdSpadic::ClassDef | ( | CbmTrdSpadic | , |
2 | ) |
|
inline |
Get the Adc Noise Level value.
Definition at line 232 of file CbmTrdSpadic.h.
References fNoiseLvl.
std::vector< std::int16_t > CbmTrdSpadic::GetAnalogResponsePulse | ( | Double_t | inputCharge, |
Double_t | binTimeshift = 0.0 ) |
Get the Analog Response to a given input charge per adc time bin.
If fNoiseLvl is set to a value above 0 it is automatically added to the response.
inputCharge | [keV] and not calibrated to MIP see fgMaxAdcMipCalibration |
binTimeshift | timeshift of the signal within a CC [ns] |
Definition at line 71 of file CbmTrdSpadic.cxx.
References fBaselineLvl, fClippingStart, fMaxAdcToMipCal, fNoiseLvl, fvecResponsePars, GetNoise(), GetNrOfAdcSamples(), kBinTimeshift, kInputCharge, kNrPresamples, Response(), and SetParameter().
Double_t CbmTrdSpadic::GetAnalyticTimeshift | ( | Double_t | absolutetime | ) |
Get the Analytic Timeshift value ns precision Calculate the timeshift within the spadic response based on the idea that on an analytical base it is only related to the offset between the clock cycle and the absolute time.
absolutetime |
Definition at line 107 of file CbmTrdSpadic.cxx.
References GetClockCycle().
|
inline |
Get the Baseline Lvl value.
Definition at line 177 of file CbmTrdSpadic.h.
References fBaselineLvl.
|
inlinestatic |
Get the Charge To Max Adc Calibration value.
Definition at line 138 of file CbmTrdSpadic.h.
References fgChargeToMaxAdcCal.
|
inline |
Get the Clipping Start value.
Definition at line 225 of file CbmTrdSpadic.h.
References fClippingStart.
|
inlinestatic |
Get the Clock Cycle.
Definition at line 131 of file CbmTrdSpadic.h.
References fgClockCycleLength.
Referenced by CbmTrdRawToDigiFitR::fixExtractionPars(), and GetAnalyticTimeshift().
|
inline |
Get the Dynamic Range value.
Definition at line 209 of file CbmTrdSpadic.h.
References fDynamicRange.
|
inline |
Get the Max Adc To Energy Cal value.
Definition at line 239 of file CbmTrdSpadic.h.
References fMaxAdcToEnergyCal.
|
inline |
Get the MaxAdc to Mip Calibration value.
Definition at line 246 of file CbmTrdSpadic.h.
References fMaxAdcToMipCal.
|
inline |
Get the Module Thickness value.
Definition at line 254 of file CbmTrdSpadic.h.
References fModuleThickness.
Int_t CbmTrdSpadic::GetNoise | ( | Double_t | sigmaNoise | ) |
Get a Noise value based on the width of the noise distribution in sigmas.
sigmaNoise |
Definition at line 100 of file CbmTrdSpadic.cxx.
Referenced by GetAnalogResponsePulse().
|
inlinestatic |
Definition at line 88 of file CbmTrdSpadic.h.
References NSPADICCH.
Referenced by CbmTrdUnpackAlgoBaseR::getChannelId(), and CbmTrdUnpackAlgoLegacy2020R::makeDigi().
|
inlinestaticconstexpr |
Get the Nr Of Adc Samples (Spadic default)
Definition at line 103 of file CbmTrdSpadic.h.
References fgNrOfAdcSamples.
Referenced by GetAnalogResponsePulse().
|
inlinestaticconstexpr |
Get the Nr Of Preamples.
Definition at line 110 of file CbmTrdSpadic.h.
References fgNrOfPresamples.
|
inline |
Get the Parameter value.
partype |
Definition at line 86 of file CbmTrdSpadic.h.
References fvecResponsePars.
UInt_t CbmTrdSpadic::GetPeakingSamplePos | ( | ) |
Get the Peaking Sample Pos.
Returns the sample posisiton were the response function peaks, based on the number of presamples and shaping time.
Definition at line 117 of file CbmTrdSpadic.cxx.
References fgClockCycleLength, fvecResponsePars, kNrPresamples, and kShapingTime.
|
static |
Get a TF1 response function object.
Definition at line 28 of file CbmTrdSpadic.cxx.
References fgChargeToMaxAdcCal, fgClockCycleLength, fgNrOfAdcSamples, fgNrOfPresamples, fgShapingOrder, fgShapingTime, and Response().
|
inlinestaticconstexpr |
Get the Shaping Order.
Definition at line 117 of file CbmTrdSpadic.h.
References fgShapingOrder.
|
inlinestatic |
Get the Shaping Time (Spadic default)
Definition at line 124 of file CbmTrdSpadic.h.
References fgShapingTime.
|
inline |
Get the Trigger Decision Get the trigger decision for the spadic. Currently this is based on the & differential trigger approach.
Pulse |
pulse | |
multitriggersample |
Definition at line 288 of file CbmTrdSpadic.h.
References fTriggerSlopeConditionFst, fTriggerSlopeConditionSnd, CbmTrdDigi::kMulti, CbmTrdDigi::kNeighbor, CbmTrdDigi::kNTrg, and CbmTrdDigi::kSelf.
|
inline |
Get the Use Baseline Avg flag.
The spadic either simply delievers n presamples or an average baseline as a single presample.
Definition at line 264 of file CbmTrdSpadic.h.
References fDoUseBaselineAvg.
Float_t CbmTrdSpadic::MaxAdcToEnergyCal | ( | Float_t | maxadc | ) |
Return energy [keV (MC input GeV)] for a given max adc value, based on max adc to energy calibration.
maxadc |
Definition at line 126 of file CbmTrdSpadic.cxx.
References fMaxAdcToEnergyCal.
CbmTrdSpadic & CbmTrdSpadic::operator= | ( | const CbmTrdSpadic & | ) |
Assignment of CbmTrdSpadic objects (not implemented!)
|
static |
Response of the SPADIC v2.2 to an input charge, for a given timesample.
In the parameter array thinks like shaping time, order, input charge and so on * can and have to be passed. Use this function for fitting for exampl. Use SpadicResponse(UInt_t samplenr) to get the response for the paramters setted in the given CbmTrdSpadic object.
samplenr | |
par |
Definition at line 43 of file CbmTrdSpadic.cxx.
References fgClockCycleLength.
Referenced by GetAnalogResponsePulse(), GetResponseFunc(), and Response().
Double_t CbmTrdSpadic::Response | ( | UInt_t | samplenr | ) |
Response of the SPADIC v2.2 to an input charge, for a given timesample.
Return the spadic response based on the parameters setted in this CbmTrdSpadic object.
samplenr |
Definition at line 63 of file CbmTrdSpadic.cxx.
References fvecResponsePars, and Response().
|
inline |
Set the Baseline Lvl value.
value |
Definition at line 386 of file CbmTrdSpadic.h.
References fBaselineLvl.
|
inline |
Set the Clipping Start value.
value |
Definition at line 341 of file CbmTrdSpadic.h.
References fClippingStart.
|
inline |
Set the Dynamic Range value.
Definition at line 334 of file CbmTrdSpadic.h.
References fDynamicRange.
|
inline |
Set the Trigger Slope Condition value.
value |
Definition at line 350 of file CbmTrdSpadic.h.
References fTriggerSlopeConditionFst.
|
inline |
Set the Max Adc To Energy Cal value.
value |
Definition at line 364 of file CbmTrdSpadic.h.
References fMaxAdcToEnergyCal.
|
inline |
Set the max adc to mip calibration value.
value |
Definition at line 371 of file CbmTrdSpadic.h.
References fMaxAdcToMipCal.
|
inline |
Set the Module Thickness value.
value |
Definition at line 379 of file CbmTrdSpadic.h.
References fModuleThickness.
|
inline |
Definition at line 343 of file CbmTrdSpadic.h.
References fNoiseLvl.
|
inline |
Definition at line 406 of file CbmTrdSpadic.h.
References fvecResponsePars.
Referenced by GetAnalogResponsePulse().
|
inline |
Set the Trigger Slope Condition value.
value |
Definition at line 357 of file CbmTrdSpadic.h.
References fTriggerSlopeConditionSnd.
|
inline |
Set the Use Baseline Average flag.
value |
Definition at line 393 of file CbmTrdSpadic.h.
References fDoUseBaselineAvg.
|
private |
Baseline level of the current Spadic Used for MaxAdcToMip calibration and baseline placement in Analogue Response.
Definition at line 524 of file CbmTrdSpadic.h.
Referenced by GetAnalogResponsePulse(), GetBaselineLvl(), and SetBaselineLvl().
|
private |
Value where a analog and or digital clipping appears By default it is set to the dynamic range of Spadic.
Definition at line 482 of file CbmTrdSpadic.h.
Referenced by ApplyClipping(), GetAnalogResponsePulse(), GetClippingStart(), and SetClippingStart().
|
private |
Flag wether we have n standard presamples or the average baseline in a single presamples.
Definition at line 546 of file CbmTrdSpadic.h.
Referenced by GetUseBaselineAvg(), and SetUseBaselineAverage().
|
private |
Dynamic range of the spadic The Spadic uses a 9-Bit ADC.
Definition at line 476 of file CbmTrdSpadic.h.
Referenced by GetDynamicRange(), and SetDynamicRange().
|
staticprivate |
Calibration factor for input charges.
Charge calibration for fit response to max adc, i.e. this scales the response * for a given input charge to match the corresponding max adc value. Default Spadic value = 2.73 extracted from fits to desy2019 and lab data (status 23.02.2021 PR) please update if this changes.
Definition at line 470 of file CbmTrdSpadic.h.
Referenced by GetChargeToMaxAdcCal(), and GetResponseFunc().
|
staticprivate |
Clockcycle length of SPADIC v2.2.
Definition at line 413 of file CbmTrdSpadic.h.
Referenced by GetClockCycle(), GetPeakingSamplePos(), GetResponseFunc(), and Response().
|
staticconstexprprivate |
Number of ADC samples.
Number of ADC samples available. Default (32) corresponds to the maximum number of samples for SPADIC v2.2
Definition at line 436 of file CbmTrdSpadic.h.
Referenced by GetNrOfAdcSamples(), and GetResponseFunc().
|
staticconstexprprivate |
Number of presamples in the ADC signal in front of the actual signal.
Default Spadic value = 2 (status 23.02.2021 PR) please update if this changes. Default Spadic value = 1 (status 16.06.2021 PR) please update if this changes.
Definition at line 461 of file CbmTrdSpadic.h.
Referenced by GetNrOfPresamples(), and GetResponseFunc().
|
staticconstexprprivate |
Spadic Shaping order.
Default value of the Spadic shaping order = 1 (status 23.02.2021 PR)
Definition at line 453 of file CbmTrdSpadic.h.
Referenced by GetResponseFunc(), and GetShapingOrder().
|
staticprivate |
Spadic shaping time.
Shaping time of the Spadic signal shaper, value corresponds to the best knowledge from measurements (status 23.02.2021 PR) please update if newer results are available
Definition at line 446 of file CbmTrdSpadic.h.
Referenced by GetResponseFunc(), and GetShapingTime().
|
private |
Calibration value to calculate energy in keV based on the max adc value. Default = Simulation calibration.
Definition at line 540 of file CbmTrdSpadic.h.
Referenced by GetMaxAdcToEnergyCal(), MaxAdcToEnergyCal(), and SetMaxAdcToEnergyCal().
|
private |
Calibration for MIP to 7% of MaxAdc dynamic range. 0.65 = charge from PRF broad distribution on central pad fModuleThickness * CbmTrdMipDeDx() = mean deposited mip energy per chamber fgChargeToMaxAdcCal = Factor between input charge for spadic response and max adc value handled in response function 0.08 * (fDynamicRange - 10) = 8% of the dynamic range with 10 ADU as baseline approximation.
Definition at line 535 of file CbmTrdSpadic.h.
Referenced by GetAnalogResponsePulse(), GetMipCalibration(), and SetMipCalibration().
|
private |
Thickness of the module [cm] this spadic is mounted on. Should be setted during runtime from parameters. For the time being the default 1.2 cm should be fine, since all modules with spadics have the same thickness.
Definition at line 517 of file CbmTrdSpadic.h.
Referenced by GetModuleThickness(), and SetModuleThickness().
|
private |
Noise level for signal response simulation [gaus sigmas].
Definition at line 543 of file CbmTrdSpadic.h.
Referenced by GetAdcNoiseLevel(), GetAnalogResponsePulse(), and SetNoiseLevel().
|
private |
Slope trigger condition for a two stage differential triggger.
This defines the min diff between the first two consecutive rising samples in the pulse, to mark the pulse with CbmTrdDigi::eTriggerType::kSelf. An analytical MIP pulse with a conservative shaping time of 300 ns (keep in mind that a pulse is not a delta input) has a diff of 16 at the first relevant step. Based on response definition status March 2021 - PR.
Definition at line 494 of file CbmTrdSpadic.h.
Referenced by GetTriggerDecision(), and SetFstTriggerSlopeCondition().
|
private |
Slope trigger condition for a two stage differential triggger.
This defines the min diff between the second pair of two consecutive rising samples in the pulse, to mark the pulse with CbmTrdDigi::eTriggerType::kSelf. An analytical MIP pulse with a conservative shaping time of 300 ns (keep in mind that a pulse is not a delta input) has a diff of 10 at the second (this) relevant step. Based on response definition status March 2021 - PR. Remark: There is an ignore switch for this condition if the slope of the first check exceeds the condition by 2. Since, a 120 ns shaping time pulse will have the combination of 30 and 5 as slopes.
Definition at line 508 of file CbmTrdSpadic.h.
Referenced by GetTriggerDecision(), and SetSndTriggerSlopeCondition().
|
private |
Vector for the response parameters. Order based on eResponsePars. The given values here correspond to the design/default values for SPADIC v2.2.
Definition at line 427 of file CbmTrdSpadic.h.
Referenced by GetAnalogResponsePulse(), GetParameter(), GetPeakingSamplePos(), Response(), and SetParameter().