]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/AliMUONRawCluster.h
Using common container, as argument, for all classes (Christian)
[u/mrichter/AliRoot.git] / MUON / AliMUONRawCluster.h
CommitLineData
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
15/// It contains the propeorties of the physics cluters found in the tracking chambers
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 22class AliMUONRawCluster : public TObject {
3afdba21 23
a9e2aefa 24public:
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;
31 static Int_t BinarySearch(Float_t r, TArrayF ccord, Int_t from, Int_t upto);
32 static void SortMin(Int_t *idx,Float_t *xdarray, Float_t *xarray, Float_t *yarray, Float_t *qarray,Int_t ntr);
33 void DumpIndex();
a9e2aefa 34
3afdba21 35 Int_t AddCharge(Int_t i, Int_t Q);
36 Int_t AddX(Int_t i, Float_t X);
37 Int_t AddY(Int_t i, Float_t Y);
38 Int_t AddZ(Int_t i, Float_t Z);
39
40 Int_t GetCharge(Int_t i) const;
41 Float_t GetX(Int_t i) const;
42 Float_t GetY(Int_t i) const;
43 Float_t GetZ(Int_t i) const;
9e993f2a 44 Int_t GetTrack(Int_t i) const;
45 Int_t GetPeakSignal(Int_t i) const;
46 Int_t GetMultiplicity(Int_t i) const;
47 Int_t GetClusterType() const;
3b5272e3 48 Int_t GetGhost() const;
49 Int_t GetNcluster(Int_t i) const;
50 Float_t GetChi2(Int_t i) const;
0164904a 51 Int_t GetIndex(Int_t i, Int_t j) const;
52 Int_t GetOffset(Int_t i, Int_t j) const;
53 Float_t GetContrib(Int_t i, Int_t j) const;
54 Int_t GetPhysics(Int_t i) const;
6570c14d 55 Int_t GetDetElemId() const ;
87e6e2dd 56 Float_t GetError(Int_t iXY) const;
57 Float_t GetErrX() const;
58 Float_t GetErrY() const;
3afdba21 59
60 Int_t SetCharge(Int_t i,Int_t Q);
61 Int_t SetX(Int_t i, Float_t X);
62 Int_t SetY(Int_t i, Float_t Y);
63 Int_t SetZ(Int_t i, Float_t Z);
6570c14d 64 void SetDetElemId(Int_t Id);
9e993f2a 65 Int_t SetTrack(Int_t i, Int_t track);
66 Int_t SetPeakSignal(Int_t i, Int_t peaksignal);
67 Int_t SetMultiplicity(Int_t i, Int_t mul);
68 Int_t SetClusterType(Int_t type);
3b5272e3 69 Int_t SetGhost(Int_t ghost);
70 Int_t SetNcluster(Int_t i, Int_t ncluster);
71 Int_t SetChi2(Int_t i, Float_t chi2);
0164904a 72 void SetIndex(Int_t i, Int_t j, Int_t index);
73 void SetOffset(Int_t i, Int_t j, Int_t offset);
74 void SetContrib(Int_t i, Int_t j, Float_t contrib);
75 void SetPhysics(Int_t i, Int_t physics);
87e6e2dd 76 void SetError(Int_t iXY, Float_t err);
77 void SetErrX(Float_t err);
78 void SetErrY(Float_t err);
3afdba21 79
0164904a 80private:
a9e2aefa 81 Int_t fIndexMap[50][2]; // indeces of digits
82 Int_t fOffsetMap[50][2]; // Emmanuel special
83 Float_t fContMap[50][2]; // Contribution from digit
84 Int_t fPhysicsMap[50]; // Distinguish signal and background contr.
3b5272e3 85
9e993f2a 86 Int_t fQ[2] ; // Q of cluster (in ADC counts)
87 Float_t fX[2] ; // X of cluster
88 Float_t fY[2] ; // Y of cluster
89 Float_t fZ[2] ; // Z of cluster
90 Int_t fTracks[3]; //labels of overlapped tracks
91 Int_t fPeakSignal[2]; // Peak signal
92 Int_t fMultiplicity[2]; // Cluster multiplicity
93 Int_t fClusterType; // Cluster type
3b5272e3 94 Int_t fGhost; // 0 if not a ghost or ghost problem solved
95 // >0 if ghost problem remains because
96 // 1 both (true and ghost) satify
97 // charge chi2 compatibility
98 // 2 none give satisfactory chi2
99 Int_t fNcluster[2]; // Number of clusters
100 Float_t fChi2[2]; // Chi**2 of fit
6570c14d 101 Int_t fDetElemId; // ID number of the detection element (slat) on which the cluster is found.
87e6e2dd 102 Float_t fErrXY[2]; // coordinate errors
a1001283 103 ClassDef(AliMUONRawCluster,1) //Cluster class for MUON
a9e2aefa 104};
0164904a 105
106// inline functions
107
108inline Int_t AliMUONRawCluster::GetIndex(Int_t i, Int_t j) const
109{ return fIndexMap[i][j]; }
110
111inline Int_t AliMUONRawCluster::GetOffset(Int_t i, Int_t j) const
112{ return fOffsetMap[i][j]; }
113
114inline Float_t AliMUONRawCluster::GetContrib(Int_t i, Int_t j) const
115{ return fContMap[i][j]; }
116
117inline Int_t AliMUONRawCluster::GetPhysics(Int_t i) const
118{ return fPhysicsMap[i]; }
119
120inline void AliMUONRawCluster::SetIndex(Int_t i, Int_t j, Int_t index)
121{ fIndexMap[i][j] = index; }
122
123inline void AliMUONRawCluster::SetOffset(Int_t i, Int_t j, Int_t offset)
124{ fOffsetMap[i][j] = offset; }
125
126inline void AliMUONRawCluster::SetContrib(Int_t i, Int_t j, Float_t contrib)
127{ fContMap[i][j] = contrib; }
128
129inline void AliMUONRawCluster::SetPhysics(Int_t i, Int_t physics)
130{ fPhysicsMap[i] = physics; }
131
6570c14d 132inline void AliMUONRawCluster::SetDetElemId(Int_t Id)
133{ fDetElemId = Id; }
b137f8b9 134
6570c14d 135inline Int_t AliMUONRawCluster::GetDetElemId() const
136{ return fDetElemId;}
87e6e2dd 137
138inline void AliMUONRawCluster::SetError(Int_t iXY, Float_t err)
139{ fErrXY[iXY] = err; }
140
141inline void AliMUONRawCluster::SetErrX(Float_t err)
142{ SetError(0, err); }
143
144inline void AliMUONRawCluster::SetErrY(Float_t err)
145{ SetError(1, err); }
146
147inline Float_t AliMUONRawCluster::GetError(Int_t iXY) const
148{ return fErrXY[iXY]; }
149
150inline Float_t AliMUONRawCluster::GetErrX() const
151{ return GetError(0); }
152
153inline Float_t AliMUONRawCluster::GetErrY() const
154{ return GetError(1); }
155
a9e2aefa 156#endif
157
158
159
160
161
162