]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ZDC/AliZDCDigit.h
Remove reference to gROOT.
[u/mrichter/AliRoot.git] / ZDC / AliZDCDigit.h
1 #ifndef ALIZDCDIGIT_H
2 #define ALIZDCDIGIT_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice                               */
5
6 //_________________________________________________________________________
7 //
8 //
9 //   ZDC digit = ADC Channels for each PM 
10 //
11 //_________________________________________________________________________
12
13 #include<TObject.h>
14
15 class AliZDCDigit : public TObject {
16
17  public:
18   
19   AliZDCDigit() ;
20   AliZDCDigit(Int_t *Sector, Int_t *ADCValue);
21   AliZDCDigit(const AliZDCDigit & digit);
22   virtual ~AliZDCDigit() {}
23
24   // Getters 
25   virtual Int_t   GetSector(Int_t i)        {return fSector[i];}
26   virtual Int_t   GetADCValue(Int_t i)      {return fADCValue[i];}
27
28   // Operators
29   Int_t operator == (AliZDCDigit &digit) {
30     // Two digits are equal if they refers to the detector
31     // in the same sub-volume (same procedure as for hits)
32     Int_t i;
33     for(i=0; i<2; i++) if(fSector[i]!=digit.GetSector(i)) return 0;
34     return 1;
35   }
36   virtual AliZDCDigit& operator + (AliZDCDigit &digit) {
37     // Adds the amplitude of digits 
38     for(Int_t i = 0; i < 2; i++){
39       fADCValue[i] += digit.fADCValue[i] ;
40     } 
41     return *this ;
42   }
43   
44  protected:
45
46   //Data members
47   Int_t  fSector[2];         // Detector and tower in which light is produced
48   Int_t  fADCValue[2];       // ADC channel value (0 = high gain, 1 = low gain)
49
50   // Print method
51   virtual void Print(Option_t *) {
52      printf(" -> DIGIT: Detector =  %d Quadrant =  %d ADCCh high gain=  %d ADCCh low gain=  %d\n ",
53      fSector[0], fSector[1], fADCValue[0], fADCValue[1]);
54   }
55     
56   ClassDef(AliZDCDigit,4)   // Digits in ZDC 
57
58 } ;
59
60 #endif //  ALIZDCDIGIT_H
61