CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
HPDNoiseGenerator.cc
Go to the documentation of this file.
2 
5  theLibraryReader(pset)
6 {
7 }
8 
9 
10 void HPDNoiseGenerator::fillNoiseSignals(CLHEP::HepRandomEngine* engine)
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 }
27 
int i
Definition: DBlmapReader.cc:9
void fillNoiseSignals() override
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 *)
HPDNoiseGenerator(const edm::ParameterSet &pset)