]> git.uio.no Git - u/mrichter/AliRoot.git/blame_incremental - ZDC/AliZDCDigit.h
Formula for rB corrected.
[u/mrichter/AliRoot.git] / ZDC / AliZDCDigit.h
... / ...
CommitLineData
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
15class AliZDCDigit : public AliDigitNew {
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 Float_t GetSector(Int_t i) {return fSector[i];}
26 virtual Float_t GetADCValue() {return fADCValue;}
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 fADCValue += digit.fADCValue ;
39 return *this ;
40 }
41
42 protected:
43
44 //Data members
45 Int_t fSector[2]; // Detecor and tower in which light is produced
46 Float_t fADCValue; // ADC channel value
47
48 // Print method
49 virtual void Print(Option_t *) {
50 printf(" -> DIGIT: Detector = %d Quadrant = %d ADCCh = %f\n ",
51 fSector[0], fSector[1], fADCValue);
52 }
53
54 ClassDef(AliZDCDigit,1) // Digits in ZDC
55
56} ;
57
58#endif // ALIZDCDIGIT_H