CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 {return (fAdc >> 5) & 0x3;}
26  unsigned local (unsigned fAdc) const {
27  unsigned tmp = nbins_ == 32 ? (fAdc & 0x1f) : (fAdc & 0x3f) ;
28  return tmp;
29  }
30  unsigned nbins() const { return nbins_; }
31 
32  protected:
33  private:
34  void expand ();
35  bool setLowEdge (float fValue, unsigned fAdc);
36  std::vector<float> mValues;
37  unsigned int nbins_;
38 };
39 
40 #endif
float lowEdge(unsigned fAdc) const
Definition: HcalQIEShape.cc:32
bool setLowEdge(float fValue, unsigned fAdc)
Definition: HcalQIEShape.cc:50
float center(unsigned fAdc) const
Definition: HcalQIEShape.cc:37
unsigned int nbins_
Definition: HcalQIEShape.h:37
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
std::vector< float > mValues
Definition: HcalQIEShape.h:36
unsigned local(unsigned fAdc) const
Definition: HcalQIEShape.h:26
unsigned range(unsigned fAdc) const
Definition: HcalQIEShape.h:25
bool setLowEdges(unsigned int nVals, const float *fValue)
Definition: HcalQIEShape.cc:56
float highEdge(unsigned fAdc) const
Definition: HcalQIEShape.cc:45
unsigned nbins() const
Definition: HcalQIEShape.h:30