00001
00005 #ifndef CSCSTRIP_H
00006 #define CSCSTRIP_H
00007
00008
00021 class CSCStrip{
00022
00023 private:
00024
00025 unsigned int channelID;
00026 int numSample;
00027 short int * adc;
00028 double peakingTime;
00029 double amplitude;
00030 short int amin, amax;
00031 double ped;
00032 double noise;
00033 int imax;
00034 int isCorrected;
00035 double fitErrors[3];
00036 double fitResult[3];
00037 double fitChi2;
00038
00039
00040 public:
00042 CSCStrip::CSCStrip(unsigned int channel=0, int numSamples=0);
00043
00045 ~CSCStrip();
00046
00053 int GetID() {return channelID;};
00054
00056 int GetChannel() {return channelID & 0xff;};
00057
00059 int GetLayer() {return (channelID & 0x600)>>9;};
00060
00062 int IsTransverse() { return (channelID>>8)&1;};
00063
00065 int GetPhi() {return (channelID >>13)&7;};
00066
00067
00071 int IsLargeChamber() { return (channelID>>16)&1;}
00072
00078 void PutSample (int sample, int value){adc[sample] = value;};
00079
00080
00086 short int GetSample (int sample){return adc[sample];};
00087
00102 double GetPeakingTime() {return peakingTime;};
00103
00109 double GetAmplitude() {return amplitude-ped;};
00110
00111
00115 short int GetMinimum() {return amin;};
00116
00117
00121 short int GetMaximum() {return amax;};
00122
00123
00129 short int GetMinMax() {return amax-amin;};
00130
00134 double GetPedestal() {return ped;};
00135
00136
00142 void SetPedestal (double pedestal){ped=pedestal;};
00143
00146 double GetNoise() {return noise;};
00147
00152 void SetNoise (double n){noise=n;};
00153
00154
00155
00169 void CorrectEstimates();
00170
00171
00178 int FitBipolar(double width = 6.5);
00179
00180
00183 double GetFitChi2 () { return fitChi2;};
00184
00185
00188 double GetFitTime () { return fitResult[1];};
00189
00190
00194 void Read (unsigned int *buf);
00195
00197 void Print();
00198 };
00199
00200 #endif // CSCSTRIP_H
00201
00202