Main Page | Class List | File List | Class Members | File Members | Related Pages

CSCStrip.h

Go to the documentation of this file.
00001 
00005 #ifndef CSCSTRIP_H
00006 #define CSCSTRIP_H
00007 
00008 
00021 class CSCStrip{ 
00022 
00023  private:
00024   
00025   unsigned int channelID;     // full ATLAS id of this channel
00026   int numSample;              // lenght of the adc array
00027   short int * adc;            // array of adc samples
00028   double peakingTime;         // interpolated peaking time in samples
00029   double amplitude;           // interpolated amplitude
00030   short int amin, amax;       // minimum & maximum sample
00031   double ped;                 // pedestal in ADC counts
00032   double noise;               // noise in ADC counts
00033   int imax;                   // the sample with the largest adc value.
00034   int isCorrected;            // corrections have been applied.
00035   double fitErrors[3];        // bipolar fit
00036   double fitResult[3];        // bipolar fit
00037   double fitChi2;             // bipolar fit
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;} // large or small csc
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 

Generated on Wed Oct 29 10:35:18 2008 for CSCRead by  doxygen 1.3.9.1