]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/AliMUONRawCluster.h
cleanup
[u/mrichter/AliRoot.git] / MUON / AliMUONRawCluster.h
1 #ifndef ALIMUONRAWCLUSTER_H
2 #define ALIMUONRAWCLUSTER_H
3
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5  * See cxx source for full Copyright notice                               */
6
7 /* $Id$ */
8 // Revision of includes 07/05/2004
9
10 // Class for the MUON RecPoint
11 // It contains the propeorties of the physics cluters found in the tracking chambers
12 // RawCluster contains also the information from the both cathode of the chambers.
13
14
15 #include <TObject.h>
16 #include <TMath.h> // because of inline funtion GetRadius
17 #include <TArrayF.h>
18
19 class AliMUONRawCluster : public TObject {
20
21 public:
22    AliMUONRawCluster();
23    virtual ~AliMUONRawCluster() { }
24    Float_t      GetRadius(Int_t i) {return TMath::Sqrt(fX[i]*fX[i]+fY[i]*fY[i]);}
25    Bool_t       IsSortable() const {return kTRUE;}
26    Int_t        Compare(const TObject *obj) const;
27    Int_t        PhysicsContribution() const;
28    static Int_t BinarySearch(Float_t r, TArrayF ccord, Int_t from, Int_t upto);
29    static void  SortMin(Int_t *idx,Float_t *xdarray, Float_t *xarray, Float_t *yarray, Float_t *qarray,Int_t ntr);
30    void         DumpIndex();
31
32    Int_t        AddCharge(Int_t i, Int_t Q);
33    Int_t        AddX(Int_t i, Float_t X);
34    Int_t        AddY(Int_t i, Float_t Y);
35    Int_t        AddZ(Int_t i, Float_t Z);
36
37    Int_t        GetCharge(Int_t i) const;
38    Float_t      GetX(Int_t i) const;
39    Float_t      GetY(Int_t i) const;
40    Float_t      GetZ(Int_t i) const;
41    Int_t        GetTrack(Int_t i) const;
42    Int_t        GetPeakSignal(Int_t i) const;
43    Int_t        GetMultiplicity(Int_t i) const;
44    Int_t        GetClusterType() const;
45    Int_t        GetGhost() const;
46    Int_t        GetNcluster(Int_t i) const;
47    Float_t      GetChi2(Int_t i) const;
48    Int_t        GetIndex(Int_t i, Int_t j) const;
49    Int_t        GetOffset(Int_t i, Int_t j) const;
50    Float_t      GetContrib(Int_t i, Int_t j) const;
51    Int_t        GetPhysics(Int_t i) const;
52
53    Int_t        SetCharge(Int_t i,Int_t Q);
54    Int_t        SetX(Int_t i, Float_t X);
55    Int_t        SetY(Int_t i, Float_t Y);
56    Int_t        SetZ(Int_t i, Float_t Z);
57    Int_t        SetTrack(Int_t i, Int_t track);
58    Int_t        SetPeakSignal(Int_t i, Int_t peaksignal);
59    Int_t        SetMultiplicity(Int_t i, Int_t mul);
60    Int_t        SetClusterType(Int_t type);
61    Int_t        SetGhost(Int_t ghost);
62    Int_t        SetNcluster(Int_t i, Int_t ncluster);
63    Int_t        SetChi2(Int_t i, Float_t chi2);
64    void         SetIndex(Int_t i, Int_t j, Int_t index);
65    void         SetOffset(Int_t i, Int_t j, Int_t offset);
66    void         SetContrib(Int_t i, Int_t j, Float_t contrib);
67    void         SetPhysics(Int_t i, Int_t physics);
68
69 private:
70    Int_t       fIndexMap[50][2];  // indeces of digits
71    Int_t       fOffsetMap[50][2]; // Emmanuel special
72    Float_t     fContMap[50][2];   // Contribution from digit
73    Int_t       fPhysicsMap[50];   // Distinguish signal and background contr.
74   
75    Int_t       fQ[2]  ;           // Q of cluster (in ADC counts)     
76    Float_t     fX[2]  ;           // X of cluster
77    Float_t     fY[2]  ;           // Y of cluster
78    Float_t     fZ[2]  ;           // Z of cluster
79    Int_t       fTracks[3];        //labels of overlapped tracks
80    Int_t       fPeakSignal[2];    // Peak signal 
81    Int_t       fMultiplicity[2];  // Cluster multiplicity
82    Int_t       fClusterType;      // Cluster type
83    Int_t       fGhost;            // 0 if not a ghost or ghost problem solved
84                                   // >0 if ghost problem remains because
85                                   // 1 both (true and ghost) satify 
86                                   //   charge chi2 compatibility
87                                   // 2 none give satisfactory chi2
88    Int_t       fNcluster[2];      // Number of clusters
89    Float_t     fChi2[2];          // Chi**2 of fit
90
91    ClassDef(AliMUONRawCluster,1)  //Cluster class for MUON
92 };
93
94 // inline functions
95
96 inline  Int_t  AliMUONRawCluster::GetIndex(Int_t i, Int_t j) const
97 { return fIndexMap[i][j]; }
98
99 inline  Int_t  AliMUONRawCluster::GetOffset(Int_t i, Int_t j) const
100 { return fOffsetMap[i][j]; }
101
102 inline  Float_t  AliMUONRawCluster::GetContrib(Int_t i, Int_t j) const
103 { return fContMap[i][j]; }
104
105 inline  Int_t  AliMUONRawCluster::GetPhysics(Int_t i) const
106 { return fPhysicsMap[i]; }
107
108 inline  void  AliMUONRawCluster::SetIndex(Int_t i, Int_t j, Int_t index)
109 { fIndexMap[i][j] = index; }
110
111 inline  void  AliMUONRawCluster::SetOffset(Int_t i, Int_t j, Int_t offset)
112 { fOffsetMap[i][j] = offset; }
113
114 inline  void  AliMUONRawCluster::SetContrib(Int_t i, Int_t j, Float_t contrib)
115 { fContMap[i][j] = contrib; }
116
117 inline  void  AliMUONRawCluster::SetPhysics(Int_t i, Int_t physics)
118 { fPhysicsMap[i] = physics; }
119
120 #endif
121
122
123
124
125
126