]>
Commit | Line | Data |
---|---|---|
a9e2aefa | 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$ */ | |
30178c30 | 8 | // Revision of includes 07/05/2004 |
a9e2aefa | 9 | |
692de412 | 10 | /// \ingroup base |
11 | /// \class AliMUONRawCluster | |
12 | /// \brief MUON raw cluster | |
13 | /// | |
14 | /// Class for the MUON RecPoint | |
585d648a | 15 | /// It contains the properties of the physics cluters found in the tracking chambers |
692de412 | 16 | /// RawCluster contains also the information from the both cathode of the chambers. |
3afdba21 | 17 | |
18 | ||
a9e2aefa | 19 | #include <TObject.h> |
ecfa008b | 20 | #include <TMath.h> // because of inline funtion GetRadius |
f480df09 | 21 | #include <TArrayF.h> |
a9e2aefa | 22 | class AliMUONRawCluster : public TObject { |
3afdba21 | 23 | |
a9e2aefa | 24 | public: |
3afdba21 | 25 | AliMUONRawCluster(); |
26 | virtual ~AliMUONRawCluster() { } | |
27 | Float_t GetRadius(Int_t i) {return TMath::Sqrt(fX[i]*fX[i]+fY[i]*fY[i]);} | |
28 | Bool_t IsSortable() const {return kTRUE;} | |
29 | Int_t Compare(const TObject *obj) const; | |
30 | Int_t PhysicsContribution() const; | |
6464217e | 31 | virtual void Print(Option_t* opt="") const; |
3afdba21 | 32 | static Int_t BinarySearch(Float_t r, TArrayF ccord, Int_t from, Int_t upto); |
33 | static void SortMin(Int_t *idx,Float_t *xdarray, Float_t *xarray, Float_t *yarray, Float_t *qarray,Int_t ntr); | |
34 | void DumpIndex(); | |
a9e2aefa | 35 | |
a31c3507 | 36 | Int_t AddCharge(Int_t i, Float_t Q); |
3afdba21 | 37 | Int_t AddX(Int_t i, Float_t X); |
38 | Int_t AddY(Int_t i, Float_t Y); | |
39 | Int_t AddZ(Int_t i, Float_t Z); | |
40 | ||
a31c3507 | 41 | Float_t GetCharge(Int_t i=0) const; |
6464217e | 42 | Float_t GetX(Int_t i=0) const; |
43 | Float_t GetY(Int_t i=0) const; | |
44 | Float_t GetZ(Int_t i=0) const; | |
45 | Int_t GetTrack(Int_t i=0) const; | |
a31c3507 | 46 | Float_t GetPeakSignal(Int_t i=0) const; |
6464217e | 47 | Int_t GetMultiplicity(Int_t i=0) const; |
9e993f2a | 48 | Int_t GetClusterType() const; |
3b5272e3 | 49 | Int_t GetGhost() const; |
6464217e | 50 | Int_t GetNcluster(Int_t i=0) const; |
51 | Float_t GetChi2(Int_t i=0) const; | |
0164904a | 52 | Int_t GetIndex(Int_t i, Int_t j) const; |
53 | Int_t GetOffset(Int_t i, Int_t j) const; | |
54 | Float_t GetContrib(Int_t i, Int_t j) const; | |
55 | Int_t GetPhysics(Int_t i) const; | |
6570c14d | 56 | Int_t GetDetElemId() const ; |
87e6e2dd | 57 | Float_t GetError(Int_t iXY) const; |
58 | Float_t GetErrX() const; | |
59 | Float_t GetErrY() const; | |
3afdba21 | 60 | |
a31c3507 | 61 | Int_t SetCharge(Int_t i, Float_t Q); |
3afdba21 | 62 | Int_t SetX(Int_t i, Float_t X); |
63 | Int_t SetY(Int_t i, Float_t Y); | |
64 | Int_t SetZ(Int_t i, Float_t Z); | |
6570c14d | 65 | void SetDetElemId(Int_t Id); |
9e993f2a | 66 | Int_t SetTrack(Int_t i, Int_t track); |
a31c3507 | 67 | Int_t SetPeakSignal(Int_t i, Float_t peaksignal); |
9e993f2a | 68 | Int_t SetMultiplicity(Int_t i, Int_t mul); |
69 | Int_t SetClusterType(Int_t type); | |
3b5272e3 | 70 | Int_t SetGhost(Int_t ghost); |
71 | Int_t SetNcluster(Int_t i, Int_t ncluster); | |
72 | Int_t SetChi2(Int_t i, Float_t chi2); | |
0164904a | 73 | void SetIndex(Int_t i, Int_t j, Int_t index); |
74 | void SetOffset(Int_t i, Int_t j, Int_t offset); | |
75 | void SetContrib(Int_t i, Int_t j, Float_t contrib); | |
76 | void SetPhysics(Int_t i, Int_t physics); | |
87e6e2dd | 77 | void SetError(Int_t iXY, Float_t err); |
78 | void SetErrX(Float_t err); | |
79 | void SetErrY(Float_t err); | |
3afdba21 | 80 | |
0164904a | 81 | private: |
18b6b8c7 | 82 | Int_t fIndexMap[50][2]; ///< Indices of digits |
83 | Int_t fOffsetMap[50][2]; ///< Emmanuel special | |
84 | Float_t fContMap[50][2]; ///< Contribution from digit | |
a31c3507 | 85 | Int_t fPhysicsMap[50]; ///< Distinguish signal and background contr. |
3b5272e3 | 86 | |
a31c3507 | 87 | Float_t fQ[2] ; ///< Q of cluster (in ADC counts) |
18b6b8c7 | 88 | Float_t fX[2] ; ///< X of cluster |
89 | Float_t fY[2] ; ///< Y of cluster | |
90 | Float_t fZ[2] ; ///< Z of cluster | |
91 | Int_t fTracks[3]; ///< Labels of overlapped tracks | |
a31c3507 | 92 | Float_t fPeakSignal[2]; ///< Peak signal |
18b6b8c7 | 93 | Int_t fMultiplicity[2]; ///< Cluster multiplicity |
94 | Int_t fClusterType; ///< Cluster type | |
95 | Int_t fGhost; ///< Ghost info | |
96 | // 0 if not a ghost or ghost problem solved | |
3b5272e3 | 97 | // >0 if ghost problem remains because |
98 | // 1 both (true and ghost) satify | |
99 | // charge chi2 compatibility | |
100 | // 2 none give satisfactory chi2 | |
18b6b8c7 | 101 | Int_t fNcluster[2]; ///< Number of clusters |
102 | Float_t fChi2[2]; ///< Chi**2 of fit | |
103 | Int_t fDetElemId; ///< ID number of the detection element (slat) on which the cluster is found. | |
104 | Float_t fErrXY[2]; ///< coordinate errors | |
a31c3507 | 105 | ClassDef(AliMUONRawCluster,2) //Cluster class for MUON |
a9e2aefa | 106 | }; |
0164904a | 107 | |
108 | // inline functions | |
109 | ||
110 | inline Int_t AliMUONRawCluster::GetIndex(Int_t i, Int_t j) const | |
111 | { return fIndexMap[i][j]; } | |
112 | ||
113 | inline Int_t AliMUONRawCluster::GetOffset(Int_t i, Int_t j) const | |
114 | { return fOffsetMap[i][j]; } | |
115 | ||
116 | inline Float_t AliMUONRawCluster::GetContrib(Int_t i, Int_t j) const | |
117 | { return fContMap[i][j]; } | |
118 | ||
119 | inline Int_t AliMUONRawCluster::GetPhysics(Int_t i) const | |
120 | { return fPhysicsMap[i]; } | |
121 | ||
122 | inline void AliMUONRawCluster::SetIndex(Int_t i, Int_t j, Int_t index) | |
123 | { fIndexMap[i][j] = index; } | |
124 | ||
125 | inline void AliMUONRawCluster::SetOffset(Int_t i, Int_t j, Int_t offset) | |
126 | { fOffsetMap[i][j] = offset; } | |
127 | ||
128 | inline void AliMUONRawCluster::SetContrib(Int_t i, Int_t j, Float_t contrib) | |
129 | { fContMap[i][j] = contrib; } | |
130 | ||
131 | inline void AliMUONRawCluster::SetPhysics(Int_t i, Int_t physics) | |
132 | { fPhysicsMap[i] = physics; } | |
133 | ||
6570c14d | 134 | inline void AliMUONRawCluster::SetDetElemId(Int_t Id) |
135 | { fDetElemId = Id; } | |
b137f8b9 | 136 | |
6570c14d | 137 | inline Int_t AliMUONRawCluster::GetDetElemId() const |
138 | { return fDetElemId;} | |
87e6e2dd | 139 | |
140 | inline void AliMUONRawCluster::SetError(Int_t iXY, Float_t err) | |
141 | { fErrXY[iXY] = err; } | |
142 | ||
143 | inline void AliMUONRawCluster::SetErrX(Float_t err) | |
144 | { SetError(0, err); } | |
145 | ||
146 | inline void AliMUONRawCluster::SetErrY(Float_t err) | |
147 | { SetError(1, err); } | |
148 | ||
149 | inline Float_t AliMUONRawCluster::GetError(Int_t iXY) const | |
150 | { return fErrXY[iXY]; } | |
151 | ||
152 | inline Float_t AliMUONRawCluster::GetErrX() const | |
153 | { return GetError(0); } | |
154 | ||
155 | inline Float_t AliMUONRawCluster::GetErrY() const | |
156 | { return GetError(1); } | |
157 | ||
a9e2aefa | 158 | #endif |
159 | ||
160 | ||
161 | ||
162 | ||
163 | ||
164 |