]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TPC/AliTPCclusterMI.h
Updated a bit with:
[u/mrichter/AliRoot.git] / TPC / AliTPCclusterMI.h
CommitLineData
1c53abe2 1#ifndef ALITPCCLUSTERMI_H
2#define ALITPCCLUSTERMI_H
3
4//-------------------------------------------------------
5// TPC Cluster Class
6//
7// Origin: Marian Ivanov
8//-------------------------------------------------------
9
10#include "AliCluster.h"
11#include "TMath.h"
12
13//_____________________________________________________________________________
14class AliTPCclusterMI : public AliCluster {
15public:
16 AliTPCclusterMI():AliCluster(){fQ=0;}
17 AliTPCclusterMI(Int_t *lab, Float_t *hit) : AliCluster(lab,hit) {fQ = (Short_t)hit[4];}
18 virtual Bool_t IsSortable() const;
19 virtual Int_t Compare(const TObject* obj) const;
20 void Use() {fQ=-fQ;}
21 void SetQ(Float_t q) {fQ=(Short_t)q;}
22 void SetType(Char_t type) {fType=type;}
23 void SetMax(Short_t max) {fMax=max;}
24 Int_t IsUsed() const {return (fQ<0) ? 1 : 0;}
25
26 Float_t GetQ() const {return TMath::Abs(fQ);}
27 Float_t GetMax() const {return fMax;}
28 Char_t GetType()const {return fType;}
29private:
30 Short_t fQ ; //Q of cluster (in ADC counts)
31 Char_t fType; //type of the cluster 0 means golden
32 Short_t fMax; //maximal amplitude in cluster
33
34 ClassDef(AliTPCclusterMI,1) // Time Projection Chamber clusters
35};
36
37class AliTPCclusterLMI {
38 private:
39 Short_t fCZ; // current cluster position Z in cm - 100 mum precision
40 Short_t fCY; // current cluster position Y in cm - 100 mum precision
41 UChar_t fSigmaZ; // shape Z - normalised shape - normaliziation 1 - precision 2 percent
42 UChar_t fSigmaY; // shape Y - normalised shape - normaliziation 1 - precision 2 percent
43 UShort_t fQ; // total charge in cluster
44 UShort_t fMax; // charge at maximum
45 Char_t fCType; // type of the cluster
46 Int_t fLabel[3]; // track indexes
47 public:
48 AliTPCclusterLMI(){fCZ=fCY=fSigmaZ=fSigmaY=fQ=fMax=fCType=0;}
49 inline Float_t GetZ() {return (fCZ*0.01);}
50 inline Float_t GetY() {return (fCY*0.01);}
51 inline Float_t GetSigmaZ() {return (fSigmaZ*0.02);}
52 inline Float_t GetSigmaY() {return (fSigmaY*0.02);}
53 inline Int_t GetType() {return fCType;}
54 inline Int_t GetMax() {return fMax;}
55 inline Float_t GetQ() {return fQ;}
56 inline Int_t GelLabel(Int_t i){return fLabel[i];}
57 //
58 void SetY(Float_t y){ fCY = Short_t(TMath::Nint(y*100.));}
59 void SetZ(Float_t z){ fCZ = Short_t(TMath::Nint(z*100.));}
60 void SetSigmaZ(Float_t sigmaz) {fSigmaZ = UChar_t(TMath::Nint(sigmaz*50.));}
61 void SetSigmaY(Float_t sigmay) {fSigmaY = UChar_t(TMath::Nint(sigmay*50.));}
62 void SetQ(Float_t q) {fQ = UShort_t(q);}
63 void SetMax(Float_t max) {fMax = UShort_t(max);}
64 void SetType(Char_t type) {fCType = type;}
65 void SetLabels(Int_t labels[3]){fLabel[0] = labels[0];fLabel[1] = labels[1];fLabel[2] = labels[2];}
66 //
67 public:
68 ClassDef(AliTPCclusterLMI,1)
69};
70
71
72
73#endif
74
75