1#ifndef TRIGSCINT_SIMQIE_H
2#define TRIGSCINT_SIMQIE_H
8#include "TrigScint/QIEInputPulse.h"
31 SimQIE(
float pd,
float sg, uint64_t seed);
72 int Q2ADC(
float Charge);
116 float edges_[17] = {-16, 34, 158, 419, 517, 915,
117 1910, 3990, 4780, 7960, 15900, 32600,
118 38900, 64300, 128000, 261000, 350000};
120 float sense_[16] = {3.1, 6.2, 12.4, 24.8, 24.8, 49.6, 99.2, 198.4,
121 198.4, 396.8, 793.6, 1587, 1587, 3174, 6349, 12700};
class for simulating QIE chip output
float edges_[17]
Charge lower limit of all the 16 subranges.
std::vector< int > Out_ADC(QIEInputPulse *pp)
Complete set of ADCs for the pulse.
int nbins_[5]
Indices of first bin of each subrange.
int TDC(QIEInputPulse *pp, float T0)
TDC of the input pulse.
bool PulseCut(QIEInputPulse *pulse, float cut)
Method to check if the pulse is good to be stored.
float tau_
time period of one time sample [in ns]
void setGain(const float gg=1e+6)
Set gain of SiPM.
int Q2ADC(float Charge)
Digitizing input charge.
std::unique_ptr< TRandom3 > rand_ptr
Random number generator (required for noise simulation)
float tdc_thr_
TDC threshold (default 3.74 microAmpere)
float QErr(float Q)
Quantization error.
float sg_
std. dev. of gaussian noise (Actual noise level)
float sense_[16]
sensitivity of the subranges (Total charge/no. of bins)
void setNTimeSamples(const int maxts=5)
Set the number of time samples to analyze.
float ADC2Q(int ADC)
Converting ADC back to charge.
float mu_
mean of gaussian noise (Pedestal)
bool isnoise_
Whether noise is added to the system.
int maxts_
No. of time samples to analyze.
std::vector< int > CapID(QIEInputPulse *pp)
Complete set of Capacitor IDs for the pulse.
SimQIE()
Defaut constructor.
void setFreq(const float sf=40)
Set sampling frequency of QIE.
float gain_
QIE gain -> to convert from no. of e- to charge in fC.
void setTDCThreshold(const float thr)
Set current threshold for TDC latch.
std::vector< int > Out_TDC(QIEInputPulse *pp)
Complete set of TDCs for the pulse.