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