AliFMDDigit.h

Go to the documentation of this file.
00001 #ifndef ALIFMDDIGIT_H
00002 #define ALIFMDDIGIT_H
00003 //___________________________________________________________________
00004 //
00005 //  Digits classes for the FMD
00006 //  AliFMDBaseDigit - base class 
00007 //  AliFMDDigit     - Normal (smeared) digit             
00008 //  AliFMDSDigit    - Summable (non-smeared) digit             
00009 //
00010 #ifndef ROOT_TObject
00011 # include <TObject.h>
00012 #endif
00013 
00014 //____________________________________________________________________
00019 class AliFMDBaseDigit : public TObject 
00020 {
00021 public: 
00023   AliFMDBaseDigit();
00029   AliFMDBaseDigit(UShort_t detector, 
00030                   Char_t   ring='\0', 
00031                   UShort_t sector=0, 
00032                   UShort_t strip=0);
00034   virtual ~AliFMDBaseDigit() {}
00036   UShort_t     Detector()          const { return fDetector; }
00038   Char_t       Ring()              const { return fRing;     }
00040   UShort_t     Sector()            const { return fSector;   }
00042   UShort_t     Strip()             const { return fStrip;    }
00045   virtual void Print(Option_t* opt="") const;
00047   const char*  GetName() const;
00048 protected:
00049   UShort_t fDetector;  // (Sub) Detector # (1,2, or 3)
00050   Char_t   fRing;      // Ring ID ('I' or 'O')
00051   UShort_t fSector;    // Sector # (phi division)
00052   UShort_t fStrip;     // Strip # (radial division)
00053   ClassDef(AliFMDBaseDigit, 1) // Base class for FMD digits 
00054 };
00055 
00056 //____________________________________________________________________
00061 class AliFMDDigit : public AliFMDBaseDigit
00062 {
00063 public:
00065   AliFMDDigit();
00074   AliFMDDigit(UShort_t detector, 
00075               Char_t   ring='\0', 
00076               UShort_t sector=0, 
00077               UShort_t strip=0, 
00078               UShort_t count=0, 
00079               Short_t  count2=-1, 
00080               Short_t  count3=-1);
00082   virtual ~AliFMDDigit() {}
00084   UShort_t Count1()                const { return fCount1;   }
00086   Short_t  Count2()                const { return fCount2;   }
00088   Short_t  Count3()                const { return fCount3;   }
00090   UShort_t Counts()                const;
00093   void     Print(Option_t* opt="") const;
00095   const char* GetTitle() const;
00096 protected:
00097   UShort_t fCount1;     // Digital signal 
00098   Short_t  fCount2;     // Digital signal (-1 if not used)
00099   Short_t  fCount3;     // Digital signal (-1 if not used)
00100   ClassDef(AliFMDDigit,1)     // Normal FMD digit
00101 };
00102 
00103 inline UShort_t 
00104 AliFMDDigit::Counts() const 
00105 {
00106   return fCount1 
00107     + (fCount2 >= 0 ? fCount2 : 0)
00108     + (fCount3 >= 0 ? fCount3 : 0);
00109 }
00110 
00111 //____________________________________________________________________
00116 class AliFMDSDigit : public AliFMDBaseDigit
00117 {
00118 public:
00120   AliFMDSDigit();
00130   AliFMDSDigit(UShort_t detector, 
00131                Char_t   ring='\0', 
00132                UShort_t sector=0, 
00133                UShort_t strip=0, 
00134                Float_t  edep=0,
00135                UShort_t count=0, 
00136                Short_t  count2=-1, 
00137                Short_t  count3=-1);
00139   virtual ~AliFMDSDigit() {}
00141   UShort_t Count1()                const { return fCount1;   }
00143   Short_t  Count2()                const { return fCount2;   }
00145   Short_t  Count3()                const { return fCount3;   }
00147   UShort_t Counts()                const;
00149   Float_t  Edep()                  const { return fEdep;     }
00152   void     Print(Option_t* opt="") const;
00153 protected:
00154   Float_t  fEdep;       // Energy deposited 
00155   UShort_t fCount1;     // Digital signal 
00156   Short_t  fCount2;     // Digital signal (-1 if not used)
00157   Short_t  fCount3;     // Digital signal (-1 if not used)
00158   ClassDef(AliFMDSDigit,1)     // Summable FMD digit
00159 };
00160   
00161 inline UShort_t 
00162 AliFMDSDigit::Counts() const 
00163 {
00164   return fCount1 
00165     + (fCount2 >= 0 ? fCount2 : 0)
00166     + (fCount3 >= 0 ? fCount3 : 0);
00167 }
00168 
00169 
00170 #endif
00171 //____________________________________________________________________
00172 //
00173 // Local Variables:
00174 //   mode: C++
00175 // End:
00176 //
00177 //
00178 // EOF
00179 //

Generated on Fri Mar 24 17:11:21 2006 for ALICE FMD Off-line by  doxygen 1.4.6