]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ZDC/AliZDCDigit.h
Correction in the volume path
[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 //              Class for ZDC digit 
9 //            ADC Channels for each PM 
10 //         5 for hadronic ZDCs 1 for EM ZDCs
11 //
12 //**********************************************************************
13
14 #include<TObject.h>
15
16 class AliZDCDigit : public TObject {
17
18  public:
19   
20   AliZDCDigit() ;
21   AliZDCDigit(Int_t *Sector, Int_t *ADCValue);
22   AliZDCDigit(const AliZDCDigit & digit);
23   virtual ~AliZDCDigit() {}
24
25   // Getters 
26   Int_t   GetSector(Int_t i)      {return fSector[i];}
27   Int_t   GetADCValue(Int_t i)      {return fADCValue[i];}
28
29   // Operators
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 operator == (AliZDCDigit &digit) {
33     Int_t i;
34     for(i=0; i<2; i++) if(fSector[i]!=digit.GetSector(i)) return 0;
35     return 1;
36   }
37   // Adds the amplitude of digits 
38   virtual AliZDCDigit& operator + (AliZDCDigit &digit) {
39     for(Int_t i = 0; i < 2; i++) fADCValue[i] += digit.fADCValue[i];
40     return *this ;
41   }
42   
43  protected:
44
45   //Data members
46   Int_t  fSector[2];         // Detector and tower in which light is produced
47   Int_t  fADCValue[2];       // ADC channel value (0 = high gain, 1 = low gain)
48
49   // Print method
50   virtual void Print(Option_t *) const {
51      printf(" -> DIGIT: Detector =  %d Quadrant =  %d ADCCh high gain=  %d ADCCh low gain=  %d\n ",
52      fSector[0], fSector[1], fADCValue[0], fADCValue[1]);
53   }
54     
55   ClassDef(AliZDCDigit,4)   // Digits in ZDC 
56
57 } ;
58
59 #endif //  ALIZDCDIGIT_H
60