CMS 3D CMS Logo

Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes

CaloVNoiseSignalGenerator Class Reference

#include <CaloVNoiseSignalGenerator.h>

Inheritance diagram for CaloVNoiseSignalGenerator:
edm::HcalNoiseStorage HcalBaseSignalGenerator HcalSignalGenerator< HCALDIGITIZERTRAITS > HPDNoiseGenerator

List of all members.

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< CaloSamplestheNoiseSignals

Private Member Functions

void fillDetIds ()

Private Attributes

std::vector< unsigned int > theDetIds

Detailed Description

Definition at line 7 of file CaloVNoiseSignalGenerator.h.


Constructor & Destructor Documentation

CaloVNoiseSignalGenerator::CaloVNoiseSignalGenerator ( )

Definition at line 5 of file CaloVNoiseSignalGenerator.cc.

virtual CaloVNoiseSignalGenerator::~CaloVNoiseSignalGenerator ( ) [inline, virtual]

Definition at line 11 of file CaloVNoiseSignalGenerator.h.

{}

Member Function Documentation

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().

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;
}

Member Data Documentation

std::vector<unsigned int> CaloVNoiseSignalGenerator::theDetIds [private]

Definition at line 32 of file CaloVNoiseSignalGenerator.h.

Referenced by contains(), fillDetIds(), and fillEvent().