CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_2_7_hltpatch2/src/CondFormats/L1TObjects/interface/L1CaloEtScale.h

Go to the documentation of this file.
00001 #ifndef L1TObjects_L1CaloEtScale_h
00002 #define L1TObjects_L1CaloEtScale_h
00003 // -*- C++ -*-
00004 //
00005 // Package:     L1TObjects
00006 // Class  :     L1CaloEtScale
00007 // 
00017 //
00018 // Author:      Jim Brooke
00019 // Created:     Wed Sep 27 17:18:27 CEST 2006
00020 // $Id: 
00021 //
00022 
00023 #include <boost/cstdint.hpp>
00024 #include <vector>
00025 #include <ostream>
00026 
00027 class L1CaloEtScale {
00028 
00029  public:
00030 
00032   L1CaloEtScale();
00033 
00036   L1CaloEtScale(const double linearLsbInGeV, const std::vector<double> thresholdsInGeV);
00037 
00039   L1CaloEtScale(const unsigned linScaleMax, const unsigned rankScaleMax, const double linearLsbInGeV, const std::vector<double> thresholdsInGeV);
00040 
00041   // destructor
00042   ~L1CaloEtScale();
00043 
00044   // get input scale size
00045   unsigned linScaleMax() const { return m_linScaleMax; }
00046 
00047   // get output scale size
00048   unsigned rankScaleMax() const { return m_rankScaleMax; }
00049 
00051   double linearLsb() const { return m_linearLsb; }
00052 
00054   uint16_t rank(const uint16_t linear) const;
00055 
00057   uint16_t rank(const double EtInGeV) const;
00058 
00060   double et(const uint16_t rank) const;
00061 
00063   const std::vector<double>& getThresholds() const { return m_thresholds; }
00064 
00065   void print(std::ostream& s) const;
00066 
00067  private:
00068 
00070   uint16_t m_linScaleMax;
00071   
00073   uint16_t m_rankScaleMax;
00074 
00075 
00077   double m_linearLsb;
00078 
00080   std::vector<double> m_thresholds;
00081 
00082 };
00083 
00084 std::ostream& operator << (std::ostream& os, const L1CaloEtScale onj);
00085 
00086 #endif