CMS 3D CMS Logo

HcalQIEShape.h
Go to the documentation of this file.
1 #ifndef HcalQIEShape_h
2 #define HcalQIEShape_h
3 
13 #include <vector>
14 #include <algorithm>
15 
16 // N QIE channels
17 class HcalQIEShape {
18 public:
19  HcalQIEShape();
20  ~HcalQIEShape();
21  float lowEdge(unsigned fAdc) const;
22  float highEdge(unsigned fAdc) const;
23  float center(unsigned fAdc) const;
24  bool setLowEdges(unsigned int nVals, const float *fValue);
25  unsigned range(unsigned fAdc) const {
26  //6 bit mantissa in QIE10, 5 in QIE8
27  return (nbins_ == 32) ? (fAdc >> 5) & 0x3 : (fAdc >> 6) & 0x3;
28  }
29  unsigned local(unsigned fAdc) const {
30  unsigned tmp = nbins_ == 32 ? (fAdc & 0x1f) : (fAdc & 0x3f);
31  return tmp;
32  }
33  unsigned nbins() const { return nbins_; }
34 
35 protected:
36 private:
37  void expand();
38  bool setLowEdge(float fValue, unsigned fAdc);
39  std::vector<float> mValues;
40  unsigned int nbins_;
41 };
42 
43 #endif
unsigned range(unsigned fAdc) const
Definition: HcalQIEShape.h:25
bool setLowEdge(float fValue, unsigned fAdc)
Definition: HcalQIEShape.cc:52
unsigned int nbins_
Definition: HcalQIEShape.h:40
float highEdge(unsigned fAdc) const
Definition: HcalQIEShape.cc:46
unsigned local(unsigned fAdc) const
Definition: HcalQIEShape.h:29
float center(unsigned fAdc) const
Definition: HcalQIEShape.cc:36
std::vector< float > mValues
Definition: HcalQIEShape.h:39
unsigned nbins() const
Definition: HcalQIEShape.h:33
float lowEdge(unsigned fAdc) const
Definition: HcalQIEShape.cc:30
tmp
align.sh
Definition: createJobs.py:716
bool setLowEdges(unsigned int nVals, const float *fValue)
Definition: HcalQIEShape.cc:59