X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=ZDC%2FAliZDCDigit.h;h=606bc9612879f5a404296ff72eca218d5d480cea;hb=793fdbecc79245d8f4cb3c435da2df5e829ca533;hp=ee662b44ee2142a67a4e0af4fe410555c6630c52;hpb=1450a7cddaa6ddb84b3fd1f13fc85727d1da8724;p=u%2Fmrichter%2FAliRoot.git diff --git a/ZDC/AliZDCDigit.h b/ZDC/AliZDCDigit.h index ee662b44ee2..606bc961287 100644 --- a/ZDC/AliZDCDigit.h +++ b/ZDC/AliZDCDigit.h @@ -3,56 +3,58 @@ /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * * See cxx source for full Copyright notice */ -//_________________________________________________________________________ +//********************************************************************** // +// Class for ZDC digit +// ADC Channels for each PM +// 5 for hadronic ZDCs 1 for EM ZDCs // -// ZDC digit = ADC Channels for each PM -// -//_________________________________________________________________________ +//********************************************************************** -#include "AliDigitNew.h" +#include -class AliZDCDigit : public AliDigitNew { +class AliZDCDigit : public TObject { public: AliZDCDigit() ; - AliZDCDigit(Int_t *Sector, Int_t ADCValue); + AliZDCDigit(Int_t *Sector, Int_t *ADCValue); AliZDCDigit(const AliZDCDigit & digit); virtual ~AliZDCDigit() {} // Getters - virtual Int_t GetSector(Int_t i) {return fSector[i];} - virtual Int_t GetADCValue() {return fADCValue;} + Int_t GetSector(Int_t i) {return fSector[i];} + Int_t GetADCValue(Int_t i) {return fADCValue[i];} // Operators - Int_t operator == (AliZDCDigit &digit) { - // Two digits are equal if they refers to the detector - // in the same sub-volume (same procedure as for hits) + // Two digits are equal if they refers to the detector + // in the same sub-volume (same procedure as for hits) + Int_t operator == (AliZDCDigit &digit){ Int_t i; for(i=0; i<2; i++) if(fSector[i]!=digit.GetSector(i)) return 0; return 1; } - virtual AliZDCDigit& operator + (AliZDCDigit &digit) { - // Adds the amplitude of digits - fADCValue += digit.fADCValue ; - return *this ; + // Adds the amplitude of digits + virtual AliZDCDigit operator + (AliZDCDigit &digit){ + for(Int_t i = 0; i < 2; i++) fADCValue[i] += digit.fADCValue[i]; + return *this; + } + + // Print method + virtual void Print(Option_t *) const { + printf("\t AliZDCDigit -> Detector %d Quadrant %d: ADC HighGain= %d ADC LowGain= %d\n ", + fSector[0], fSector[1], fADCValue[0], fADCValue[1]); } protected: //Data members Int_t fSector[2]; // Detector and tower in which light is produced - Int_t fADCValue; // ADC channel value - - // Print method - virtual void Print(Option_t *) { - printf(" -> DIGIT: Detector = %d Quadrant = %d ADCCh = %d\n ", - fSector[0], fSector[1], fADCValue); - } + Int_t fADCValue[2]; // ADC channel value (0 = high gain, 1 = low gain) - ClassDef(AliZDCDigit,1) // Digits in ZDC + ClassDef(AliZDCDigit,4) // Digits in ZDC } ; #endif // ALIZDCDIGIT_H +