LDMX Software
|
class for simulating QIE chip output More...
#include <SimQIE.h>
Public Member Functions | |
SimQIE () | |
Defaut constructor. | |
SimQIE (float pd, float sg, uint64_t seed) | |
Main constructor. | |
void | setTDCThreshold (const float thr) |
Set current threshold for TDC latch. | |
void | setGain (const float gg=1e+6) |
Set gain of SiPM. | |
void | setFreq (const float sf=40) |
Set sampling frequency of QIE. | |
void | setNTimeSamples (const int maxts=5) |
Set the number of time samples to analyze. | |
float | QErr (float Q) |
Quantization error. | |
int | Q2ADC (float Charge) |
Digitizing input charge. | |
float | ADC2Q (int ADC) |
Converting ADC back to charge. | |
int | TDC (QIEInputPulse *pp, float T0) |
TDC of the input pulse. | |
std::vector< int > | Out_ADC (QIEInputPulse *pp) |
Complete set of ADCs for the pulse. | |
std::vector< int > | Out_TDC (QIEInputPulse *pp) |
Complete set of TDCs for the pulse. | |
std::vector< int > | CapID (QIEInputPulse *pp) |
Complete set of Capacitor IDs for the pulse. | |
bool | PulseCut (QIEInputPulse *pulse, float cut) |
Method to check if the pulse is good to be stored. | |
Private Attributes | |
int | nbins_ [5] = {0, 16, 36, 57, 64} |
Indices of first bin of each subrange. | |
float | edges_ [17] |
Charge lower limit of all the 16 subranges. | |
float | sense_ [16] |
sensitivity of the subranges (Total charge/no. of bins) | |
float | gain_ {1} |
QIE gain -> to convert from no. of e- to charge in fC. | |
float | tau_ {25} |
time period of one time sample [in ns] | |
int | maxts_ {0} |
No. of time samples to analyze. | |
float | tdc_thr_ {3.74} |
TDC threshold (default 3.74 microAmpere) | |
std::unique_ptr< TRandom3 > | rand_ptr {nullptr} |
Random number generator (required for noise simulation) | |
TRandom3 * | trg_ |
float | mu_ {0} |
mean of gaussian noise (Pedestal) | |
float | sg_ {0} |
std. dev. of gaussian noise (Actual noise level) | |
bool | isnoise_ {false} |
Whether noise is added to the system. | |
class for simulating QIE chip output
trigscint::SimQIE::SimQIE | ( | ) |
Defaut constructor.
Definition at line 11 of file SimQIE.cxx.
trigscint::SimQIE::SimQIE | ( | float | pd, |
float | sg, | ||
uint64_t | seed = 0 |
||
) |
Main constructor.
pd | pedestal value |
sg | noise value |
seed | random seed for noise generation |
Definition at line 13 of file SimQIE.cxx.
float trigscint::SimQIE::ADC2Q | ( | int | ADC | ) |
Converting ADC back to charge.
ADC | = ADC count |
Definition at line 52 of file SimQIE.cxx.
References edges_, gain_, nbins_, and sense_.
Referenced by trigscint::EventReadoutProducer::produce(), and trigscint::TrigScintRecHitProducer::produce().
std::vector< int > trigscint::SimQIE::CapID | ( | QIEInputPulse * | pp | ) |
Complete set of Capacitor IDs for the pulse.
pp | = pointer to pulse instance |
Definition at line 124 of file SimQIE.cxx.
References maxts_.
std::vector< int > trigscint::SimQIE::Out_ADC | ( | QIEInputPulse * | pp | ) |
Complete set of ADCs for the pulse.
pp | = pointer to pulse instance |
Definition at line 88 of file SimQIE.cxx.
References trigscint::QIEInputPulse::Integrate(), maxts_, Q2ADC(), and tau_.
std::vector< int > trigscint::SimQIE::Out_TDC | ( | QIEInputPulse * | pp | ) |
Complete set of TDCs for the pulse.
pp | = pointer to pulse instance |
Definition at line 113 of file SimQIE.cxx.
bool trigscint::SimQIE::PulseCut | ( | QIEInputPulse * | pulse, |
float | cut | ||
) |
Method to check if the pulse is good to be stored.
pulse | pointer to the pulse we want to analyze |
Definition at line 134 of file SimQIE.cxx.
References trigscint::QIEInputPulse::GetNPulses(), trigscint::QIEInputPulse::Integrate(), maxts_, and tau_.
int trigscint::SimQIE::Q2ADC | ( | float | Charge | ) |
Digitizing input charge.
Charge | = The charge to be digitized |
Definition at line 29 of file SimQIE.cxx.
References edges_, gain_, isnoise_, mu_, nbins_, sense_, and sg_.
Referenced by Out_ADC().
float trigscint::SimQIE::QErr | ( | float | Q | ) |
Quantization error.
Definition at line 71 of file SimQIE.cxx.
References edges_, and sense_.
Referenced by trigscint::EventReadoutProducer::produce().
|
inline |
|
inline |
|
inline |
|
inline |
Set current threshold for TDC latch.
gg | = gain |
Definition at line 38 of file SimQIE.h.
References tdc_thr_.
int trigscint::SimQIE::TDC | ( | QIEInputPulse * | pp, |
float | T0 = 0 |
||
) |
TDC of the input pulse.
pp | = pointer to a pulse instance |
T0 | = starting time of the pulse |
Definition at line 100 of file SimQIE.cxx.
References trigscint::QIEInputPulse::Eval(), gain_, tau_, and tdc_thr_.
Referenced by Out_TDC().
|
private |
Charge lower limit of all the 16 subranges.
Definition at line 116 of file SimQIE.h.
|
private |
|
private |
|
private |
No. of time samples to analyze.
Definition at line 128 of file SimQIE.h.
Referenced by CapID(), Out_ADC(), Out_TDC(), PulseCut(), and setNTimeSamples().
|
private |
|
private |
|
private |
|
private |
sensitivity of the subranges (Total charge/no. of bins)
Definition at line 120 of file SimQIE.h.
|
private |
|
private |
|
private |
TDC threshold (default 3.74 microAmpere)
Definition at line 131 of file SimQIE.h.
Referenced by setTDCThreshold(), and TDC().