|
|
Go to the documentation of this file.
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) {
115 const std::unordered_set<DetId>& validIds,
116 CLHEP::HepRandomEngine* engine) {
124 std::array<double, samplesize_> cellNoiseArray;
126 cellNoiseArray[
i] = 0.0;
128 for (
const auto&
id : validIds) {
129 chargeColl.fill(0.
f);
131 HGCSimHitDataAccumulator::iterator it = simData.find(
id);
132 HGCCellInfo& cell = (simData.end() == it ? zeroData : it->second);
141 float cce(1.
f), noiseWidth(0.
f), lsbADC(-1.
f), maxADC(-1.
f);
144 uint32_t gainIdx = 0;
147 double tdcOnsetAuto = -1;
152 noiseWidth = siop.noise;
160 thrADC = siop.thrADC;
164 noiseWidth = siop.noise;
172 thrADC = siop.thrADC;
187 for (
size_t i = 0;
i < cell.
hit_info[0].size();
i++) {
200 noise = CLHEP::RandGaussQ::shoot(engine, cellNoiseArray[
i], noiseWidth);
201 float totalCharge(rawCharge * cce +
noise);
202 if (totalCharge < 0.
f)
204 chargeColl[
i] = totalCharge;
208 DFr rawDataFrame(
id);
211 rawDataFrame, chargeColl, toa,
adcPulse, engine, thrADC, lsbADC, gainIdx, maxADC,
thickness, tdcOnsetAuto);
221 if (rawDataFrame.
size() <= itIdx + 2)
224 DFr dataFrame(rawDataFrame.
id());
229 if ((!rawDataFrame[itIdx].
threshold())) {
233 for (
int it = 0; it < 5; it++) {
234 dataFrame.setSample(it, rawDataFrame[itIdx - 2 + it]);
237 coll->push_back(dataFrame);
void setIleakParam(const std::vector< double > &pars)
set the ileak parameters to use
static const size_t samplesize_
std::vector< double > & getLSBPerGain()
std::array< std::array< double, samplesize_ >, NoiseArrayLength_ > GaussianNoiseArray_
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...
void setDefaultADCPulseShape(const hgc_digi::FEADCPulseShape &adcPulse)
double scaleByDoseFactor_
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 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
bool existsAs(std::string const ¶meterName, bool trackiness=true) const
checks if a parameter exists as a given type
int size() const
total number of samples in the digi
void resize(size_t s)
allow to set size
bool thresholdFollowsMIP_
bool NoiseGeneration_Method_
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...
std::array< HGCSimData_t, nSamples > HGCSimHitData
const hgc_digi::FEADCPulseShape & adcPulseForGain(GainRange_t gain)
HGCalSiNoiseMap< HGCSiliconDetId > scal_
models the behavior of the front-end electronics
void GenerateGaussianNoise(CLHEP::HepRandomEngine *engine, const double NoiseMean, const double NoiseStd)
Gaussian Noise Generation Member Function.
bool exists(std::string const ¶meterName) const
checks if a parameter exists
derives from HGCalRadiation map to parse fluence parameters, provides Si-specific functions; see DN-1...
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
std::array< HGCSimHitData, 2 > hit_info
HGCalSiNoiseMap< HFNoseDetId > scalHFNose_
std::unordered_map< uint32_t, HGCCellInfo > HGCSimHitDataAccumulator
std::vector< double > cce_
void setFluenceScaleFactor(double val)
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
HGCDigitizerBase(const edm::ParameterSet &ps)
CTOR.
void addCellMetadata(HGCCellInfo &info, const HGCalGeometry *geom, const DetId &detid)
void updateOutput(std::unique_ptr< DColl > &coll, const DFr &rawDataFrame)
prepares the output according to the number of time samples to produce
std::vector< float > noise_fC_
std::unique_ptr< HGCFEElectronics< DFr > > myFEelectronics_
static const size_t NoiseArrayLength_
T getParameter(std::string const &) const
bool RandNoiseGenerationFlag_
std::vector< double > & getMaxADCPerGain()
const D & id() const
det id
void setCceParam(const std::vector< double > &parsFine, const std::vector< double > &parsThin, const std::vector< double > &parsThick)
set the cce parameters to use
DetId::Detector det() const