]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PHOS/AliPHOSDATreeDigit.h
forgotten change
[u/mrichter/AliRoot.git] / PHOS / AliPHOSDATreeDigit.h
deleted file mode 120000 (symlink)
index 8b40b275c7cfc4c635087a742370a3619e03a100..0000000000000000000000000000000000000000
+++ /dev/null
@@ -1 +0,0 @@
-/home/polishch/Shuttle/HisaDA/DAsrc/AliPHOSDATreeDigit.h
\ No newline at end of file
new file mode 100644 (file)
index 0000000000000000000000000000000000000000..2e54682a345d6fe75185e2a58ad64251a3e43668
--- /dev/null
@@ -0,0 +1,54 @@
+#ifndef AliPHOSDATreeDigit_H
+#define AliPHOSDATreeDigit_H
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice                               */
+
+/* $Id$ */
+
+// --
+// --
+// Implementation for TTree output in PHOS DA
+// for calibrating energy by pi0 and MIP.
+// --
+// -- Author: Hisayuki Torii (Hiroshima Univ.)
+// --
+
+class AliPHOSDATreeDigit {
+
+  friend std::ostream& operator<<(std::ostream& out,const AliPHOSDATreeDigit& digit);
+
+ public:
+
+  AliPHOSDATreeDigit():fEnergy(0),fAbsId(-1){/**/};
+  AliPHOSDATreeDigit(float energy,int row,int col):fEnergy(energy),fAbsId(row*56+col){/**/};
+  AliPHOSDATreeDigit(float energy,short absid):fEnergy(energy),fAbsId(absid){/**/};
+  virtual ~AliPHOSDATreeDigit(){/**/};
+  void Set(float energy,int row,int col){fEnergy=energy; fAbsId = row*56 + col;};
+  void Set(float energy,short absid){fEnergy=energy; fAbsId = absid;};
+  void SetEnergy(float energy){ fEnergy=energy; };
+  float GetEnergy() const{return fEnergy;};
+  int GetCol() const{return fAbsId % 56; };     // 0 - 55 : col( z ) number
+  int GetRow() const{return (int) fAbsId/56; }; // 0 - 63 : row( x ) number
+  short GetAbsId() const{return fAbsId; };
+  short GetDigitId() const{return fAbsId; };
+  bool IsValid() const { if( fAbsId>=0 && fAbsId < 3584 ) return true; return false; };
+  bool IsNeighbor(const AliPHOSDATreeDigit &digit) const;
+  void Print(Option_t *opt="") const;
+
+  //AliPHOSDATreeDigit(float energy,int mod,int row,int col):fEnergy(energy),fAbsId(mod*3584+row*56+col){/**/};
+  //void Set(float energy,int mod,int row,int col){
+  //fEnergy=energy; fAbsId = mod * 3584 + row*56 + col;};
+  //int GetMod(){return (int)(fAbsId/3584); };      // 0 -  4 : module number
+  //int GetCol(){return (fAbsId%3584) % 56; };      // 0 - 55 : col( z ) number
+  //int GetRow(){return (int)(fAbsId%3584) / 56; }; // 0 - 63 : row( x ) number
+  //bool IsValid(){ if( fAbsId>=0 && fAbsId < 17920 ) return true; return false; };
+
+ private:
+
+  float fEnergy; // Energy in GeV
+  short fAbsId;  // col + row * 56 [+mod*3584 in some cases]
+
+  ClassDef(AliPHOSDATreeDigit,1) // Simple Digit Structure for PHOS DA
+};
+
+#endif