]>
Commit | Line | Data |
---|---|---|
6cb3ec36 | 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() ; | |
359cdddc | 20 | AliZDCDigit(Int_t *Sector, Int_t ADCValue); |
6cb3ec36 | 21 | AliZDCDigit(const AliZDCDigit & digit); |
359cdddc | 22 | virtual ~AliZDCDigit() {} |
6cb3ec36 | 23 | |
24 | // Getters | |
1450a7cd | 25 | virtual Int_t GetSector(Int_t i) {return fSector[i];} |
26 | virtual Int_t GetADCValue() {return fADCValue;} | |
6cb3ec36 | 27 | |
6cb3ec36 | 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) | |
359cdddc | 32 | Int_t i; |
33 | for(i=0; i<2; i++) if(fSector[i]!=digit.GetSector(i)) return 0; | |
6cb3ec36 | 34 | return 1; |
35 | } | |
36 | virtual AliZDCDigit& operator + (AliZDCDigit &digit) { | |
37 | // Adds the amplitude of digits | |
6cb3ec36 | 38 | fADCValue += digit.fADCValue ; |
39 | return *this ; | |
40 | } | |
41 | ||
5a881c97 | 42 | protected: |
6cb3ec36 | 43 | |
359cdddc | 44 | //Data members |
1450a7cd | 45 | Int_t fSector[2]; // Detector and tower in which light is produced |
46 | Int_t fADCValue; // ADC channel value | |
6cb3ec36 | 47 | |
48 | // Print method | |
49 | virtual void Print(Option_t *) { | |
1450a7cd | 50 | printf(" -> DIGIT: Detector = %d Quadrant = %d ADCCh = %d\n ", |
359cdddc | 51 | fSector[0], fSector[1], fADCValue); |
6cb3ec36 | 52 | } |
53 | ||
54 | ClassDef(AliZDCDigit,1) // Digits in ZDC | |
55 | ||
56 | } ; | |
57 | ||
58 | #endif // ALIZDCDIGIT_H |