10 : scaleByDose_(
false),
27 .
template getParameter<std::vector<double>>(
"values");
81 const double NoiseMean,
82 const double NoiseStd) {
93 const std::unordered_set<DetId>& validIds,
95 CLHEP::HepRandomEngine* engine) {
116 const std::unordered_set<DetId>& validIds,
117 CLHEP::HepRandomEngine* engine) {
125 std::array<double, samplesize_> cellNoiseArray;
127 cellNoiseArray[
i] = 0.0;
129 for (
const auto&
id : validIds) {
130 chargeColl.fill(0.
f);
132 HGCSimHitDataAccumulator::iterator it = simData.find(
id);
133 HGCCellInfo& cell = (simData.end() == it ? zeroData : it->second);
142 float cce(1.
f), noiseWidth(0.
f), lsbADC(-1.
f), maxADC(-1.
f);
145 uint32_t gainIdx = 0;
148 double tdcOnsetAuto = -1;
153 noiseWidth = siop.noise;
161 thrADC = siop.thrADC;
165 noiseWidth = siop.noise;
173 thrADC = siop.thrADC;
188 for (
size_t i = 0;
i < cell.
hit_info[0].size();
i++) {
201 noise = CLHEP::RandGaussQ::shoot(engine, cellNoiseArray[
i], noiseWidth);
202 float totalCharge(rawCharge * cce +
noise);
203 if (totalCharge < 0.
f)
205 chargeColl[
i] = totalCharge;
209 DFr rawDataFrame(
id);
232 if (rawDataFrame.
size() <= itIdx + 2)
235 DFr dataFrame(rawDataFrame.
id());
240 if ((!rawDataFrame[itIdx].
threshold())) {
244 for (
int it = 0; it < 5; it++) {
245 dataFrame.setSample(it, rawDataFrame[itIdx - 2 + it]);
248 coll->push_back(dataFrame);
HGCalSiNoiseMap< HGCSiliconDetId > scal_
std::vector< double > cce_
void setDefaultADCPulseShape(const hgc_digi::FEADCPulseShape &adcPulse)
T getParameter(std::string const &) const
void runSimple(std::unique_ptr< DColl > &coll, hgc::HGCSimHitDataAccumulator &simData, const CaloSubdetectorGeometry *theGeom, const std::unordered_set< DetId > &validIds, CLHEP::HepRandomEngine *engine)
a trivial digitization: sum energies and digitize
HGCalSiNoiseMap< HFNoseDetId > scalHFNose_
int size() const
total number of samples in the digi
HGCDigitizerBase(const edm::ParameterSet &ps)
CTOR.
void GenerateGaussianNoise(CLHEP::HepRandomEngine *engine, const double NoiseMean, const double NoiseStd)
Gaussian Noise Generation Member Function.
static const size_t NoiseArrayLength_
void updateOutput(std::unique_ptr< DColl > &coll, const DFr &rawDataFrame)
prepares the output according to the number of time samples to produce
bool exists(std::string const ¶meterName) const
checks if a parameter exists
bool RandNoiseGenerationFlag_
std::unordered_map< uint32_t, HGCCellInfo > HGCSimHitDataAccumulator
void setCceParam(const std::vector< double > &parsFine, const std::vector< double > &parsThin, const std::vector< double > &parsThick)
set the cce parameters to use
bool existsAs(std::string const ¶meterName, bool trackiness=true) const
checks if a parameter exists as a given type
std::unique_ptr< HGCFEElectronics< DFr > > myFEelectronics_
std::array< HGCSimData_t, nSamples > HGCSimHitData
void resize(size_t s)
allow to set size
const D & id() const
det id
derives from HGCalRadiation map to parse fluence parameters, provides Si-specific functions; see DN-1...
const hgc_digi::FEADCPulseShape & adcPulseForGain(GainRange_t gain)
virtual void runDigitizer(std::unique_ptr< DColl > &coll, hgc::HGCSimHitDataAccumulator &simData, const CaloSubdetectorGeometry *theGeom, const std::unordered_set< DetId > &validIds, CLHEP::HepRandomEngine *engine)=0
to be specialized by top class
DetId::Detector det() const
std::vector< float > noise_fC_
std::array< HGCSimHitData, 2 > hit_info
void setDoseMap(const std::string &, const unsigned int &)
overrides base class method with specifics for the configuration of the algo
double getTDCOnsetAuto(uint32_t gainIdx)
void addCellMetadata(HGCCellInfo &info, const HGCalGeometry *geom, const DetId &detid)
void setFluenceScaleFactor(double val)
double scaleByDoseFactor_
static const size_t samplesize_
bool thresholdFollowsMIP_
bool NoiseGeneration_Method_
std::array< std::array< double, samplesize_ >, NoiseArrayLength_ > GaussianNoiseArray_
void setIleakParam(const std::vector< double > &pars)
set the ileak parameters to use
std::vector< double > & getLSBPerGain()
const SiCellOpCharacteristicsCore getSiCellOpCharacteristicsCore(const T &did, GainRange_t gain, int aimMIPtoADC)
returns the charge collection efficiency and noise if gain range is set to auto, it will find the mos...
std::vector< double > & getMaxADCPerGain()
void setGeometry(const CaloSubdetectorGeometry *, GainRange_t gain=GainRange_t::AUTO, int aimMIPtoADC=10)
specialization of the base class method which sets the geometry so that it can instantiate an operati...
void run(std::unique_ptr< DColl > &digiColl, hgc::HGCSimHitDataAccumulator &simData, const CaloSubdetectorGeometry *theGeom, const std::unordered_set< DetId > &validIds, uint32_t digitizationType, CLHEP::HepRandomEngine *engine)
steer digitization mode
models the behavior of the front-end electronics