]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ZDC/AliZDCDigit.h
Removing extra semicolons
[u/mrichter/AliRoot.git] / ZDC / AliZDCDigit.h
CommitLineData
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
f306c42d 13#include<TObject.h>
6cb3ec36 14
f306c42d 15class AliZDCDigit : public TObject {
6cb3ec36 16
17 public:
18
19 AliZDCDigit() ;
6de91202 20 AliZDCDigit(Int_t *Sector, Int_t *ADCValue);
6cb3ec36 21 AliZDCDigit(const AliZDCDigit & digit);
359cdddc 22 virtual ~AliZDCDigit() {}
6cb3ec36 23
24 // Getters
6de91202 25 virtual Int_t GetSector(Int_t i) {return fSector[i];}
26 virtual Int_t GetADCValue(Int_t i) {return fADCValue[i];}
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
6de91202 38 for(Int_t i = 0; i < 2; i++){
39 fADCValue[i] += digit.fADCValue[i] ;
40 }
6cb3ec36 41 return *this ;
42 }
43
5a881c97 44 protected:
6cb3ec36 45
359cdddc 46 //Data members
1450a7cd 47 Int_t fSector[2]; // Detector and tower in which light is produced
6de91202 48 Int_t fADCValue[2]; // ADC channel value (0 = high gain, 1 = low gain)
6cb3ec36 49
50 // Print method
51 virtual void Print(Option_t *) {
6de91202 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]);
6cb3ec36 54 }
55
6de91202 56 ClassDef(AliZDCDigit,4) // Digits in ZDC
6cb3ec36 57
58} ;
59
60#endif // ALIZDCDIGIT_H
f306c42d 61