1 #ifndef _hgcfeelectronics_h_ 2 #define _hgcfeelectronics_h_ 7 #include "CLHEP/Random/RandGauss.h" 8 #include "CLHEP/Random/RandGaussQ.h" 9 #include "CLHEP/Random/RandFlat.h" 41 CLHEP::HepRandomEngine* engine,
47 float tdcOnsetAuto = -1,
48 float noiseWidth = -1) {
78 CLHEP::HepRandomEngine* engine,
92 for (
int i = 0;
i < 3;
i++)
120 DFr& dataFrame,
hgc::HGCSimHitData& chargeColl, uint32_t thrADC,
float lsbADC, uint32_t gainIdx,
float maxADC);
133 DFr& dataFrame,
hgc::HGCSimHitData& chargeColl, uint32_t thrADC,
float lsbADC, uint32_t gainIdx,
float maxADC) {
143 CLHEP::HepRandomEngine* engine,
155 CLHEP::HepRandomEngine* engine,
std::array< bool, hgc::nSamples > busyFlags
void runShaper(DFr &dataFrame, hgc::HGCSimHitData &chargeColl, hgc::HGCSimHitData &toa, CLHEP::HepRandomEngine *engine, uint32_t thrADC=0, float lsbADC=-1, uint32_t gainIdx=0, float maxADC=-1, int thickness=1)
void generateTimeOffset(CLHEP::HepRandomEngine *engine)
HGCFEElectronicsFirmwareVersion
hgc::HGCSimHitData toaFromToT
void runShaperWithToT(DFr &dataFrame, hgc::HGCSimHitData &chargeColl, hgc::HGCSimHitData &toa, CLHEP::HepRandomEngine *engine, uint32_t thrADC, float lsbADC, uint32_t gainIdx, float maxADC, int thickness, float tdcOnsetAuto, float noiseWidth, const hgc_digi::FEADCPulseShape &adcPulse)
implements pulse shape and switch to time over threshold including deadtime
uint32_t toaMode() const
returns how ToT will be computed
std::array< HGCSimData_t, nSamples > HGCSimHitData
HGCFEElectronics(const edm::ParameterSet &ps)
CTOR.
std::array< float, 3 > jitterNoise_ns_
bool thresholdFollowsMIP_
std::array< float, 3 > getTDCForToAOnset()
uint32_t targetMIPvalue_ADC_
hgc_digi::FEADCPulseShape adcPulse_
std::vector< float > noise_fC_
std::array< float, 3 > eventTimeOffset_ns_
hgc_digi::FEADCPulseShape & getDefaultADCPulse()
getter for the default ADC pulse configured by python
float getADClsb()
returns the LSB currently configured
void setADClsb(float newLSB)
void SetNoiseValues(const std::vector< float > &noise_fC)
std::array< bool, hgc::nSamples > totFlags
hgc_digi::FEADCPulseShape pulseAvgT_
void runShaperWithToT(DFr &dataFrame, hgc::HGCSimHitData &chargeColl, hgc::HGCSimHitData &toa, CLHEP::HepRandomEngine *engine, uint32_t thrADC, float lsbADC, uint32_t gainIdx, float maxADC, int thickness, float tdcOnsetAuto, float noiseWidth)
void setTDCfsc(float newTDCfsc)
void runSimpleShaper(DFr &dataFrame, hgc::HGCSimHitData &chargeColl, uint32_t thrADC, float lsbADC, uint32_t gainIdx, float maxADC, const hgc_digi::FEADCPulseShape &adcPulse)
applies a shape to each time sample and propagates the tails to the subsequent time samples ...
void runTrivialShaper(DFr &dataFrame, hgc::HGCSimHitData &chargeColl, uint32_t thrADC, float lsbADC, uint32_t gainIdx, float maxADC)
converts charge to digis without pulse shape
std::vector< float > tdcChargeDrainParameterisation_
models the behavior of the front-end electronics
void runShaper(DFr &dataFrame, hgc::HGCSimHitData &chargeColl, hgc::HGCSimHitData &toa, const hgc_digi::FEADCPulseShape &adcPulse, CLHEP::HepRandomEngine *engine, uint32_t thrADC=0, float lsbADC=-1, uint32_t gainIdx=0, float maxADC=-1, int thickness=1, float tdcOnsetAuto=-1, float noiseWidth=-1)
switches according to the firmware version
std::array< float, 3 > jitterConstant_ns_
void runSimpleShaper(DFr &dataFrame, hgc::HGCSimHitData &chargeColl, uint32_t thrADC, float lsbADC, uint32_t gainIdx, float maxADC)
hgc::HGCSimHitData newCharge
Power< A, B >::type pow(const A &a, const B &b)
std::array< float, 6 > FEADCPulseShape
std::array< float, 3 > tdcForToAOnset_fC_
std::array< bool, hgc::nSamples > toaFlags