#include <CaloVNoiseSignalGenerator.h>
Public Member Functions | |
CaloVNoiseSignalGenerator () | |
bool | contains (const DetId &detId) const |
void | fillEvent () |
fill theNoiseSignals with one event's worth of noise, in units of pe | |
void | getNoiseSignals (std::vector< CaloSamples > &noiseSignals) |
void | setNoiseSignals (const std::vector< CaloSamples > &noiseSignals) |
virtual | ~CaloVNoiseSignalGenerator () |
Protected Member Functions | |
virtual void | fillNoiseSignals () |
Protected Attributes | |
std::vector< CaloSamples > | theNoiseSignals |
Private Member Functions | |
void | fillDetIds () |
Private Attributes | |
std::vector< unsigned int > | theDetIds |
Definition at line 7 of file CaloVNoiseSignalGenerator.h.
CaloVNoiseSignalGenerator::CaloVNoiseSignalGenerator | ( | ) |
Definition at line 5 of file CaloVNoiseSignalGenerator.cc.
: theNoiseSignals(), theDetIds() { }
virtual CaloVNoiseSignalGenerator::~CaloVNoiseSignalGenerator | ( | ) | [inline, virtual] |
Definition at line 11 of file CaloVNoiseSignalGenerator.h.
{}
bool CaloVNoiseSignalGenerator::contains | ( | const DetId & | detId | ) | const |
Definition at line 25 of file CaloVNoiseSignalGenerator.cc.
References edm::binary_search_all(), DetId::rawId(), and theDetIds.
Referenced by HcalAmplifier::amplify().
{ return edm::binary_search_all(theDetIds, detId.rawId()); }
void CaloVNoiseSignalGenerator::fillDetIds | ( | ) | [private] |
Definition at line 31 of file CaloVNoiseSignalGenerator.cc.
References edm::sort_all(), theDetIds, and theNoiseSignals.
Referenced by fillEvent().
{ theDetIds.reserve(theNoiseSignals.size()); for(std::vector<CaloSamples>::const_iterator sampleItr = theNoiseSignals.begin(); sampleItr != theNoiseSignals.end(); ++sampleItr) { theDetIds.push_back(sampleItr->id().rawId()); } edm::sort_all(theDetIds); }
void CaloVNoiseSignalGenerator::fillEvent | ( | ) |
fill theNoiseSignals with one event's worth of noise, in units of pe
Definition at line 12 of file CaloVNoiseSignalGenerator.cc.
References fillDetIds(), fillNoiseSignals(), and theDetIds.
Referenced by CaloTDigitizer< Traits >::addNoiseSignals().
{ theDetIds.clear(); fillNoiseSignals(); fillDetIds(); }
virtual void CaloVNoiseSignalGenerator::fillNoiseSignals | ( | ) | [inline, protected, virtual] |
if you want to fill signals on demand, override this subclass is responsible for clearing theNoiseSignals before adding
Reimplemented in HPDNoiseGenerator, and edm::HcalNoiseStorage.
Definition at line 27 of file CaloVNoiseSignalGenerator.h.
Referenced by fillEvent().
{}
void CaloVNoiseSignalGenerator::getNoiseSignals | ( | std::vector< CaloSamples > & | noiseSignals | ) | [inline] |
Definition at line 16 of file CaloVNoiseSignalGenerator.h.
References theNoiseSignals.
Referenced by CaloTDigitizer< Traits >::addNoiseSignals().
{ noiseSignals = theNoiseSignals; }
void CaloVNoiseSignalGenerator::setNoiseSignals | ( | const std::vector< CaloSamples > & | noiseSignals | ) |
if you want to externally fill signals for the event, call this before fillEvent gets called.
Definition at line 19 of file CaloVNoiseSignalGenerator.cc.
References theNoiseSignals.
{ theNoiseSignals = noiseSignals; }
std::vector<unsigned int> CaloVNoiseSignalGenerator::theDetIds [private] |
Definition at line 32 of file CaloVNoiseSignalGenerator.h.
Referenced by contains(), fillDetIds(), and fillEvent().
std::vector<CaloSamples> CaloVNoiseSignalGenerator::theNoiseSignals [protected] |
Definition at line 28 of file CaloVNoiseSignalGenerator.h.
Referenced by HcalSignalGenerator< HBHEDigitizerTraits >::fill(), fillDetIds(), HPDNoiseGenerator::fillNoiseSignals(), getNoiseSignals(), and setNoiseSignals().