1 #ifndef EcalSimAlgos_EcalSignalGenerator_h
2 #define EcalSimAlgos_EcalSignalGenerator_h
42 class ModuleCallingContext;
45 template<
class ECALDIGITIZERTRAITS>
49 typedef typename ECALDIGITIZERTRAITS::Digi
DIGI;
50 typedef typename ECALDIGITIZERTRAITS::DigiCollection
COLLECTION;
149 std::shared_ptr<edm::Wrapper<COLLECTION>
const> digisPTR =
152 digis = digisPTR->product();
157 throw cms::Exception(
"EcalSignalGenerator") <<
"No Event or EventPrincipal was set";
164 it != digis->
end(); ++it)
180 for(
int id = 0;
id<digi.
size();
id++) {
181 if(digi[
id].
adc() > 0) ++DigiSum;
200 std::vector<float> gainRatios(4);
int adc(sample_type sample)
get the ADC sample (12 bits)
const edm::Event * theEvent
these fields are set in initializeEvent()
EcalSignalGenerator< EBDigitizerTraits > EBSignalGenerator
double theDefaultGains[NGAINS]
ECALDIGITIZERTRAITS::DigiCollection COLLECTION
edm::ESHandle< ESMIPToGeVConstant > hesMIPToGeV
boost::transform_iterator< IterHelp, boost::counting_iterator< int > > const_iterator
virtual void fillNoiseSignals() override
virtual void fill(edm::ModuleCallingContext const *mcc)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
float getESValueLow() const
const std::vector< float > GetGainRatios(const DetId &detid)
edm::EDGetTokenT< COLLECTION > tok_
const_iterator begin() const
virtual ~EcalSignalGenerator()
double fullScaleEnergy(const DetId &detId) const
edm::ESHandle< ESIntercalibConstants > hesMIPs
std::vector< CaloSamples > theNoiseSignals
edm::ESHandle< ESGain > hesgain
EcalSignalGenerator(const edm::InputTag &inputTag, const edm::EDGetTokenT< COLLECTION > &t, const double EBs25notCont, const double EEs25notCont, const double peToABarrel, const double peToAEndcap)
bool validDigi(const DIGI &digi)
const EcalIntercalibConstantsMC * ical
edm::ESHandle< EcalADCToGeVConstant > pAgc
void initializeEvent(const edm::Event *event, const edm::EventSetup *eventSetup)
const EcalADCToGeVConstant * agc
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
int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
void initializeEvent(const edm::EventPrincipal *eventPrincipal, const edm::EventSetup *eventSetup)
some users use EventPrincipals, not Events. We support both
EcalSignalGenerator< ESDigitizerTraits > ESSignalGenerator
edm::ESHandle< EcalGainRatios > grHandle
const edm::EventPrincipal * theEventPrincipal
T const * product() const
CaloSamples samplesInPE(const DIGI &digi)
T const * product() const
edm::InputTag theInputTag
these come from the ParameterSet
ECALDIGITIZERTRAITS::Digi DIGI
float gain12Over6() const
const_iterator end() const
double peToAConversion(const DetId &detId) const
edm::ESHandle< EcalIntercalibConstantsMC > pIcal
EcalSignalGenerator< EEDigitizerTraits > EESignalGenerator
virtual void fillNoiseSignals(CLHEP::HepRandomEngine *) override
float getESValueHigh() const
const ESIntercalibConstants * esmips
const ESMIPToGeVConstant * esMipToGeV