#include <EcalSimpleProducer.h>
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 |
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::ProducerBase | |
void | callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func) |
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 edm::hlt::Exception, EcalElecEmulExample_cfg::formula, formula_, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), replaceAll(), EcalElecEmulExample_cfg::simHitFormula, simHitFormula_, EcalElecEmulExample_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(), edm::Event::put(), EcalTriggerPrimitiveDigi::setSample(), EcalTriggerPrimitiveDigi::setSize(), edmStreamStallGrapher::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().