00001
00007 #ifndef CSCCLUSTER_H
00008 #define CSCCLUSTER_H
00009
00010 #include "CSCStrip.h"
00011
00038 class CSCCluster{
00039
00040 private:
00041
00042 unsigned int channelID;
00043 int peakingTimeROD;
00044 int width;
00045 int numSample;
00046 CSCStrip ** strip;
00047 double amax;
00048 int imax;
00049 double qTotal;
00050 double xpos;
00051
00052
00053 public:
00057 CSCCluster(unsigned int word1=0, unsigned int word2=0, int numSample=0);
00058
00060 ~CSCCluster();
00061
00062
00066 int GetStartChannel() {return channelID & 0xff;};
00067
00068
00070 int GetWidth() {return width;};
00071
00072
00078 CSCStrip* GetStrip(int i);
00079
00080
00087 int GetMaxIndex() {return imax;};
00088
00089
00096 double GetMaxAmp() {return amax-strip[imax]->GetPedestal();};
00097
00098
00104 double GetTotalCharge() {return qTotal;};
00105
00106
00107
00109 int GetLayer() {return (channelID>>9)&3;}
00110
00112 int IsTransverse() { return (channelID>>8)&1;}
00113
00115 int GetPhi() {return (channelID >>13)&7;};
00116
00117
00121 int IsLargeChamber() { return (channelID>>16)&1;}
00122
00128 double GetPosition(){ return xpos;};
00129
00130
00137 short int GetSample(int strip, int sam);
00138
00139
00141 void Read (unsigned int* buf);
00142
00149 double GetPeakingTime();
00150
00151
00153 void Print();
00154 };
00155
00156 #endif