]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
New class for ZDC digits
authorcoppedis <coppedis@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 30 Nov 2000 17:21:44 +0000 (17:21 +0000)
committercoppedis <coppedis@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 30 Nov 2000 17:21:44 +0000 (17:21 +0000)
ZDC/AliZDCDigit.cxx [new file with mode: 0644]
ZDC/AliZDCDigit.h [new file with mode: 0644]

diff --git a/ZDC/AliZDCDigit.cxx b/ZDC/AliZDCDigit.cxx
new file mode 100644 (file)
index 0000000..9ab4bac
--- /dev/null
@@ -0,0 +1,55 @@
+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ *                                                                        *
+ * Author: The ALICE Off-line Project.                                    *
+ * Contributors are mentioned in the code where appropriate.              *
+ *                                                                        *
+ * Permission to use, copy, modify and distribute this software and its   *
+ * documentation strictly for non-commercial purposes is hereby granted   *
+ * without fee, provided that the above copyright notice appears in all   *
+ * copies and that both the copyright notice and this permission notice   *
+ * appear in the supporting documentation. The authors make no claims     *
+ * about the suitability of this software for any purpose. It is          *
+ * provided "as is" without express or implied warranty.                  *
+ **************************************************************************/
+
+//_________________________________________________________________________
+//
+//
+//   ZDC digit = ADC Channels for each PM 
+//
+//_________________________________________________________________________
+
+#include "AliZDCDigit.h"
+
+
+ClassImp(AliZDCDigit)
+
+//____________________________________________________________________________
+  AliZDCDigit::AliZDCDigit() 
+{
+  // Default constructor 
+  
+}
+
+//____________________________________________________________________________
+AliZDCDigit::AliZDCDigit(Int_t Det, Int_t Quad, Float_t ADCValue) 
+{  
+  // constructor with all data 
+
+
+  fDetector = Det;
+  fQuadrant = Quad;
+  fADCValue = ADCValue;  
+}
+
+//____________________________________________________________________________
+AliZDCDigit::AliZDCDigit(const AliZDCDigit & digit) 
+{
+  // copy constructor
+
+  fDetector = digit.fDetector;           
+  fQuadrant = digit.fQuadrant;           
+  fADCValue = digit.fADCValue;             
+
+}
diff --git a/ZDC/AliZDCDigit.h b/ZDC/AliZDCDigit.h
new file mode 100644 (file)
index 0000000..322f4f9
--- /dev/null
@@ -0,0 +1,62 @@
+#ifndef ALIZDCDIGIT_H
+#define ALIZDCDIGIT_H
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice                               */
+
+//_________________________________________________________________________
+//
+//
+//   ZDC digit = ADC Channels for each PM 
+//
+//_________________________________________________________________________
+
+#include "AliDigitNew.h"
+
+class AliZDCDigit : public AliDigitNew {
+
+ public:
+  
+  AliZDCDigit() ;
+  AliZDCDigit(Int_t Det, Int_t Quad, Float_t ADCValue);
+  AliZDCDigit(const AliZDCDigit & digit);
+
+  // Getters 
+  virtual Float_t   GetDetector() {return fDetector;}
+  virtual Float_t   GetQuadrant() {return fQuadrant;}
+  virtual Float_t   GetADCValue() {return fADCValue;}
+
+  virtual ~AliZDCDigit(){} 
+
+  // 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;
+    return 1;
+  }
+  virtual AliZDCDigit& operator + (AliZDCDigit &digit) {
+    // Adds the amplitude of digits 
+
+    fADCValue += digit.fADCValue ;
+    return *this ;
+  }
+  
+ protected:
+
+//  Int_t   fNprimary;          // Number of primaries
+  Int_t   fDetector;          // Detector
+  Int_t   fQuadrant;          // Quadrant
+  Float_t fADCValue;          // ADC channel value
+
+  // Print method
+  virtual void Print(Option_t *) {
+     printf(" -> DIGIT: Det =  %d Quad =  %d ADCCh =  %f\n ",
+     fDetector, fQuadrant, fADCValue);
+  }
+    
+  ClassDef(AliZDCDigit,1)   // Digits in ZDC 
+
+} ;
+
+#endif //  ALIZDCDIGIT_H