CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch13/src/CondFormats/L1TObjects/interface/L1CaloEcalScale.h

Go to the documentation of this file.
00001 #ifndef L1TObjects_L1CaloEcalScale_h
00002 #define L1TObjects_L1CaloEcalScale_h
00003 // -*- C++ -*-
00004 //
00005 // Package:     L1TObjects
00006 // Class  :     L1CaloEcalScale
00007 // 
00016 //
00017 // Author:      Jim Brooke
00018 // Created:     Wed Sep 27 17:18:27 CEST 2006
00019 // $Id: 
00020 //
00021 
00022 #include <vector>
00023 #include <ostream>
00024 #include <stdint.h>
00025 
00026 class L1CaloEcalScale {
00027 
00028  public:
00029 
00030   //  static const unsigned short nBinRank = 0xff;
00031   static const unsigned short nBinRank = 1<<8;
00032   static const unsigned short nBinEta = 28; // per half, eta index is 1-28
00033 
00035   L1CaloEcalScale(double lsb=1.0);
00036 
00038   ~L1CaloEcalScale();
00039 
00040   // eta = |eta|
00041   // etaSign = +1 or -1
00042 
00044   void setBin(unsigned short rank,
00045               unsigned short eta, // input eta index is 1-28
00046               short etaSign,
00047               double et);
00048 
00050   uint16_t rank(double et,
00051                 unsigned short eta, // input eta index is 1-28
00052                 short etaSign) const;
00053 
00055   double et(unsigned short rank,
00056             unsigned short eta, // input eta index is 1-28
00057             short etaSign) const;
00058 
00059   void print(std::ostream& s) const;
00060 
00061  private:
00062 
00064    // First nBinEta eta bins for positive eta, second nBinEta bins for negative
00065   double m_scale[nBinRank][2*nBinEta];
00066 
00067 };
00068 
00069 #endif