Introduction of summable digit class. The implementation of SDigitization and RAW2SDi...
authorcvetan <cvetan@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 16 Jun 2010 13:40:42 +0000 (13:40 +0000)
committercvetan <cvetan@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 16 Jun 2010 13:40:42 +0000 (13:40 +0000)
VZERO/AliVZEROSDigit.cxx [new file with mode: 0644]
VZERO/AliVZEROSDigit.h [new file with mode: 0644]
VZERO/VZERObaseLinkDef.h
VZERO/libVZERObase.pkg

diff --git a/VZERO/AliVZEROSDigit.cxx b/VZERO/AliVZEROSDigit.cxx
new file mode 100644 (file)
index 0000000..95acb65
--- /dev/null
@@ -0,0 +1,61 @@
+/**************************************************************************
+ * 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.                  *
+ **************************************************************************/
+
+#include "AliVZEROSDigit.h"
+
+ClassImp(AliVZEROSDigit)
+
+//__________________________________________________________________________
+AliVZEROSDigit::AliVZEROSDigit()
+   :AliDigit(),
+    fPMNumber(0),
+    fNBins(0),
+    fCharges(NULL)
+{
+  // Standard default
+  // constructor 
+}
+
+//__________________________________________________________________________
+AliVZEROSDigit::AliVZEROSDigit(Int_t pmnumber,
+                              Int_t nbins, 
+                              Float_t *charges,
+                              Int_t *labels)
+:AliDigit(),
+fPMNumber(pmnumber),
+fNBins(nbins),
+fCharges(NULL)
+{  
+  // Constructor
+  // Used in the digitizer
+  if (charges) {
+    for(Int_t i = 0; i < fNBins; ++i)
+      fCharges[i] = charges[i];
+  }
+  else {
+    for(Int_t i = 0; i < fNBins; ++i)
+      fCharges[i] = 0;
+  }
+
+  if (labels)
+    for(Int_t iTrack = 0; iTrack < 3; ++iTrack) fTracks[iTrack] = labels[iTrack];
+}
+
+//__________________________________________________________________________
+void AliVZEROSDigit::Print(const Option_t*) const
+{
+    // Dumps digit object
+    Dump();
+}
diff --git a/VZERO/AliVZEROSDigit.h b/VZERO/AliVZEROSDigit.h
new file mode 100644 (file)
index 0000000..1b02050
--- /dev/null
@@ -0,0 +1,30 @@
+#ifndef ALIVZEROSDIGIT_H
+#define ALIVZEROSDIGIT_H
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice                               */
+
+#include "AliDigit.h"
+
+//_____________________________________________________________________________
+class AliVZEROSDigit: public AliDigit  {
+
+ public:
+    AliVZEROSDigit();
+    AliVZEROSDigit(Int_t pmnumber,
+                  Int_t nbins, 
+                  Float_t *charges,
+                  Int_t *labels = 0);
+    virtual ~AliVZEROSDigit() {};
+    virtual void Print(const Option_t* option="") const;
+
+    Int_t   PMNumber()   const {return fPMNumber;}
+
+  private:
+    Int_t   fPMNumber;      // PhotoMultiplier number (0 to 63)
+    Int_t   fNBins;         // Number of charge bins
+    Float_t*fCharges;       //[fNBins] Array with charges
+
+    ClassDef(AliVZEROSDigit,1)  // VZERO SDigit class
+};
+
+#endif
index a840f63..45ebb9a 100755 (executable)
@@ -8,6 +8,7 @@
  
 #pragma link C++ class  AliVZEROLoader+;
 #pragma link C++ class  AliVZEROdigit+;
+#pragma link C++ class  AliVZEROSDigit+;
 #pragma link C++ class  AliVZEROCalibData+;
 #pragma link C++ class  AliVZEROPreprocessor+;
 #pragma link C++ class  AliVZERODataDCS+;
index 01d1a75..1dd1540 100644 (file)
@@ -3,6 +3,7 @@
 
 SRCS= AliVZEROLoader.cxx \
       AliVZEROdigit.cxx \
+      AliVZEROSDigit.cxx \
       AliVZEROCalibData.cxx \
       AliVZEROPreprocessor.cxx \
       AliVZERODataDCS.cxx \