CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/CondFormats/EcalCorrections/interface/EcalGlobalShowerContainmentCorrectionsVsEta.h

Go to the documentation of this file.
00001 #ifndef CondFormats_EcalGlobalShowerContainmentCorrectionsVsEta_h
00002 #define CondFormats_EcalGlobalShowerContainmentCorrectionsVsEta_h
00003 // -*- C++ -*-
00004 //
00005 // Package:     CondFormats
00006 // Class  :     EcalGlobalShowerContainmentCorrectionsVsEta
00007 // 
00028 #include <vector>
00029 #include <algorithm>
00030 #include <map>
00031 #include <boost/cstdint.hpp>
00032 
00033 class DetId;
00034 
00035 class EcalGlobalShowerContainmentCorrectionsVsEta {
00036 
00037  public:
00038   
00040 
00044   struct Coefficients{
00045 
00046     Coefficients(){for(unsigned int i=0; i<Coefficients::kSize; ++i) data[i]=0;}
00047     Coefficients(const Coefficients& coeff){
00048       std::copy(coeff.data,
00049                 coeff.data+Coefficients::kSize,
00050                 data);
00051     }
00052  
00053     Coefficients& operator=(const Coefficients& coeff){
00054       if (this == &coeff) return *this; 
00055       std::copy(coeff.data,coeff.data+Coefficients::kSize,data);
00056       return *this;
00057     }
00058     
00060     static const int kCoefficients = 3;
00061     
00063     static const int kNTypes           = 2; 
00064     static const unsigned int kSize    = kCoefficients * kNTypes  ;
00065 
00066     double data[kSize];
00067 
00068   };
00069 
00070 
00072 
00077   const double correction3x3(const DetId& xtal) const;
00078 
00079 
00081 
00086   const double correction5x5(const DetId& xtal) const;
00087 
00089   const Coefficients correctionCoefficients() const;
00090 
00092   void fillCorrectionCoefficients(const Coefficients&  coefficients);
00093   
00094 
00095  private:
00096   enum  Type{e3x3,e5x5};
00097   
00099   const double correction(const DetId& xtal, 
00100                           Type type) const ;
00101   
00103   Coefficients coefficients_;  
00104   
00105 };
00106 
00107 #endif