Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:01:57

0001 #ifndef CastorQIEShape_h
0002 #define CastorQIEShape_h
0003 
0004 /** 
0005 \class CastorQIEData
0006 \author Panos Katsas (UoA)
0007 POOL object to store QIE basic shape
0008 */
0009 
0010 #include <vector>
0011 #include <algorithm>
0012 
0013 // 128 QIE channels
0014 class CastorQIEShape {
0015 public:
0016   CastorQIEShape();
0017   ~CastorQIEShape();
0018   float lowEdge(unsigned fAdc) const;
0019   float highEdge(unsigned fAdc) const;
0020   float center(unsigned fAdc) const;
0021   bool setLowEdges(const float fValue[32]);
0022   unsigned range(unsigned fAdc) const { return (fAdc >> 5) & 0x3; }
0023   unsigned local(unsigned fAdc) const { return fAdc & 0x1f; }
0024 
0025 protected:
0026 private:
0027   void expand();
0028   bool setLowEdge(float fValue, unsigned fAdc);
0029   float mValues[129];
0030 };
0031 
0032 #endif