#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::EDProducer | |
EDProducer () | |
ModuleDescription const & | moduleDescription () const |
virtual | ~EDProducer () |
Public Member Functions inherited from edm::ProducerBase | |
void | callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func) |
ProducerBase () | |
void | registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &) |
std::function< void(BranchDescription const &)> | registrationCallback () const |
used by the fwk to register list of products More... | |
virtual | ~ProducerBase () |
Public Member Functions inherited from edm::EDConsumerBase | |
std::vector< ConsumesInfo > | consumesInfo () const |
EDConsumerBase () | |
ProductHolderIndexAndSkipBit | indexFrom (EDGetToken, BranchType, TypeID const &) const |
void | itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const |
void | itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const |
std::vector < ProductHolderIndexAndSkipBit > const & | itemsToGetFromEvent () const |
void | labelsForToken (EDGetToken iToken, Labels &oLabels) const |
void | modulesDependentUpon (std::string const &iProcessName, std::string const &iModuleLabel, bool iPrint, std::vector< char const * > &oModuleLabels) const |
void | modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const |
bool | registeredToConsume (ProductHolderIndex, bool, BranchType) const |
bool | registeredToConsumeMany (TypeID const &, BranchType) const |
void | updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &) |
virtual | ~EDConsumerBase () |
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::auto_ptr< TFormula > | formula_ |
std::auto_ptr< TFormula > | simHitFormula_ |
std::auto_ptr< TFormula > | tpFormula_ |
bool | verbose_ |
Additional Inherited Members | |
Public Types inherited from edm::EDProducer | |
typedef EDProducer | 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::EDProducer | |
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::EDProducer.
Definition at line 55 of file EcalSimpleProducer.h.
|
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. |
Implements edm::EDProducer.
Definition at line 16 of file EcalSimpleProducer.cc.
References funct::abs(), gather_cfg::cout, EcalTriggerTower, edm::EventID::event(), edm::EventBase::id(), hgc_digi::nSamples, edm::Event::put(), EcalTriggerPrimitiveDigi::setSample(), EcalTriggerPrimitiveDigi::setSize(), lumiQTWidget::t, and ecaldqm::zside().
|
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 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().