CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/SimCalorimetry/HcalSimAlgos/interface/HPDNoiseDataCatalog.h

Go to the documentation of this file.
00001 #ifndef HPDLibrary_HPDNoiseDataCatalog_h
00002 #define HPDLibrary_HPDNoiseDataCatalog_h
00003 
00004 // --------------------------------------------------------
00005 // Object to store HPD instance name and noise rate for the instance
00006 // Project: HPD noise library
00007 // Author: F.Ratnikov UMd, Jan. 15, 2008
00008 // $Id: HPDNoiseDataCatalog.h,v 1.4 2008/08/04 22:07:08 fedor Exp $
00009 // --------------------------------------------------------
00010 
00011 #include <iostream>
00012 #include <vector>
00013 #include <string>
00014 
00015 class HPDNoiseDataCatalog {
00016  public:
00017   HPDNoiseDataCatalog () {}
00018   virtual ~HPDNoiseDataCatalog ();
00019   
00021   void addHpd (const std::string& fName, float fDischargeRate, float fIonFeedbackFirstPeakRate, float fIonFeedbackSecondPeakRate, float fElectronEmissionRate){ 
00022          mHpdName.push_back (fName), mDischargeRate.push_back (fDischargeRate), 
00023          mIonFeedbackFirstPeakRate.push_back(fIonFeedbackFirstPeakRate),
00024          mIonFeedbackSecondPeakRate.push_back(fIonFeedbackSecondPeakRate),
00025          mElectronEmissionRate.push_back(fElectronEmissionRate);
00026        }
00028   size_t size () const {return mDischargeRate.size();}
00030   const std::vector<std::string>& allNames () const {return mHpdName;}
00032   float getDischargeRate (size_t i) const {return (i < mDischargeRate.size()) ? mDischargeRate[i] : 0.;}
00034   float getIonFeedbackFirstPeakRate (size_t i) const {return (i < mIonFeedbackFirstPeakRate.size()) ? mIonFeedbackFirstPeakRate[i] : 0.;}
00035   float getIonFeedbackSecondPeakRate (size_t i) const {return (i < mIonFeedbackSecondPeakRate.size()) ? mIonFeedbackSecondPeakRate[i] : 0.;}
00037   float getElectronEmissionRate (size_t i) const {return (i < mElectronEmissionRate.size()) ? mElectronEmissionRate[i] : 0.;}
00039   const std::string& getName (size_t i) const {return mHpdName[i];}
00041   void setRate (const std::string& fName, float fDischargeRate, float fIonFeedbackFirstPeakRate, float fIonFeedbackSecondPeakRate, float fElectronEmissionRate);
00043   static const char* className () {return "HPDNoiseDataCatalog";}
00045   static const char* objectName () {return "catalog";}
00046  private:
00047   std::vector<std::string> mHpdName;
00048   std::vector<float> mDischargeRate;//HPD discharge rate
00049   std::vector<float> mIonFeedbackFirstPeakRate;//HPD ion feedback rate
00050   std::vector<float> mIonFeedbackSecondPeakRate;//HPD ion feedback rate
00051   std::vector<float> mElectronEmissionRate;//HPD thermal electron emission rate
00052 
00053 };
00054 
00056 std::ostream& operator<< (std::ostream&, const HPDNoiseDataCatalog&);
00057 
00058 #endif