CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_5_3_14/src/SimCalorimetry/HcalSimAlgos/src/HPDNoiseDataCatalog.cc

Go to the documentation of this file.
00001 // --------------------------------------------------------
00002 // Object to store HPD instance name and noise rate for the instance
00003 // Project: HPD noise library
00004 // Author: F.Ratnikov UMd, Jan. 15, 2008
00005 // $Id: HPDNoiseDataCatalog.cc,v 1.3 2008/07/21 18:30:03 tyetkin Exp $
00006 // --------------------------------------------------------
00007 
00008 #include "SimCalorimetry/HcalSimAlgos/interface/HPDNoiseDataCatalog.h"
00009 
00010 HPDNoiseDataCatalog::~HPDNoiseDataCatalog () {}
00011 
00012 void  HPDNoiseDataCatalog::setRate (const std::string& fName, float fDischargeRate, 
00013                                       float fIonFeedbackFirstPeakRate, float fIonFeedbackSecondPeakRate,
00014                                       float fElectronEmissionRate){
00015   for (size_t i = 0; i < mHpdName.size(); ++i) {
00016     if (fName == mHpdName[i]){
00017         mDischargeRate[i] = fDischargeRate;
00018         mIonFeedbackFirstPeakRate[i] = fIonFeedbackFirstPeakRate;
00019         mIonFeedbackSecondPeakRate[i] = fIonFeedbackSecondPeakRate;
00020         mElectronEmissionRate[i] = fElectronEmissionRate;
00021     }
00022   }
00023 }
00024 
00025 
00026 std::ostream& operator<< (std::ostream& fStream, const HPDNoiseDataCatalog& fCatalog) {
00027   fStream << "Name:DischargeRate:IonFeedbackRate:ElectronEmissionRate";
00028   for (size_t i = 0; i < fCatalog.size(); ++i) fStream << ' ' << fCatalog.getName (i) << ':' 
00029        << fCatalog.getDischargeRate(i) << ':' 
00030        << fCatalog.getIonFeedbackFirstPeakRate(i) << ':' << fCatalog.getIonFeedbackSecondPeakRate(i) << ':'
00031        << fCatalog.getElectronEmissionRate(i);
00032   return fStream;
00033 }