CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
HPDNoiseGenerator Class Reference

#include <HPDNoiseGenerator.h>

Inheritance diagram for HPDNoiseGenerator:
HcalBaseSignalGenerator CaloVNoiseSignalGenerator

Public Member Functions

void fillNoiseSignals ()
 
 HPDNoiseGenerator (const edm::ParameterSet &pset)
 
virtual ~HPDNoiseGenerator ()
 
- Public Member Functions inherited from HcalBaseSignalGenerator
 HcalBaseSignalGenerator ()
 
void setElectronicsSim (HcalElectronicsSim *electronicsSim)
 
void setParameterMap (HcalSimParameterMap *map)
 
virtual ~HcalBaseSignalGenerator ()
 
- Public Member Functions inherited from CaloVNoiseSignalGenerator
 CaloVNoiseSignalGenerator ()
 
bool contains (const DetId &detId) const
 
void fillEvent ()
 fill theNoiseSignals with one event's worth of noise, in units of pe More...
 
void getNoiseSignals (std::vector< CaloSamples > &noiseSignals)
 
void setNoiseSignals (const std::vector< CaloSamples > &noiseSignals)
 
virtual ~CaloVNoiseSignalGenerator ()
 

Private Attributes

HPDNoiseLibraryReader theLibraryReader
 

Additional Inherited Members

- Protected Member Functions inherited from HcalBaseSignalGenerator
void fC2pe (CaloSamples &samples) const
 
- Protected Attributes inherited from HcalBaseSignalGenerator
HcalElectronicsSimtheElectronicsSim
 
HcalSimParameterMaptheParameterMap
 
- Protected Attributes inherited from CaloVNoiseSignalGenerator
std::vector< CaloSamplestheNoiseSignals
 

Detailed Description

Definition at line 10 of file HPDNoiseGenerator.h.

Constructor & Destructor Documentation

HPDNoiseGenerator::HPDNoiseGenerator ( const edm::ParameterSet pset)

Definition at line 3 of file HPDNoiseGenerator.cc.

5  theLibraryReader(pset)
6 {
7 }
HPDNoiseLibraryReader theLibraryReader
virtual HPDNoiseGenerator::~HPDNoiseGenerator ( )
inlinevirtual

Definition at line 14 of file HPDNoiseGenerator.h.

14 {}

Member Function Documentation

void HPDNoiseGenerator::fillNoiseSignals ( )
virtual

if you want to fill signals on demand, override this subclass is responsible for clearing theNoiseSignals before adding

Reimplemented from CaloVNoiseSignalGenerator.

Definition at line 10 of file HPDNoiseGenerator.cc.

References HcalBaseSignalGenerator::fC2pe(), HPDNoiseLibraryReader::getNoisyHcalDetIds(), i, theLibraryReader, and CaloVNoiseSignalGenerator::theNoiseSignals.

11 {
12  theNoiseSignals.clear();
13  std::vector<std::pair <HcalDetId, const float* > > noise = theLibraryReader.getNoisyHcalDetIds();
14  for(std::vector<std::pair <HcalDetId, const float* > >::const_iterator noiseItr = noise.begin();
15  noiseItr != noise.end(); ++noiseItr)
16  {
17  CaloSamples newSamples(noiseItr->first, 10);
18  for(unsigned i = 0; i < 10; ++i)
19  {
20  newSamples[i] = (noiseItr->second)[i];
21  }
22  // result should come back in units of photoelectrons
23  fC2pe(newSamples);
24  theNoiseSignals.push_back(newSamples);
25  }
26 }
int i
Definition: DBlmapReader.cc:9
void fC2pe(CaloSamples &samples) const
std::vector< CaloSamples > theNoiseSignals
HPDNoiseLibraryReader theLibraryReader
std::vector< std::pair< HcalDetId, const float * > > getNoisyHcalDetIds()

Member Data Documentation

HPDNoiseLibraryReader HPDNoiseGenerator::theLibraryReader
private

Definition at line 19 of file HPDNoiseGenerator.h.

Referenced by fillNoiseSignals().