]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ZDC/AliZDCDigit.h
fixed bug in AliSTARTTrigger
[u/mrichter/AliRoot.git] / ZDC / AliZDCDigit.h
index 4c6344cdf820064fcc44fa3d197c947169d3e839..0d80a5508c222bf890d1744b07f3866047c4bc51 100644 (file)
 //
 //_________________________________________________________________________
 
-#include "AliDigitNew.h"
+#include<TObject.h>
 
-class AliZDCDigit : public AliDigitNew {
+class AliZDCDigit : public TObject {
 
  public:
   
   AliZDCDigit() ;
-  AliZDCDigit(Int_t Det, Int_t Quad, Float_t ADCValue);
+  AliZDCDigit(Int_t *Sector, Int_t *ADCValue);
   AliZDCDigit(const AliZDCDigit & digit);
+  virtual ~AliZDCDigit() {}
 
   // Getters 
-  virtual Float_t   GetDetector() {return fDetector;}
-  virtual Float_t   GetQuadrant() {return fQuadrant;}
-  virtual Float_t   GetADCValue() {return fADCValue;}
-
-  virtual ~AliZDCDigit(){} 
+  virtual Int_t   GetSector(Int_t i)        {return fSector[i];}
+  virtual 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)
-    if (fDetector != digit.fDetector) return 0;
-    if (fQuadrant != digit.fQuadrant) return 0;
+    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 ;
+    for(Int_t i = 0; i < 2; i++){
+      fADCValue[i] += digit.fADCValue[i] ;
+    } 
     return *this ;
   }
   
-// protected:
+ protected:
 
-//  Int_t   fNprimary;          // Number of primaries
-  Int_t   fDetector;          // Detector
-  Int_t   fQuadrant;          // Quadrant
-  Float_t fADCValue;          // ADC channel value
+  //Data members
+  Int_t  fSector[2];         // Detector and tower in which light is produced
+  Int_t  fADCValue[2];       // ADC channel value (0 = high gain, 1 = low gain)
 
   // Print method
-  virtual void Print(Option_t *) {
-     printf(" -> DIGIT: Det =  %d Quad =  %d ADCCh =  %f\n ",
-     fDetector, fQuadrant, fADCValue);
+  virtual void Print(Option_t *) const {
+     printf(" -> DIGIT: Detector =  %d Quadrant =  %d ADCCh high gain=  %d ADCCh low gain=  %d\n ",
+     fSector[0], fSector[1], fADCValue[0], fADCValue[1]);
   }
     
-  ClassDef(AliZDCDigit,1)   // Digits in ZDC 
+  ClassDef(AliZDCDigit,4)   // Digits in ZDC 
 
 } ;
 
 #endif //  ALIZDCDIGIT_H
+