]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITSRecPoint.h
A little bug fix (Maximiliano)
[u/mrichter/AliRoot.git] / ITS / AliITSRecPoint.h
index 0a37c8a2e3215e8790650dbde2c12f913d933ddb..25db19aa907df5c3ea2a9c30b3dbfc6ffcb99b8c 100644 (file)
@@ -26,6 +26,9 @@
 #include <Riostream.h>
 #include <AliLog.h>
 
+using std::ostream;
+using std::istream;
+
 class AliITSRecPoint : public AliCluster {
  public:
   AliITSRecPoint();
@@ -59,6 +62,7 @@ class AliITSRecPoint : public AliCluster {
   void SetType(Int_t type){ fType=type;}
   void SetDeltaProbability(Float_t prob){fDeltaProb = prob;}
   void SetDriftTime(Float_t tim) {fDriftTime=tim;}
+  void SetDriftSide(Int_t sid) {fDriftSide=sid;}
  
   Int_t IsUsed() const {return (fQ<0)?1:0;}
   Float_t GetQ() const {return TMath::Abs(fQ);}
@@ -70,10 +74,21 @@ class AliITSRecPoint : public AliCluster {
   Float_t GetPhiR() const {return fChargeRatio;}
   Int_t GetPindex() const { return 0xFFF00000&fIndex; }  //SSD clusters only
   Int_t GetNindex() const { return 0xFFC00&fIndex; }  //SSD clusters only
-  Int_t GetType() const {return fType;}  // type of the cluster
+  Int_t GetType() const {return fType;}  // type of the cluster (for SPD the number of pixels in the cluster)
   Float_t GetDeltaProbability() const{return fDeltaProb;} //probability to belong to the delta ray
   Float_t GetDriftTime() const{return  fDriftTime;}
+  Int_t GetDriftSide() const {return fDriftSide;}
+  Int_t GetNpixels() const; // for SPD returns fType, i.e. the number of pixels in the cluster (-1 for SDD and SSD)
+  Int_t GetSPDclusterType() const; // for SPD returns cluster type according to conventional numbering (-1 for SDD and SSD)
+  Int_t GetSDDclusterType() const; 
+  Int_t GetSSDclusterType() const; 
+  static void DecodeSDDclusterType(Int_t cluType, Int_t &cluSizAn, Int_t& cluSizTb, Int_t &drSide);
 
+  Int_t GetClusterType() const {
+    if(fLayer<=1) return GetSPDclusterType();
+    if(fLayer==2 || fLayer==3) return GetSDDclusterType();
+    return GetSSDclusterType();
+  }
  protected:
 
   Float_t   fXloc ;        //X of cluster (local coordinates)
@@ -89,8 +104,9 @@ class AliITSRecPoint : public AliCluster {
   Int_t    fType;         //quality factor of the cluster
   Float_t  fDeltaProb;    // probability to be delta electron
   Float_t  fDriftTime;    // drift time in SDD
+  Char_t   fDriftSide;    // drift region in SDD (0=left=positive xlocal, 1=right)
     
-  ClassDef(AliITSRecPoint,6)  // AliITSRecPoint class
+  ClassDef(AliITSRecPoint,7)  // AliITSRecPoint class
 };
 // Input and output function for standard C++ input/output.
 ostream& operator<<(ostream &os,AliITSRecPoint &source);