]>
Commit | Line | Data |
---|---|---|
e118b27e | 1 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * |
2 | * See cxx source for full Copyright notice */ | |
3 | ||
4 | /* $Id$ */ | |
5 | ||
692de412 | 6 | /// \ingroup geometry |
7 | /// \class AliMUONGeometrySegmentation | |
8 | /// \brief Segmentation for a geometry module | |
9 | /// | |
10 | /// New class for the geometry segmentation | |
11 | /// composed of the segmentations of detection elements. | |
12 | /// Applies transformations defined in geometry. | |
13 | /// | |
14 | /// Author:Ivana Hrivnacova, IPN Orsay | |
e118b27e | 15 | |
16 | #ifndef ALI_MUON_GEOMETRY_SEGMENTATION_H | |
17 | #define ALI_MUON_GEOMETRY_SEGMENTATION_H | |
18 | ||
6b1e4b22 | 19 | #include "AliMUONGeometryDirection.h" |
20 | ||
e2d5c9df | 21 | #include <TObject.h> |
22 | #include <TString.h> | |
23 | ||
e118b27e | 24 | class TObjArray; |
25 | class TF1; | |
26 | ||
5db8c9c1 | 27 | class AliMUONGeometryModuleTransformer; |
e118b27e | 28 | class AliMUONGeometryStore; |
29 | class AliMUONGeometryDetElement; | |
eb6a47db | 30 | class AliMUONVGeometryDESegmentation; |
f1501d74 | 31 | class AliMUONSegmentManuIndex; |
e118b27e | 32 | |
33 | class AliMUONGeometrySegmentation : public TObject | |
34 | { | |
35 | public: | |
5db8c9c1 | 36 | AliMUONGeometrySegmentation( |
37 | const AliMUONGeometryModuleTransformer* geometry); | |
e118b27e | 38 | AliMUONGeometrySegmentation(); |
39 | virtual ~AliMUONGeometrySegmentation(); | |
40 | ||
5db8c9c1 | 41 | // Methods |
42 | // | |
43 | void Add(Int_t detElemId, const TString& detElemName, | |
eb6a47db | 44 | AliMUONVGeometryDESegmentation* segmentation); |
45 | ||
5db8c9c1 | 46 | // Get methods |
47 | // | |
48 | const AliMUONGeometryModuleTransformer* GetTransformer() const; | |
49 | // Geometry transformer | |
50 | ||
51 | const AliMUONVGeometryDESegmentation* GetDESegmentation( | |
dec74ccc | 52 | Int_t detElemId, Bool_t warn = true) const; |
f5ed7890 | 53 | // DE segmentation |
5db8c9c1 | 54 | |
55 | AliMUONGeometryDirection GetDirection(Int_t detElemId) const; | |
e9981d13 | 56 | // Direction with a constant pad size |
dec74ccc | 57 | // (Direction or coordinate where the resolution |
58 | // is the best) | |
e118b27e | 59 | |
5db8c9c1 | 60 | TString GetDEName(Int_t detElemId) const; |
61 | // DE name | |
62 | ||
63 | // Redefined methods from AliSegmentation interface | |
e118b27e | 64 | // |
65 | ||
66 | // Set Chamber Segmentation Parameters | |
67 | // | |
68 | virtual void SetPadSize(Float_t p1, Float_t p2); | |
69 | // Pad size Dx*Dy | |
70 | virtual void SetDAnod(Float_t D); | |
71 | // Anode Pitch | |
72 | ||
73 | // Transform from pad (wire) to real coordinates and vice versa | |
74 | // | |
75 | virtual Float_t GetAnod(Int_t detElemId, Float_t xlhit) const; | |
76 | // Anode wire coordinate closest to xhit | |
eb6a47db | 77 | virtual Bool_t GetPadI(Int_t detElemId, |
e118b27e | 78 | Float_t xg, Float_t yg, Float_t zg, |
79 | Int_t& ix, Int_t& iy); | |
80 | // Transform from pad to real coordinates | |
eb6a47db | 81 | virtual Bool_t GetPadC(Int_t detElemId, |
e118b27e | 82 | Int_t ix, Int_t iy, |
83 | Float_t& x, Float_t& y, Float_t& z); | |
84 | // Transform from real to pad coordinates | |
1d7b6529 | 85 | |
e2d5c9df | 86 | virtual Bool_t HasPad(Int_t detElemId, |
87 | Int_t ix, Int_t iy); | |
88 | virtual Bool_t HasPad(Int_t detElemId, | |
89 | Float_t& x, Float_t& y, Float_t& z); | |
9db6c8d7 | 90 | |
e118b27e | 91 | // Initialisation |
92 | // | |
93 | virtual void Init(Int_t chamber); | |
94 | ||
95 | // Get member data | |
96 | // | |
97 | virtual Float_t Dpx(Int_t detElemId) const; | |
98 | virtual Float_t Dpy(Int_t detElemId) const ; | |
99 | // Pad size in x, y | |
100 | virtual Float_t Dpx(Int_t detElemId, Int_t isector) const; | |
101 | virtual Float_t Dpy(Int_t detElemId, Int_t isector) const; | |
102 | // Pad size in x, y by Sector | |
103 | virtual Int_t Npx(Int_t detElemId) const; | |
104 | virtual Int_t Npy(Int_t detElemId) const; | |
105 | // Maximum number of Pads in y | |
106 | ||
107 | virtual void SetPad(Int_t detElemId, Int_t ix, Int_t iy); | |
108 | // Set pad position | |
109 | virtual void SetHit(Int_t detElemId, Float_t xghit, Float_t yghit, Float_t zghit); | |
110 | // Set hit position | |
111 | ||
112 | // Iterate over pads | |
113 | // | |
114 | virtual void FirstPad(Int_t detElemId, | |
115 | Float_t xghit, Float_t yghit, Float_t zghit, | |
116 | Float_t dx, Float_t dy); | |
117 | virtual void NextPad(Int_t detElemId); | |
118 | virtual Int_t MorePads(Int_t detElemId); | |
119 | ||
120 | virtual Float_t Distance2AndOffset(Int_t detElemId, | |
121 | Int_t ix, Int_t iy, | |
122 | Float_t xg, Float_t yg, Float_t zg, | |
123 | Int_t* dummy); | |
124 | // Distance between 1 pad and a position | |
125 | virtual void GetNParallelAndOffset(Int_t detElemId, | |
126 | Int_t ix, Int_t iy, | |
127 | Int_t* nparallel, Int_t* offset); | |
128 | // Number of pads read in parallel and offset to add to x | |
129 | // (specific to LYON, but mandatory for display) | |
130 | virtual void Neighbours(Int_t detElemId, | |
131 | Int_t ix, Int_t iy, | |
132 | Int_t* nlist, Int_t xlist[10], Int_t ylist[10]); | |
133 | // Get next neighbours | |
134 | ||
135 | // Current values | |
136 | // | |
137 | virtual Int_t Ix(); | |
138 | virtual Int_t Iy(); | |
139 | virtual Int_t DetElemId(); | |
140 | // Current pad cursor during disintegration | |
141 | // x, y-coordinate | |
142 | virtual Int_t ISector(); | |
143 | // current sector | |
144 | ||
145 | virtual Int_t Sector(Int_t detElemId, | |
146 | Int_t ix, Int_t iy); | |
147 | virtual Int_t Sector(Int_t detElemId, | |
148 | Float_t xg, Float_t yg, Float_t zg); | |
149 | // calculate sector from pad coordinates | |
150 | ||
151 | virtual void IntegrationLimits(Int_t detElemId, | |
152 | Float_t& x1, Float_t& x2, | |
153 | Float_t& y1, Float_t& y2); | |
154 | // Current integration limits | |
155 | ||
156 | // Signal Generation | |
157 | // | |
158 | virtual Int_t SigGenCond(Int_t detElemId, | |
159 | Float_t xg, Float_t yg, Float_t zg); | |
160 | // Signal Generation Condition during Stepping | |
161 | virtual void SigGenInit(Int_t detElemId, | |
162 | Float_t xg, Float_t yg, Float_t zg); | |
163 | // Initialise signal generation at coord (x,y,z) | |
164 | ||
165 | ||
166 | virtual void GiveTestPoints(Int_t detElemId, | |
167 | Int_t& n, Float_t* xg, Float_t* yg) const; | |
168 | // Test points for auto calibration | |
4ebc2323 | 169 | virtual void Draw(const char *opt = ""); |
170 | virtual void Draw(Int_t detElemId, const char *opt = ""); | |
e118b27e | 171 | // Draw the segmentation zones |
172 | ||
173 | // Function for systematic corrections | |
174 | // | |
175 | virtual void SetCorrFunc(Int_t detElemId, | |
176 | Int_t isec, TF1* func); | |
177 | // Set the correction function | |
178 | virtual TF1* CorrFunc(Int_t detElemId, Int_t isec) const; | |
179 | // Get the correction Function | |
f29ba3e1 | 180 | // Printing |
181 | // | |
182 | virtual void Print(Option_t* opt = "") const; | |
1d7b6529 | 183 | |
e118b27e | 184 | protected: |
185 | AliMUONGeometrySegmentation(const AliMUONGeometrySegmentation& rhs); | |
186 | ||
187 | // operators | |
188 | AliMUONGeometrySegmentation& operator=(const AliMUONGeometrySegmentation & rhs); | |
189 | ||
190 | private: | |
191 | // methods | |
dec74ccc | 192 | Bool_t OwnNotify(Int_t detElemId, Bool_t warn = true) const; |
3aadd064 | 193 | |
194 | // static data members | |
195 | static const Float_t fgkMaxDistance; // the big value passed to pad coordinates | |
196 | // if pad does not exist | |
e118b27e | 197 | |
198 | // data members | |
3aadd064 | 199 | mutable Int_t fCurrentDetElemId; // current DE ID |
200 | mutable AliMUONGeometryDetElement* fCurrentDetElement; // current detection element | |
201 | mutable AliMUONVGeometryDESegmentation* fCurrentSegmentation;// current DE segmentation | |
5db8c9c1 | 202 | |
203 | const AliMUONGeometryModuleTransformer* fkModuleTransformer; // associated geometry transformer | |
204 | AliMUONGeometryStore* fDESegmentations;// DE segmentations | |
205 | AliMUONGeometryStore* fDENames; // DE names | |
206 | ||
e118b27e | 207 | |
394d8216 | 208 | ClassDef(AliMUONGeometrySegmentation,3) // Geometry segmentation |
e118b27e | 209 | }; |
210 | ||
eb6a47db | 211 | // inline functions |
212 | ||
5db8c9c1 | 213 | inline |
214 | const AliMUONGeometryModuleTransformer* | |
215 | AliMUONGeometrySegmentation::GetTransformer() const | |
216 | { return fkModuleTransformer; } | |
eb6a47db | 217 | |
e118b27e | 218 | #endif //ALI_MUON_GEOMETRY_SEGMENTATION_H |
219 | ||
220 | ||
221 | ||
222 | ||
223 | ||
224 | ||
225 | ||
226 |