|
|
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
constexpr int adc(sample_type sample)
get the ADC sample (12 bits)
T const * product() const
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
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of "!*" before the partial wildcard feature was incorporated). The per-event "cost" of each negative criterion with multiple relevant triggers is about the same as ! *was in the past
void fillNoiseSignals(CLHEP::HepRandomEngine *) override