Go to the documentation of this file.00001 #ifndef HcalQIEShape_h
00002 #define HcalQIEShape_h
00003
00013 #include <vector>
00014 #include <algorithm>
00015
00016
00017 class HcalQIEShape {
00018 public:
00019 HcalQIEShape();
00020 ~HcalQIEShape();
00021 float lowEdge (unsigned fAdc) const;
00022 float highEdge (unsigned fAdc) const;
00023 float center (unsigned fAdc) const;
00024 bool setLowEdges (unsigned int nVals, const float *fValue);
00025 unsigned range (unsigned fAdc) const {return (fAdc >> 5) & 0x3;}
00026 unsigned local (unsigned fAdc) const {
00027 unsigned tmp = nbins_ == 32 ? (fAdc & 0x1f) : (fAdc & 0x3f) ;
00028 return tmp;
00029 }
00030
00031 protected:
00032 private:
00033 void expand ();
00034 bool setLowEdge (float fValue, unsigned fAdc);
00035 std::vector<float> mValues;
00036 unsigned int nbins_;
00037 };
00038
00039 #endif