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"
17 namespace hgc = hgc_digi;
41 CLHEP::HepRandomEngine* engine,
47 float tdcOnsetAuto = -1) {
50 runSimpleShaper(dataFrame, chargeColl, thrADC, lsbADC, gainIdx, maxADC, adcPulse);
55 dataFrame, chargeColl, toa, engine, thrADC, lsbADC, gainIdx, maxADC,
thickness, tdcOnsetAuto, adcPulse);
67 CLHEP::HepRandomEngine* engine,
83 float X2 =
pow((totalCharge /
noise_fC_.at(thickness - 1)), 2.);
84 float jitter2 = A2 / X2 + C2;
112 DFr& dataFrame,
hgc::HGCSimHitData& chargeColl, uint32_t thrADC,
float lsbADC, uint32_t gainIdx,
float maxADC);
125 DFr& dataFrame,
hgc::HGCSimHitData& chargeColl, uint32_t thrADC,
float lsbADC, uint32_t gainIdx,
float maxADC) {
135 CLHEP::HepRandomEngine* engine,
146 CLHEP::HepRandomEngine* engine,
152 float tdcOnsetAuto) {
154 dataFrame, chargeColl, toa, engine, thrADC, lsbADC, gainIdx, maxADC, thickness, tdcOnsetAuto,
adcPulse_);
std::array< bool, hgc::nSamples > busyFlags
std::array< float, 3 > jitterConstant2_ns_
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, const hgc_digi::FEADCPulseShape &adcPulse)
implements pulse shape and switch to time over threshold including deadtime
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)
HGCFEElectronicsFirmwareVersion
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)
switches according to the firmware version
std::array< float, 3 > jitterNoise2_ns_
hgc::HGCSimHitData toaFromToT
std::array< HGCSimData_t, nSamples > HGCSimHitData
float getTimeJitter(float totalCharge, int thickness)
HGCFEElectronics(const edm::ParameterSet &ps)
CTOR.
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)
bool thresholdFollowsMIP_
std::array< float, 3 > getTDCForToAOnset()
uint32_t targetMIPvalue_ADC_
hgc_digi::FEADCPulseShape adcPulse_
std::vector< float > noise_fC_
hgc_digi::FEADCPulseShape & getDefaultADCPulse()
getter for the default ADC pulse configured by python
float getADClsb()
returns the LSB currently configured
uint32_t toaMode() const
returns how ToT will be computed
void setADClsb(float newLSB)
void SetNoiseValues(const std::vector< float > &noise_fC)
std::array< bool, hgc::nSamples > totFlags
hgc_digi::FEADCPulseShape pulseAvgT_
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 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