31 funcSpadicResponse->SetParNames(
"Shaping time",
"Shaping order",
"Input charge",
"Bin timeshift",
"Nr of presamples",
32 "Charge Calibration");
37 funcSpadicResponse->SetParameters(parvec.data());
39 return funcSpadicResponse;
57 t >= 0 ? ((par[2] * par[5]) * TMath::Power((t / par[0]), ((Int_t) par[1])) * TMath::Exp(-(t / par[0]))) : 0;
65 Double_t samplepos = samplenr;
94 pulse.at(isample) = response;
102 Int_t noise = gRandom->Gaus(0, sigmaNoise);
109 Double_t timeshift = (
static_cast<Int_t
>(absolutetime * 10) %
static_cast<Int_t
>(
GetClockCycle() * 10)) / 10.0;
111 timeshift = timeshift >= 0 ? timeshift - (
GetClockCycle() / 2) : 0;
ClassImp(CbmConverterManager)
Software representation of the SPADIC v2.2+.
static float Clk(eCbmTrdAsicType ty)
DAQ clock accessor for each ASIC.
static Double_t GetClockCycle()
Get the Clock Cycle.
UInt_t GetPeakingSamplePos()
Get the Peaking Sample Pos.
static constexpr UInt_t fgNrOfAdcSamples
Number of ADC samples.
Float_t fMaxAdcToMipCal
Calibration for MIP to 7% of MaxAdc dynamic range. 0.65 = charge from PRF broad distribution on centr...
virtual ~CbmTrdSpadic()
Destroy the Cbm Trd Spadic object.
static constexpr UInt_t GetNrOfAdcSamples()
Get the Nr Of Adc Samples (Spadic default)
Double_t GetAnalyticTimeshift(Double_t absolutetime)
Get the Analytic Timeshift value ns precision Calculate the timeshift within the spadic response base...
static const Double_t fgClockCycleLength
Clockcycle length of SPADIC v2.2.
static const Double_t fgChargeToMaxAdcCal
Calibration factor for input charges.
static std::shared_ptr< TF1 > GetResponseFunc()
Get a TF1 response function object.
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.
Float_t fMaxAdcToEnergyCal
Calibration value to calculate energy in keV based on the max adc value. Default = Simulation calibra...
Int_t fClippingStart
Value where a analog and or digital clipping appears By default it is set to the dynamic range of Spa...
Int_t GetNoise(Double_t sigmaNoise)
Get a Noise value based on the width of the noise distribution in sigmas.
std::vector< Double_t > fvecResponsePars
Vector for the response parameters. Order based on eResponsePars. The given values here correspond to...
static const Double_t fgShapingTime
Spadic shaping time.
void SetParameter(eResponsePars ipar, Double_t value)
static constexpr UInt_t fgNrOfPresamples
Number of presamples in the ADC signal in front of the actual signal.
static Double_t Response(Double_t *samplenr, Double_t *par)
Response of the SPADIC v2.2 to an input charge, for a given timesample.
CbmTrdSpadic()
Construct a new CbmTrdSpadic object Default and standard c'tor for a CbmTrdSpadic object.
UInt_t fBaselineLvl
Baseline level of the current Spadic Used for MaxAdcToMip calibration and baseline placement in Analo...
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.
static constexpr UInt_t fgShapingOrder
Spadic Shaping order.
Float_t fNoiseLvl
Noise level for signal response simulation [gaus sigmas].