00001 #include "SimCalorimetry/HcalSimAlgos/interface/HPDNoiseGenerator.h" 00002 00003 HPDNoiseGenerator::HPDNoiseGenerator(const edm::ParameterSet & pset) 00004 : HcalBaseSignalGenerator(), 00005 theLibraryReader(pset) 00006 { 00007 } 00008 00009 00010 void HPDNoiseGenerator::fillNoiseSignals() 00011 { 00012 theNoiseSignals.clear(); 00013 std::vector<std::pair <HcalDetId, const float* > > noise = theLibraryReader.getNoisyHcalDetIds(); 00014 for(std::vector<std::pair <HcalDetId, const float* > >::const_iterator noiseItr = noise.begin(); 00015 noiseItr != noise.end(); ++noiseItr) 00016 { 00017 CaloSamples newSamples(noiseItr->first, 10); 00018 for(unsigned i = 0; i < 10; ++i) 00019 { 00020 newSamples[i] = (noiseItr->second)[i]; 00021 } 00022 // result should come back in units of photoelectrons 00023 fC2pe(newSamples); 00024 theNoiseSignals.push_back(std::move(newSamples)); 00025 } 00026 } 00027