Some of the coding violations corrected
[u/mrichter/AliRoot.git] / TPC / AliTPCclusterMI.h
CommitLineData
1c53abe2 1#ifndef ALITPCCLUSTERMI_H
2#define ALITPCCLUSTERMI_H
3
4//-------------------------------------------------------
5// TPC Cluster Class
6d171107 6// Parallel tracking
1c53abe2 7// Origin: Marian Ivanov
8//-------------------------------------------------------
9
6d171107 10/* $Id$ */
11
12
1c53abe2 13#include "AliCluster.h"
14#include "TMath.h"
f5b043b1 15#include "AliTPCclusterInfo.h"
1c53abe2 16//_____________________________________________________________________________
17class AliTPCclusterMI : public AliCluster {
18public:
d101caf3 19 AliTPCclusterMI();
03fe1804 20 AliTPCclusterMI(const AliTPCclusterMI & cluster);
21 AliTPCclusterMI &operator = (const AliTPCclusterMI & cluster); //assignment operator
2f32844a 22 AliTPCclusterMI(Int_t *lab, Float_t *hit);
03fe1804 23 virtual ~AliTPCclusterMI();
f5b043b1 24 virtual void Clear(const Option_t*) { delete fInfo; fInfo=0;}
1c53abe2 25 virtual Bool_t IsSortable() const;
26 virtual Int_t Compare(const TObject* obj) const;
7fd61510 27 inline void Use(Int_t inc=10);
508541c7 28 virtual Int_t GetDetector() const {return fDetector;}
29 virtual Int_t GetRow() const {return fRow;}
1ac29fc4 30 virtual void SetDetector(Int_t detector);
508541c7 31 virtual void SetRow(Int_t row){fRow = (UChar_t)(row%256);}
03fe1804 32 virtual void SetTimeBin(Float_t timeBin){ fTimeBin= timeBin;}
33 virtual void SetPad(Float_t pad){ fPad = pad;}
508541c7 34 //
6c024a0e 35 void SetQ(Float_t q) {fQ=(UShort_t)q;}
1c53abe2 36 void SetType(Char_t type) {fType=type;}
6c024a0e 37 void SetMax(UShort_t max) {fMax=max;}
7fd61510 38 Int_t IsUsed(Int_t th=10) const {return (fUsed>=th) ? 1 : 0;}
1c53abe2 39 Float_t GetQ() const {return TMath::Abs(fQ);}
40 Float_t GetMax() const {return fMax;}
41 Char_t GetType()const {return fType;}
03fe1804 42 Float_t GetTimeBin() const { return fTimeBin;}
43 Float_t GetPad() const { return fPad;}
44 AliTPCclusterInfo * GetInfo() const { return fInfo;}
b127a65f 45 void SetInfo(AliTPCclusterInfo * info);
03fe1804 46
1c53abe2 47private:
e32b09f8 48 AliTPCclusterInfo * fInfo; // pointer to the cluster debug info
49 Float_t fTimeBin; //time bin coordinate
50 Float_t fPad; //pad coordinate
1c53abe2 51 Short_t fQ ; //Q of cluster (in ADC counts)
1c53abe2 52 Short_t fMax; //maximal amplitude in cluster
e32b09f8 53 Char_t fType; //type of the cluster 0 means golden
7fd61510 54 Char_t fUsed; //counter of usage
508541c7 55 UChar_t fDetector; //detector number
56 UChar_t fRow; //row number number
76dc9fe0 57 ClassDef(AliTPCclusterMI,5) // Time Projection Chamber clusters
1c53abe2 58};
59
7fd61510 60void AliTPCclusterMI::Use(Int_t inc)
61{
62 if (inc>0) fUsed+=inc;
63 else
64 fUsed=0;
65}
66
1c53abe2 67
68
69#endif
70
71