#include <EcalSimpleProducer.h>
Public Member Functions | |
void | beginJob () |
EcalSimpleProducer (const edm::ParameterSet &pset) | |
virtual void | produce (edm::Event &evt, const edm::EventSetup &) |
virtual | ~EcalSimpleProducer () |
Public Member Functions inherited from edm::one::EDProducer<> | |
EDProducer ()=default | |
Public Member Functions inherited from edm::one::EDProducerBase | |
EDProducerBase () | |
ModuleDescription const & | moduleDescription () const |
virtual | ~EDProducerBase () |
Public Member Functions inherited from edm::ProducerBase | |
void | callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func) |
std::vector< edm::ProductResolverIndex > const & | indiciesForPutProducts (BranchType iBranchType) const |
ProducerBase () | |
void | registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &) |
std::function< void(BranchDescription const &)> | registrationCallback () const |
used by the fwk to register list of products More... | |
void | resolvePutIndicies (BranchType iBranchType, std::unordered_multimap< std::string, edm::ProductResolverIndex > const &iIndicies, std::string const &moduleLabel) |
virtual | ~ProducerBase () noexcept(false) |
Public Member Functions inherited from edm::EDConsumerBase | |
std::vector< ConsumesInfo > | consumesInfo () const |
void | convertCurrentProcessAlias (std::string const &processName) |
Convert "@currentProcess" in InputTag process names to the actual current process name. More... | |
EDConsumerBase () | |
EDConsumerBase (EDConsumerBase const &)=delete | |
EDConsumerBase (EDConsumerBase &&)=default | |
ProductResolverIndexAndSkipBit | indexFrom (EDGetToken, BranchType, TypeID const &) const |
void | itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const |
void | itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const |
std::vector< ProductResolverIndexAndSkipBit > const & | itemsToGetFrom (BranchType iType) const |
void | labelsForToken (EDGetToken iToken, Labels &oLabels) const |
void | modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const |
EDConsumerBase const & | operator= (EDConsumerBase const &)=delete |
EDConsumerBase & | operator= (EDConsumerBase &&)=default |
bool | registeredToConsume (ProductResolverIndex, bool, BranchType) const |
bool | registeredToConsumeMany (TypeID const &, BranchType) const |
void | updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet) |
virtual | ~EDConsumerBase () noexcept(false) |
Private Member Functions | |
int | cIndex2iEta (int iEta0) const |
int | cIndex2iPhi (int iPhi0) const |
int | cIndex2iTtEta (int iEta0) const |
int | cIndex2iTtPhi (int iPhi0) const |
void | replaceAll (std::string &s, const std::string &from, const std::string &to) const |
Private Attributes | |
std::unique_ptr< TFormula > | formula_ |
std::unique_ptr< TFormula > | simHitFormula_ |
std::unique_ptr< TFormula > | tpFormula_ |
bool | verbose_ |
Additional Inherited Members | |
Public Types inherited from edm::one::EDProducerBase | |
typedef EDProducerBase | ModuleType |
Public Types inherited from edm::ProducerBase | |
typedef ProductRegistryHelper::TypeLabelList | TypeLabelList |
Public Types inherited from edm::EDConsumerBase | |
typedef ProductLabels | Labels |
Static Public Member Functions inherited from edm::one::EDProducerBase | |
static const std::string & | baseType () |
static void | fillDescriptions (ConfigurationDescriptions &descriptions) |
static void | prevalidate (ConfigurationDescriptions &descriptions) |
Protected Member Functions inherited from edm::EDConsumerBase | |
template<typename ProductType , BranchType B = InEvent> | |
EDGetTokenT< ProductType > | consumes (edm::InputTag const &tag) |
EDGetToken | consumes (const TypeToGet &id, edm::InputTag const &tag) |
template<BranchType B> | |
EDGetToken | consumes (TypeToGet const &id, edm::InputTag const &tag) |
ConsumesCollector | consumesCollector () |
Use a ConsumesCollector to gather consumes information from helper functions. More... | |
template<typename ProductType , BranchType B = InEvent> | |
void | consumesMany () |
void | consumesMany (const TypeToGet &id) |
template<BranchType B> | |
void | consumesMany (const TypeToGet &id) |
template<typename ProductType , BranchType B = InEvent> | |
EDGetTokenT< ProductType > | mayConsume (edm::InputTag const &tag) |
EDGetToken | mayConsume (const TypeToGet &id, edm::InputTag const &tag) |
template<BranchType B> | |
EDGetToken | mayConsume (const TypeToGet &id, edm::InputTag const &tag) |
This edm producer generates Ecal Digis (data frames and TPGs) according to a given pattern. The pattern is defined as function of event id, crystal/TT, and time sample. Only barrel is currently supported for the crystal channel data.
Module parameters (in addition to standard source parameters):
The crystal ADC formula is parametrized with the following variables:
The trigger primitive formula is parametrized with the following variables:
In both formulae 'itt0' shortcut can be used for the trigger tower index within the SM starting at 0 from lowest relative eta and lowest phi and increasing first with phi then with eta. The syntax for the formula is the syntax defined in ROOT TFormula
Definition at line 38 of file EcalSimpleProducer.h.
EcalSimpleProducer::EcalSimpleProducer | ( | const edm::ParameterSet & | pset | ) |
Constructs an EcalSimpleProducer
pset | CMSSW configuration |
sdesc | description of this input source |
Definition at line 97 of file EcalSimpleProducer.cc.
References Exception, EcalElecEmulTccOnlyExample_cfg::formula, formula_, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), replaceAll(), simHitFormula_, EcalElecEmulTccOnlyExample_cfg::tpFormula, tpFormula_, and verbose_.
|
inlinevirtual |
|
inlinevirtual |
Called at start of job.
es | the event setup |
Reimplemented from edm::one::EDProducerBase.
Definition at line 55 of file EcalSimpleProducer.h.
References produce(), replaceAll(), alignCSCRings::s, and AlCaHLTBitMon_QueryRunRegistry::string.
|
inlineprivate |
Converts c-array index (contiguous integer starting from 0) to std CMSSW ECAL crystal eta index.
iEta0 | c-array index. '0' postfix reminds the index starts from 0 |
Definition at line 79 of file EcalSimpleProducer.h.
|
inlineprivate |
Converts c-array index (contiguous integer starting from 0) to std CMSSW ECAL crystal phi index.
iPhi0 | c-array index. '0' postfix reminds the index starts from 0 |
Definition at line 88 of file EcalSimpleProducer.h.
|
inlineprivate |
Converts c-array index (contiguous integer starting from 0) to std CMSSW ECAL trigger tower eta index.
iEta0 | c-array index. '0' postfix reminds the index starts from 0 |
Definition at line 97 of file EcalSimpleProducer.h.
|
inlineprivate |
Converts c-array index (contiguous integer starting from 0) to std CMSSW ECAL trigger tower phi index.
iPhi0 | c-array index. '0' postfix reminds the index starts from 0 |
Definition at line 106 of file EcalSimpleProducer.h.
|
virtual |
The main method. It produces the event.
evt | [out] produced event. |
Definition at line 16 of file EcalSimpleProducer.cc.
References funct::abs(), gather_cfg::cout, EcalTriggerTower, edm::EventID::event(), hfClusterShapes_cfi::hits, edm::EventBase::id(), eostools::move(), hgc_digi::nSamples, edm::Event::put(), EcalTriggerPrimitiveDigi::setSample(), EcalTriggerPrimitiveDigi::setSize(), lumiQTWidget::t, and HcalDigiParam_cfi::zside.
Referenced by beginJob().
|
private |
Help function to replace a pattern within a string. Every occurance of the pattern is replaced. An exact match is performed: no wild card.
s | string to operate on |
pattern | to replace. |
string | to substitute to the pattern |
Definition at line 164 of file EcalSimpleProducer.cc.
Referenced by beginJob(), and EcalSimpleProducer().
|
private |
Formula defining the data frame samples
Definition at line 115 of file EcalSimpleProducer.h.
Referenced by EcalSimpleProducer().
|
private |
Formula defining the sim hits
Definition at line 123 of file EcalSimpleProducer.h.
Referenced by EcalSimpleProducer().
|
private |
Formula defining the trigger primitives
Definition at line 119 of file EcalSimpleProducer.h.
Referenced by EcalSimpleProducer().
|
private |
Verbosity switch
Definition at line 127 of file EcalSimpleProducer.h.
Referenced by EcalSimpleProducer().