3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
6 //_________________________________________________________________________
9 // ZDC digit = ADC Channels for each PM
11 //_________________________________________________________________________
15 class AliZDCDigit : public TObject {
20 AliZDCDigit(Int_t *Sector, Int_t *ADCValue);
21 AliZDCDigit(const AliZDCDigit & digit);
22 virtual ~AliZDCDigit() {}
25 virtual Int_t GetSector(Int_t i) {return fSector[i];}
26 virtual Int_t GetADCValue(Int_t i) {return fADCValue[i];}
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)
33 for(i=0; i<2; i++) if(fSector[i]!=digit.GetSector(i)) return 0;
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] ;
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)
51 virtual void Print(Option_t *) const {
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]);
56 ClassDef(AliZDCDigit,4) // Digits in ZDC
60 #endif // ALIZDCDIGIT_H