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 (CLHEP::HepRandomEngine *) override
 
void fillNoiseSignals () override
 
 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 (CLHEP::HepRandomEngine *)
 fill theNoiseSignals with one event's worth of noise, in units of pe More...
 
void fillEvent ()
 
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 14 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 18 of file HPDNoiseGenerator.h.

18 {}

Member Function Documentation

void HPDNoiseGenerator::fillNoiseSignals ( CLHEP::HepRandomEngine *  )
overridevirtual

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

Implements CaloVNoiseSignalGenerator.

Definition at line 10 of file HPDNoiseGenerator.cc.

References HcalBaseSignalGenerator::fC2pe(), HPDNoiseLibraryReader::getNoisyHcalDetIds(), i, eostools::move(), HLT_25ns14e33_v1_cff::noise, theLibraryReader, and CaloVNoiseSignalGenerator::theNoiseSignals.

11 {
12  theNoiseSignals.clear();
13  std::vector<std::pair <HcalDetId, const float* > > noise = theLibraryReader.getNoisyHcalDetIds(engine);
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(std::move(newSamples));
25  }
26 }
int i
Definition: DBlmapReader.cc:9
void fC2pe(CaloSamples &samples) const
std::vector< CaloSamples > theNoiseSignals
def move
Definition: eostools.py:510
HPDNoiseLibraryReader theLibraryReader
std::vector< std::pair< HcalDetId, const float * > > getNoisyHcalDetIds(CLHEP::HepRandomEngine *)
void HPDNoiseGenerator::fillNoiseSignals ( )
inlineoverridevirtual

Implements CaloVNoiseSignalGenerator.

Definition at line 21 of file HPDNoiseGenerator.h.

21 {}

Member Data Documentation

HPDNoiseLibraryReader HPDNoiseGenerator::theLibraryReader
private

Definition at line 24 of file HPDNoiseGenerator.h.

Referenced by fillNoiseSignals().