]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ZDC/AliZDCDigit.h
322f4f9845a4c3d85d933f55f82f5e682d672218
[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 "AliDigitNew.h"
14
15 class AliZDCDigit : public AliDigitNew {
16
17  public:
18   
19   AliZDCDigit() ;
20   AliZDCDigit(Int_t Det, Int_t Quad, Float_t ADCValue);
21   AliZDCDigit(const AliZDCDigit & digit);
22
23   // Getters 
24   virtual Float_t   GetDetector() {return fDetector;}
25   virtual Float_t   GetQuadrant() {return fQuadrant;}
26   virtual Float_t   GetADCValue() {return fADCValue;}
27
28   virtual ~AliZDCDigit(){} 
29
30   // Operators
31   Int_t operator == (AliZDCDigit &digit) {
32     // Two digits are equal if they refers to the detector
33     // in the same sub-volume (same procedure as for hits)
34     if (fDetector != digit.fDetector) return 0;
35     if (fQuadrant != digit.fQuadrant) return 0;
36     return 1;
37   }
38   virtual AliZDCDigit& operator + (AliZDCDigit &digit) {
39     // Adds the amplitude of digits 
40
41     fADCValue += digit.fADCValue ;
42     return *this ;
43   }
44   
45  protected:
46
47 //  Int_t   fNprimary;          // Number of primaries
48   Int_t   fDetector;          // Detector
49   Int_t   fQuadrant;          // Quadrant
50   Float_t fADCValue;          // ADC channel value
51
52   // Print method
53   virtual void Print(Option_t *) {
54      printf(" -> DIGIT: Det =  %d Quad =  %d ADCCh =  %f\n ",
55      fDetector, fQuadrant, fADCValue);
56   }
57     
58   ClassDef(AliZDCDigit,1)   // Digits in ZDC 
59
60 } ;
61
62 #endif //  ALIZDCDIGIT_H