]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TPC/AliTPCclusterMI.h
GetClusterFast function implemented (No getter before) (Marian)
[u/mrichter/AliRoot.git] / TPC / AliTPCclusterMI.h
index 6c01d55626f20511b060a762a6c47e4b664ae69e..b952fd6c6bd7e2dffce9db77f8f5e0cadf02a368 100644 (file)
@@ -3,35 +3,49 @@
 
 //-------------------------------------------------------
 //                    TPC Cluster Class
-//
+//   Parallel tracking
 //   Origin: Marian Ivanov
 //-------------------------------------------------------
 
+/* $Id$ */
+
+
 #include "AliCluster.h"
 #include "TMath.h"
 
 //_____________________________________________________________________________
 class AliTPCclusterMI : public AliCluster {
 public:
-  AliTPCclusterMI():AliCluster(){fQ=0; fUsed=0;}
-  AliTPCclusterMI(Int_t *lab, Float_t *hit) : AliCluster(lab,hit) {fQ = (Short_t)hit[4];}
+  AliTPCclusterMI():AliCluster(){fX =0; fQ=0; fUsed=0; fDetector = 0; fRow =0;}
+  AliTPCclusterMI(Int_t *lab, Float_t *hit) : AliCluster(lab,hit) {fQ = (UShort_t)hit[4];}
+  virtual ~AliTPCclusterMI() {}
   virtual Bool_t IsSortable() const; 
   virtual Int_t Compare(const TObject* obj) const;
   inline  void Use(Int_t inc=10);
-  void SetQ(Float_t q) {fQ=(Short_t)q;}
+  virtual Float_t GetX() const { return fX;}
+  virtual void  SetX(Float_t x) { fX = x;}
+  virtual Int_t GetDetector() const {return fDetector;}
+  virtual Int_t GetRow() const {return fRow;}
+  virtual void SetDetector(Int_t detector){fDetector = (UChar_t)(detector%256);}
+  virtual void SetRow(Int_t row){fRow = (UChar_t)(row%256);}  
+  //
+  void SetQ(Float_t q) {fQ=(UShort_t)q;}
   void SetType(Char_t type) {fType=type;}
-  void SetMax(Short_t max) {fMax=max;}
+  void SetMax(UShort_t max) {fMax=max;}
   Int_t IsUsed(Int_t th=10) const {return (fUsed>=th) ? 1 : 0;}
   Float_t GetQ() const {return TMath::Abs(fQ);}
   Float_t GetMax() const {return fMax;} 
   Char_t  GetType()const {return fType;}
  
 private:
+  Float_t   fX;        //X position of cluster
   Short_t   fQ ;       //Q of cluster (in ADC counts)  
   Char_t    fType;     //type of the cluster 0 means golden 
   Short_t   fMax;      //maximal amplitude in cluster
   Char_t    fUsed;     //counter of usage  
- ClassDef(AliTPCclusterMI,1)  // Time Projection Chamber clusters
+  UChar_t   fDetector; //detector  number
+  UChar_t   fRow;      //row number number
+  ClassDef(AliTPCclusterMI,2)  // Time Projection Chamber clusters
 };
 
 void AliTPCclusterMI::Use(Int_t inc) 
@@ -42,7 +56,29 @@ void AliTPCclusterMI::Use(Int_t inc)
 }
 
 class AliTPCclusterLMI  {
- private:
+
+public:
+  AliTPCclusterLMI(){fCZ=fCY=fSigmaZ=fSigmaY=fQ=fMax=fCType=0;}
+  virtual ~AliTPCclusterLMI(){}
+  Float_t  GetZ()            const {return (fCZ*0.01);}
+  Float_t  GetY()            const {return (fCY*0.01);}
+  Float_t  GetSigmaZ()       const {return (fSigmaZ*0.02);}
+  Float_t  GetSigmaY()       const {return (fSigmaY*0.02);}  
+  Int_t  GetType()           const {return fCType;}
+  Int_t  GetMax()            const {return fMax;}
+  Float_t  GetQ()            const {return fQ;}
+  Int_t    GelLabel(Int_t i) const {return fLabel[i];}
+  //
+  void     SetY(Float_t y){ fCY = (UShort_t)(TMath::Nint(y*100.));} 
+  void     SetZ(Float_t z){ fCZ = (UShort_t)(TMath::Nint(z*100.));} 
+  void     SetSigmaZ(Float_t sigmaz) {fSigmaZ = (UChar_t)(TMath::Nint(sigmaz*50.));}
+  void     SetSigmaY(Float_t sigmay) {fSigmaY = (UChar_t)(TMath::Nint(sigmay*50.));}
+  void     SetQ(Float_t q) {fQ = (UShort_t)q;}
+  void     SetMax(Float_t max) {fMax = (UShort_t)max;}
+  void     SetType(Char_t type) {fCType = type;}
+  void     SetLabels(Int_t labels[3]){fLabel[0] = labels[0];fLabel[1] = labels[1];fLabel[2] = labels[2];}
+
+private:
   Short_t  fCZ;       // current cluster position Z in cm - 100 mum precision
   Short_t  fCY;       // current cluster position Y in cm - 100 mum precision
   UChar_t  fSigmaZ;   // shape  Z - normalised shape - normaliziation 1 - precision 2 percent
@@ -51,27 +87,6 @@ class AliTPCclusterLMI  {
   UShort_t fMax;      // charge at maximum  
   Char_t   fCType;    // type of the cluster
   Int_t    fLabel[3];    // track indexes 
- public:
-  AliTPCclusterLMI(){fCZ=fCY=fSigmaZ=fSigmaY=fQ=fMax=fCType=0;}
-  inline Float_t  GetZ()    {return (fCZ*0.01);}
-  inline Float_t  GetY()    {return (fCY*0.01);}
-  inline Float_t  GetSigmaZ() {return (fSigmaZ*0.02);}
-  inline Float_t  GetSigmaY() {return (fSigmaY*0.02);}  
-  inline Int_t  GetType()   {return fCType;}
-  inline Int_t  GetMax()   {return fMax;}
-  inline Float_t  GetQ()   {return fQ;}
-  inline Int_t    GelLabel(Int_t i){return fLabel[i];}
-  //
-  void     SetY(Float_t y){ fCY = Short_t(TMath::Nint(y*100.));} 
-  void     SetZ(Float_t z){ fCZ = Short_t(TMath::Nint(z*100.));} 
-  void     SetSigmaZ(Float_t sigmaz) {fSigmaZ = UChar_t(TMath::Nint(sigmaz*50.));}
-  void     SetSigmaY(Float_t sigmay) {fSigmaY = UChar_t(TMath::Nint(sigmay*50.));}
-  void     SetQ(Float_t q) {fQ = UShort_t(q);}
-  void     SetMax(Float_t max) {fMax = UShort_t(max);}
-  void     SetType(Char_t type) {fCType = type;}
-  void     SetLabels(Int_t labels[3]){fLabel[0] = labels[0];fLabel[1] = labels[1];fLabel[2] = labels[2];}
-  //
- public:
   ClassDef(AliTPCclusterLMI,1)  
 };