|
|
Go to the documentation of this file. 1 #ifndef HcalSimAlgos_HcalSignalGenerator_h
2 #define HcalSimAlgos_HcalSignalGenerator_h
27 class ModuleCallingContext;
30 template <
class Traits>
64 LogTrace(
"HcalSignalGenerator") <<
"total # digis for " <<
theInputTag <<
" " << digis->size();
69 std::shared_ptr<edm::Wrapper<COLLECTION>
const> digisPTR =
72 digis = digisPTR->product();
75 throw cms::Exception(
"HcalSignalGenerator") <<
"No Event or EventPrincipal was set";
85 for (
typename COLLECTION::const_iterator it = digis->begin(); it != digis->end(); ++it) {
88 int startingCapId = (*it)[0].capid();
103 for (
int id = 0;
id < digi.size();
id++) {
104 if (digi[
id].
adc() > 0)
107 return (DigiSum > 0);
122 bool overflow =
false;
125 for (
int isample = 0; isample < digi.size(); ++isample) {
126 if (digi[isample].er())
138 for (
int isample = 0; isample < digi.size(); ++isample) {
139 if (!digi[isample].er())
140 result[isample] =
float(digi[isample].
adc()) / Traits::PreMixFactor;
144 for (
int isample = 0; isample < digi.size(); ++isample) {
145 result[isample] =
float(digi[isample].
adc()) / Traits::PreMixFactor;
147 result.setPresamples(digi.presamples());
void fC2pe(CaloSamples &samples) const
Traits::DigiCollection COLLECTION
T const * product() const
T const * product() const
uint16_t *__restrict__ uint16_t const *__restrict__ adc
CaloSamples samplesInPE(const DIGI &digi)
void adc2fC(const HBHEDataFrame &df, CaloSamples &lf) const override
void initializeEvent(const edm::Event *event, const edm::EventSetup *eventSetup)
HcalSignalGenerator< HcalQIE10DigitizerTraits > QIE10SignalGenerator
void setStartingCapId(int startingCapId)
edm::EDGetTokenT< COLLECTION > tok_
HcalSignalGenerator< HcalQIE11DigitizerTraits > QIE11SignalGenerator
void setDbService(const HcalDbService *service)
const HcalQIEShape * getHcalShape(const HcalGenericDetId &fId) const
HcalSignalGenerator< HFDigitizerTraits > HFSignalGenerator
const HcalQIECoder * getHcalCoder(const HcalGenericDetId &fId) const
HcalSignalGenerator(const edm::InputTag &inputTag, const edm::EDGetTokenT< COLLECTION > &t)
HcalSimParameterMap * theParameterMap
std::vector< CaloSamples > theNoiseSignals
bool getByToken(EDGetToken token, Handle< PROD > &result) const
edm::InputTag theInputTag
these come from the ParameterSet
HcalElectronicsSim * theElectronicsSim
bool validDigi(const DIGI &digi)
HcalSignalGenerator< HODigitizerTraits > HOSignalGenerator
HcalSignalGenerator< HBHEDigitizerTraits > HBHESignalGenerator
const edm::Event * theEvent
these fields are set in initializeEvent()
edm::ESHandle< HcalDbService > theConditions
virtual void fillDigis(const COLLECTION *digis)
const edm::EventPrincipal * theEventPrincipal
HcalSignalGenerator< ZDCDigitizerTraits > ZDCSignalGenerator
~HcalSignalGenerator() override
virtual void fill(edm::ModuleCallingContext const *mcc)
void initializeEvent(const edm::EventPrincipal *eventPrincipal, const edm::EventSetup *eventSetup)
some users use EventPrincipals, not Events. We support both
void fillNoiseSignals() override
void fillNoiseSignals(CLHEP::HepRandomEngine *) override