]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TPC/AliTPCclusterMI.h
fUSed added
[u/mrichter/AliRoot.git] / TPC / AliTPCclusterMI.h
index f3b531182d70a461f3b43d99a2b1c9ce04dfcd42..6c01d55626f20511b060a762a6c47e4b664ae69e 100644 (file)
 //_____________________________________________________________________________
 class AliTPCclusterMI : public AliCluster {
 public:
-  AliTPCclusterMI():AliCluster(){fQ=0;}
+  AliTPCclusterMI():AliCluster(){fQ=0; fUsed=0;}
   AliTPCclusterMI(Int_t *lab, Float_t *hit) : AliCluster(lab,hit) {fQ = (Short_t)hit[4];}
   virtual Bool_t IsSortable() const; 
   virtual Int_t Compare(const TObject* obj) const;
-  void Use() {fQ=-fQ;}
+  inline  void Use(Int_t inc=10);
   void SetQ(Float_t q) {fQ=(Short_t)q;}
   void SetType(Char_t type) {fType=type;}
   void SetMax(Short_t max) {fMax=max;}
-  Int_t IsUsed() const {return (fQ<0) ? 1 : 0;}
-
+  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:
   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
-
 ClassDef(AliTPCclusterMI,1)  // Time Projection Chamber clusters
+  Char_t    fUsed;     //counter of usage  
+ ClassDef(AliTPCclusterMI,1)  // Time Projection Chamber clusters
 };
 
+void AliTPCclusterMI::Use(Int_t inc) 
+{ 
+  if (inc>0)  fUsed+=inc; 
+  else 
+    fUsed=0;
+}
+
 class AliTPCclusterLMI  {
  private:
   Short_t  fCZ;       // current cluster position Z in cm - 100 mum precision