CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_6_1_2_SLHC2/src/RecoEgamma/EgammaHFProducers/plugins/HFValueStruct.h

Go to the documentation of this file.
00001 #ifndef _HFVALUESTRUCT_H
00002 #define _HFVALUESTRUCT_H
00003 
00004 #include <iostream>
00005 #include <vector>
00006 #include <Rtypes.h>
00007 
00008 
00009 namespace reco {
00010   
00011   
00012   class HFValueStruct {
00013   public:
00014     
00015 
00016     
00017     HFValueStruct() {}
00018     HFValueStruct(const int& version, const std::vector<double>& vect);
00019     // returns single value by index
00020     
00021       double EnCor(int ieta)const;
00022       double PUSlope(int ieta)const;
00023       double PUIntercept(int ieta)const;
00024       
00025 // sets single value by index
00026       void setEnCor(int ieta,double val);
00027       void setPUSlope(int ieta,double val);
00028       void setPUIntercept(int ieta,double val);
00029    
00030 
00031     
00032     // returns whole vector
00033       std::vector<double> EnCor()const;
00034       std::vector<double> PUSlope()const;
00035       std::vector<double> PUIntercept()const;
00036       
00037       // set whole vector
00038       void setEnCor(const std::vector<double>& val);
00039       void setPUSlope(const std::vector<double>& val);
00040       void setPUIntercept(const std::vector<double>& val);
00041       
00042       
00043       
00044   private:
00045       int v_;
00046       std::vector<double> hfvv_;
00047       //std::vector<double> SetHfvvFromDB_();  //will need when in database
00048       bool doEnCor_,doPU_;
00049       
00050       int indexByIeta(int& ieta)const;
00051       int ietaByIndex(int& indx)const;
00052       
00053   };
00054 }
00055 #endif