#include <EcalSimpleSource.h>
Public Member Functions | |
void | beginJob () |
EcalSimpleSource (const edm::ParameterSet &pset, const edm::InputSourceDescription &sdesc) | |
virtual bool | produce (edm::Event &evt) |
virtual | ~EcalSimpleSource () |
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_ |
This edm source module 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 42 of file EcalSimpleSource.h.
EcalSimpleSource::EcalSimpleSource | ( | const edm::ParameterSet & | pset, |
const edm::InputSourceDescription & | sdesc | ||
) |
Constructs an EcalSimpleSource
pset | CMSSW configuration |
sdesc | description of this input source |
virtual EcalSimpleSource::~EcalSimpleSource | ( | ) | [inline, virtual] |
void EcalSimpleSource::beginJob | ( | void | ) | [inline, virtual] |
Called at start of job.
es | the event setup |
Reimplemented from edm::InputSource.
Definition at line 60 of file EcalSimpleSource.h.
{};
int EcalSimpleSource::cIndex2iEta | ( | int | iEta0 | ) | const [inline, private] |
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 84 of file EcalSimpleSource.h.
{
return (iEta0<85)?iEta0-85:iEta0-84;
}
int EcalSimpleSource::cIndex2iPhi | ( | int | iPhi0 | ) | const [inline, private] |
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 93 of file EcalSimpleSource.h.
{
return (iPhi0+10)%360+1;
}
int EcalSimpleSource::cIndex2iTtEta | ( | int | iEta0 | ) | const [inline, private] |
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 102 of file EcalSimpleSource.h.
{
return (iEta0<28)?iEta0-28:iEta0-27;
}
int EcalSimpleSource::cIndex2iTtPhi | ( | int | iPhi0 | ) | const [inline, private] |
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 111 of file EcalSimpleSource.h.
{
return iPhi0+1;
}
virtual bool EcalSimpleSource::produce | ( | edm::Event & | evt | ) | [virtual] |
The main method. It produces the event.
evt | [out] produced event. |
Implements edm::ConfigurableInputSource.
void EcalSimpleSource::replaceAll | ( | std::string & | s, |
const std::string & | from, | ||
const std::string & | to | ||
) | const [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 |
std::auto_ptr<TFormula> EcalSimpleSource::formula_ [private] |
Formula defining the data frame samples
Definition at line 120 of file EcalSimpleSource.h.
std::auto_ptr<TFormula> EcalSimpleSource::simHitFormula_ [private] |
Formula defining the sim hits
Definition at line 128 of file EcalSimpleSource.h.
std::auto_ptr<TFormula> EcalSimpleSource::tpFormula_ [private] |
Formula defining the trigger primitives
Definition at line 124 of file EcalSimpleSource.h.
bool EcalSimpleSource::verbose_ [private] |
Verbosity switch
Definition at line 132 of file EcalSimpleSource.h.