ROOT logo
#ifndef ALITPCCLUSTERMI_H
#define ALITPCCLUSTERMI_H

//-------------------------------------------------------
//                    TPC Cluster Class
//   Parallel tracking
//   Origin: Marian Ivanov
//-------------------------------------------------------

/* $Id$ */


#include "AliCluster.h"
#include "TMath.h"
#include "AliTPCclusterInfo.h"
#include <AliTrackPointArray.h>

//_____________________________________________________________________________
class AliTPCclusterMI : public AliCluster {
  enum Status{ kDisabled = 0x7F};
public:
  AliTPCclusterMI();
  AliTPCclusterMI(const AliTPCclusterMI & cluster);
  AliTPCclusterMI &operator = (const AliTPCclusterMI & cluster); //assignment operator
  AliTPCclusterMI(Int_t *lab, Float_t *hit);
  virtual ~AliTPCclusterMI();
  virtual void	Clear(const Option_t*) { delete fInfo; fInfo=0;}
  virtual Bool_t IsSortable() const; 
  virtual Int_t Compare(const TObject* obj) const;
  inline  void Use(Int_t inc=10);
  inline  void Disable(){fUsed=kDisabled;}
  inline  Bool_t IsDisabled() const {return (fUsed==kDisabled);}

  virtual Int_t GetDetector() const {return fDetector;}
  virtual Int_t GetRow() const {return fRow;}
  virtual void SetDetector(Int_t detector);
  virtual void SetRow(Int_t row){fRow = (UChar_t)(row%256);}  
  virtual void SetTimeBin(Float_t timeBin){ fTimeBin= timeBin;}
  virtual void SetPad(Float_t pad){ fPad = pad;}
  //
  void SetQ(Float_t q) {fQ=(UShort_t)q;}
  void SetType(Char_t type) {fType=type;}
  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;}
  Float_t GetTimeBin() const { return fTimeBin;}
  Float_t GetPad() const { return fPad;}
  AliTPCclusterInfo * GetInfo() const { return fInfo;}
  void SetInfo(AliTPCclusterInfo * info);
  //
  AliTPCclusterMI*  MakeCluster(AliTrackPoint* point);
  AliTrackPoint*    MakePoint();
  static void     SetGlobalTrackPoint(const AliCluster &cl, AliTrackPoint &point);
  
private:
  AliTPCclusterInfo * fInfo;  // pointer to the cluster debug info
  Float_t   fTimeBin;  //time bin coordinate
  Float_t   fPad;  //pad coordinate
  Short_t   fQ ;       //Q of cluster (in ADC counts)  
  Short_t   fMax;      //maximal amplitude in cluster
  Char_t    fType;     //type of the cluster 0 means golden 
  Char_t    fUsed;     //counter of usage  
  UChar_t   fDetector; //detector  number
  UChar_t   fRow;      //row number number
  ClassDef(AliTPCclusterMI,5)  // Time Projection Chamber clusters
};

void AliTPCclusterMI::Use(Int_t inc) 
{ 
  if (inc>0)  fUsed+=inc; 
  else 
    fUsed=0;
}



#endif


 AliTPCclusterMI.h:1
 AliTPCclusterMI.h:2
 AliTPCclusterMI.h:3
 AliTPCclusterMI.h:4
 AliTPCclusterMI.h:5
 AliTPCclusterMI.h:6
 AliTPCclusterMI.h:7
 AliTPCclusterMI.h:8
 AliTPCclusterMI.h:9
 AliTPCclusterMI.h:10
 AliTPCclusterMI.h:11
 AliTPCclusterMI.h:12
 AliTPCclusterMI.h:13
 AliTPCclusterMI.h:14
 AliTPCclusterMI.h:15
 AliTPCclusterMI.h:16
 AliTPCclusterMI.h:17
 AliTPCclusterMI.h:18
 AliTPCclusterMI.h:19
 AliTPCclusterMI.h:20
 AliTPCclusterMI.h:21
 AliTPCclusterMI.h:22
 AliTPCclusterMI.h:23
 AliTPCclusterMI.h:24
 AliTPCclusterMI.h:25
 AliTPCclusterMI.h:26
 AliTPCclusterMI.h:27
 AliTPCclusterMI.h:28
 AliTPCclusterMI.h:29
 AliTPCclusterMI.h:30
 AliTPCclusterMI.h:31
 AliTPCclusterMI.h:32
 AliTPCclusterMI.h:33
 AliTPCclusterMI.h:34
 AliTPCclusterMI.h:35
 AliTPCclusterMI.h:36
 AliTPCclusterMI.h:37
 AliTPCclusterMI.h:38
 AliTPCclusterMI.h:39
 AliTPCclusterMI.h:40
 AliTPCclusterMI.h:41
 AliTPCclusterMI.h:42
 AliTPCclusterMI.h:43
 AliTPCclusterMI.h:44
 AliTPCclusterMI.h:45
 AliTPCclusterMI.h:46
 AliTPCclusterMI.h:47
 AliTPCclusterMI.h:48
 AliTPCclusterMI.h:49
 AliTPCclusterMI.h:50
 AliTPCclusterMI.h:51
 AliTPCclusterMI.h:52
 AliTPCclusterMI.h:53
 AliTPCclusterMI.h:54
 AliTPCclusterMI.h:55
 AliTPCclusterMI.h:56
 AliTPCclusterMI.h:57
 AliTPCclusterMI.h:58
 AliTPCclusterMI.h:59
 AliTPCclusterMI.h:60
 AliTPCclusterMI.h:61
 AliTPCclusterMI.h:62
 AliTPCclusterMI.h:63
 AliTPCclusterMI.h:64
 AliTPCclusterMI.h:65
 AliTPCclusterMI.h:66
 AliTPCclusterMI.h:67
 AliTPCclusterMI.h:68
 AliTPCclusterMI.h:69
 AliTPCclusterMI.h:70
 AliTPCclusterMI.h:71
 AliTPCclusterMI.h:72
 AliTPCclusterMI.h:73
 AliTPCclusterMI.h:74
 AliTPCclusterMI.h:75
 AliTPCclusterMI.h:76
 AliTPCclusterMI.h:77
 AliTPCclusterMI.h:78
 AliTPCclusterMI.h:79
 AliTPCclusterMI.h:80
 AliTPCclusterMI.h:81