1 #ifndef SimCalorimetry_HGCSimProducers_hgcdigitizerbase
2 #define SimCalorimetry_HGCSimProducers_hgcdigitizerbase
8 #include <unordered_map>
9 #include <unordered_set>
26 namespace hgc = hgc_digi;
28 namespace hgc_digi_utils {
38 info.size = (isHalf ? 0.5 : 1.0);
39 info.thickness = 1 + dddConst.
waferType(detid);
66 void GenerateGaussianNoise(CLHEP::HepRandomEngine* engine,
const double NoiseMean,
const double NoiseStd);
70 void run(std::unique_ptr<DColl>& digiColl,
73 const std::unordered_set<DetId>& validIds,
74 uint32_t digitizationType,
75 CLHEP::HepRandomEngine* engine);
90 void runSimple(std::unique_ptr<DColl>& coll,
93 const std::unordered_set<DetId>& validIds,
94 CLHEP::HepRandomEngine* engine);
99 void updateOutput(std::unique_ptr<DColl>& coll,
const DFr& rawDataFrame);
107 const std::unordered_set<DetId>& validIds,
108 CLHEP::HepRandomEngine* engine) = 0;
HGCalSiNoiseMap< HGCSiliconDetId > scal_
std::vector< double > cce_
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_
HGCDigitizerBase(const edm::ParameterSet &ps)
CTOR.
bool toaModeByEnergy() const
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 RandNoiseGenerationFlag_
std::unordered_map< uint32_t, HGCCellInfo > HGCSimHitDataAccumulator
ForwardSubdetector subdet_
std::unique_ptr< HGCFEElectronics< DFr > > myFEelectronics_
std::array< float, 3 > tdcForToAOnset() const
edm::SortedCollection< DFr > DColl
float keV2fC() const
getters
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
std::vector< float > noise_fC_
const HGCalTopology & topology() const
void addCellMetadata(HGCCellInfo &info, const HGCalGeometry *geom, const DetId &detid)
virtual ~HGCDigitizerBase()
DTOR.
double scaleByDoseFactor_
static const size_t samplesize_
bool thresholdFollowsMIP_
bool NoiseGeneration_Method_
ForwardSubdetector subdet() const
const HGCalDDDConstants & dddConstants() const
DetId::Detector det() const
std::array< std::array< double, samplesize_ >, NoiseArrayLength_ > GaussianNoiseArray_
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
int waferType(DetId const &id, bool fromFile=false) const
constexpr Detector det() const
get the detector field from this detid