]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ZDC/AliZDCDigit.h
update from pr task : sjena
[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
8a2624cc 6//**********************************************************************
6cb3ec36 7//
8a2624cc 8// Class for ZDC digit
9// ADC Channels for each PM
10// 5 for hadronic ZDCs 1 for EM ZDCs
6cb3ec36 11//
8a2624cc 12//**********************************************************************
6cb3ec36 13
f306c42d 14#include<TObject.h>
6cb3ec36 15
f306c42d 16class AliZDCDigit : public TObject {
6cb3ec36 17
18 public:
19
20 AliZDCDigit() ;
6de91202 21 AliZDCDigit(Int_t *Sector, Int_t *ADCValue);
6cb3ec36 22 AliZDCDigit(const AliZDCDigit & digit);
be004c43 23 AliZDCDigit& operator= (const AliZDCDigit &digit);
359cdddc 24 virtual ~AliZDCDigit() {}
6cb3ec36 25
26 // Getters
43e3307d 27 Int_t GetSector(Int_t i) {return fSector[i];}
abf60186 28 Int_t GetADCValue(Int_t i) {return fADCValue[i];}
6cb3ec36 29
6cb3ec36 30 // Operators
8a2624cc 31 // Two digits are equal if they refers to the detector
32 // in the same sub-volume (same procedure as for hits)
cc2abffd 33 Int_t operator == (AliZDCDigit &digit){
359cdddc 34 Int_t i;
35 for(i=0; i<2; i++) if(fSector[i]!=digit.GetSector(i)) return 0;
6cb3ec36 36 return 1;
37 }
8a2624cc 38 // Adds the amplitude of digits
cc2abffd 39 virtual AliZDCDigit operator + (AliZDCDigit &digit){
8a2624cc 40 for(Int_t i = 0; i < 2; i++) fADCValue[i] += digit.fADCValue[i];
cc2abffd 41 return *this;
6cb3ec36 42 }
abf60186 43
44 // Print method
45 virtual void Print(Option_t *) const {
46 printf("\t AliZDCDigit -> Detector %d Quadrant %d: ADC HighGain= %d ADC LowGain= %d\n ",
47 fSector[0], fSector[1], fADCValue[0], fADCValue[1]);
48 }
6cb3ec36 49
5a881c97 50 protected:
6cb3ec36 51
359cdddc 52 //Data members
1450a7cd 53 Int_t fSector[2]; // Detector and tower in which light is produced
6de91202 54 Int_t fADCValue[2]; // ADC channel value (0 = high gain, 1 = low gain)
6cb3ec36 55
6de91202 56 ClassDef(AliZDCDigit,4) // Digits in ZDC
6cb3ec36 57
58} ;
59
60#endif // ALIZDCDIGIT_H
f306c42d 61