]>
Commit | Line | Data |
---|---|---|
e118b27e | 1 | /************************************************************************** |
2 | * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
3 | * * | |
4 | * Author: The ALICE Off-line Project. * | |
5 | * Contributors are mentioned in the code where appropriate. * | |
6 | * * | |
7 | * Permission to use, copy, modify and distribute this software and its * | |
8 | * documentation strictly for non-commercial purposes is hereby granted * | |
9 | * without fee, provided that the above copyright notice appears in all * | |
10 | * copies and that both the copyright notice and this permission notice * | |
11 | * appear in the supporting documentation. The authors make no claims * | |
12 | * about the suitability of this software for any purpose. It is * | |
13 | * provided "as is" without express or implied warranty. * | |
14 | **************************************************************************/ | |
15 | ||
16 | // $Id$ | |
17 | // | |
18 | // Class AliMUONTest | |
19 | // ----------------- | |
20 | // Class with functions for testing | |
21 | // | |
22 | // Author: Ivana Hrivnacova, IPN Orsay | |
23 | ||
24 | #include <TStopwatch.h> | |
25 | #include <Riostream.h> | |
24def874 | 26 | #include <TH2F.h> |
27 | #include <TPave.h> | |
e118b27e | 28 | |
29 | #include "AliRun.h" | |
30 | #include "AliSegmentation.h" | |
31 | #include "AliLog.h" | |
32 | ||
33 | #include "AliMUONTest.h" | |
34 | #include "AliMUON.h" | |
35 | #include "AliMUONConstants.h" | |
36 | #include "AliMUONGeometryModule.h" | |
37 | #include "AliMUONGeometryStore.h" | |
38 | #include "AliMUONGeometrySegmentation.h" | |
39 | #include "AliMUONSt12QuadrantSegmentation.h" | |
24def874 | 40 | #include "AliMUONSt345SlatSegmentation.h" |
e118b27e | 41 | |
42 | ClassImp(AliMUONTest) | |
43 | ||
44 | //__________________________________________________________________ | |
24def874 | 45 | AliMUONTest::AliMUONTest(const TString& configMacro) |
e118b27e | 46 | : TObject() |
47 | { | |
48 | // Standard Constructor | |
49 | // | |
50 | // Initialize AliRoot | |
51 | gAlice->Init(configMacro.Data()); | |
52 | } | |
53 | ||
54 | //__________________________________________________________________ | |
55 | AliMUONTest::AliMUONTest() | |
56 | : TObject() | |
57 | { | |
58 | // Default Constructor | |
59 | // | |
60 | } | |
61 | ||
62 | //____________________________________________________________________ | |
63 | AliMUONTest::AliMUONTest(const AliMUONTest& rhs) | |
64 | : TObject(rhs) | |
65 | { | |
66 | // Protected copy constructor | |
67 | ||
68 | AliFatal("Not implemented."); | |
69 | } | |
70 | ||
71 | //____________________________________________________________________ | |
72 | AliMUONTest::~AliMUONTest() | |
73 | { | |
74 | // Destructor | |
75 | } | |
76 | ||
77 | //________________________________________________________________________ | |
78 | AliMUONTest& AliMUONTest::operator = (const AliMUONTest& rhs) | |
79 | { | |
80 | // Protected assignement operator | |
81 | ||
82 | if (this == &rhs) return *this; | |
83 | ||
84 | AliFatal("Not implemented."); | |
85 | ||
86 | return *this; | |
87 | } | |
88 | ||
89 | // | |
90 | // public methods | |
91 | // | |
92 | ||
93 | //______________________________________________________________________________ | |
94 | void AliMUONTest::DetElemTransforms() | |
95 | { | |
96 | // | |
97 | AliMUON* muon = (AliMUON*)gAlice->GetModule("MUON"); | |
98 | if (!muon) { | |
99 | AliFatal("MUON detector not defined."); | |
100 | return; | |
101 | } | |
102 | ||
103 | // Loop over chambers | |
104 | for (Int_t i=0; i<AliMUONConstants::NCh(); i++) { | |
105 | ||
106 | AliMUONGeometryModule* geometry = muon->Chamber(i).GetGeometry(); | |
107 | AliMUONGeometryStore* detElements = geometry->GetDetElementStore(); | |
108 | ||
109 | // Loop over detection elements | |
110 | for (Int_t j=0; j<detElements->GetNofEntries(); j++) { | |
111 | ||
112 | //Int_t detElemId = geometry->GetDetElemId(j); | |
113 | Int_t detElemId = detElements->GetEntry(j)->GetUniqueID(); | |
114 | cout << "Detection element Id: " << detElemId << endl; | |
115 | ||
116 | Double_t x, y, z; | |
117 | geometry->Local2Global(detElemId, 0., 0., 0., x, y, z); | |
118 | cout << " Global DE position: " | |
119 | << x << ", " << y << ", " << z << endl; | |
120 | ||
121 | Double_t x2, y2, z2; | |
122 | geometry->Global2Local(detElemId, 0., 0., 0., x2, y2, z2); | |
123 | cout << " ALIC center in the local frame: " | |
124 | << x2 << ", " << y2 << ", " << z2 << endl; | |
125 | ||
126 | Double_t x3, y3, z3; | |
127 | geometry->Global2Local(detElemId, x, y, z, x3, y3, z3); | |
128 | cout << " Back in the local frame: " | |
129 | << x3 << ", " << y3 << ", " << z3 << endl; | |
130 | cout << endl; | |
131 | } | |
132 | } | |
133 | } | |
e118b27e | 134 | //______________________________________________________________________________ |
135 | void AliMUONTest::PrintPadPositions1() | |
136 | { | |
137 | // Build new segmentations (based on the detection element local | |
138 | // segmentations), iterate over all segmentations and print global | |
139 | // pad positions | |
140 | ||
141 | AliMUON* muon = (AliMUON*)gAlice->GetModule("MUON"); | |
142 | if (!muon) { | |
143 | AliFatal("MUON detector not defined."); | |
144 | return; | |
145 | } | |
146 | ||
147 | // Loop over chambers | |
148 | for (Int_t i=0; i<1; i++) { | |
149 | ||
150 | // Create chamber segmentations | |
151 | AliMUONGeometrySegmentation* seg[2]; | |
152 | seg[0] = new AliMUONGeometrySegmentation(muon->Chamber(i).GetGeometry()); | |
153 | seg[1] = new AliMUONGeometrySegmentation(muon->Chamber(i).GetGeometry()); | |
154 | ||
155 | // Quadrant segmentations: | |
156 | AliMUONSt12QuadrantSegmentation* bendSt1 | |
157 | = new AliMUONSt12QuadrantSegmentation(kStation1, kBendingPlane); | |
158 | AliMUONSt12QuadrantSegmentation* nonbendSt1 | |
159 | = new AliMUONSt12QuadrantSegmentation(kStation1, kNonBendingPlane); | |
160 | ||
161 | // The same configuration for both chambers of Station 1 | |
162 | Int_t id0 = (i+1)*100; | |
163 | ||
164 | // Configure St1 chamber segmentations | |
165 | seg[0]->Add(id0, bendSt1); | |
166 | seg[0]->Add(id0 + 1, nonbendSt1); | |
167 | seg[0]->Add(id0 + 50, nonbendSt1); | |
168 | seg[0]->Add(id0 + 51, bendSt1); | |
169 | ||
170 | seg[1]->Add(id0, nonbendSt1); | |
171 | seg[1]->Add(id0 + 1, bendSt1); | |
172 | seg[1]->Add(id0 + 50, bendSt1); | |
173 | seg[1]->Add(id0 + 51, nonbendSt1); | |
174 | ||
175 | // Iterate over the whole plane and return pad indices and | |
176 | // global/local positions | |
24def874 | 177 | // cout << "Go to loop over pads" << endl; |
178 | // for (Int_t cath=0; cath<2; cath++) { | |
e118b27e | 179 | |
24def874 | 180 | // cout << setw(6) << "Pads in chamber " << i << " cathod " << cath << endl; |
181 | // cout << "===================================" << endl; | |
182 | // TStopwatch timer; | |
183 | // timer.Start(); | |
184 | ||
185 | // Int_t counter = 0; | |
186 | // for ( seg[cath]->FirstPad(100, 70., 70., 0., 80., 80.); | |
187 | // seg[cath]->MorePads(100); | |
188 | // seg[cath]->NextPad(100) ) | |
189 | // { | |
190 | // cout << setw(6) << "counter " << counter++ << " "; | |
e118b27e | 191 | |
24def874 | 192 | // Int_t ix = seg[cath]->Ix(); |
193 | // Int_t iy = seg[cath]->Iy(); | |
194 | // Int_t deId = seg[cath]->DetElemId(); | |
195 | // cout << "Pad indices: ( " << deId << "; " << ix << ", " << iy << " ) " ; | |
196 | ||
197 | // Float_t x, y, z; | |
198 | // seg[cath]->GetPadC(deId, ix, iy, x, y, z); | |
199 | // cout << "Pad position: ( " << x << ", " << y << ", " << z << " )" << endl; | |
200 | // } | |
201 | // timer.Stop(); | |
202 | // timer.Print(); | |
203 | // } | |
204 | if (i == 0) DrawSegmentation(i,seg[0]); | |
205 | } | |
e118b27e | 206 | } |
24def874 | 207 | //______________________________________________________________________________ |
208 | void AliMUONTest::DrawSegmentation(Int_t chamber, AliMUONGeometrySegmentation *seg) | |
209 | { | |
210 | // Drawing slat504 | |
211 | Int_t ix, iy, deId; | |
212 | Float_t x, y, z; | |
213 | Float_t dpx, dpy; | |
214 | // TH2F * frame = new TH2F(" "," ",10,-10.,245.,10, -5., 45.); | |
215 | TH2F * frame = new TH2F(" "," ",10,-300.,300.,10, -300., 300.); | |
216 | // TH2F * frame = new TH2F(" "," ",10,-300.,300.,10, -25., 25.); | |
217 | frame->Draw(); | |
218 | // (new TPave( 0., 0., 40., 40.,2))->Draw(); | |
219 | // (new TPave( 40., 0., 80., 40.,2))->Draw(); | |
220 | // (new TPave( 80., 0.,120., 40.,2))->Draw(); | |
221 | // (new TPave(120., 0.,160., 40.,2))->Draw(); | |
222 | // (new TPave(160., 0.,200., 40.,2))->Draw(); | |
223 | // (new TPave(200., 0.,240., 40.,2))->Draw(); | |
224 | ||
225 | for (Int_t iDE = 0; iDE < 13; iDE++) { | |
226 | ||
227 | for (Int_t side = 0; side < 2; side++) { | |
228 | if (side == 0) | |
229 | deId = (chamber+1)*100+iDE; | |
230 | else | |
231 | deId = (chamber+1)*100+50+iDE; | |
232 | ||
233 | ||
234 | // for ( seg->FirstPad(detElementId, 0., 0., 0., 100., 100.); | |
235 | // seg->MorePads(detElementId); | |
236 | // seg->NextPad(detElementId) ) { | |
237 | for(ix=1; ix<=seg->Npx(deId); ix++) { | |
238 | for(iy=1; iy<=seg->Npy(deId); iy++) { | |
239 | seg->GetPadC(deId, ix, iy, x, y, z); | |
240 | Int_t sector = seg->Sector(deId, ix, iy); | |
241 | dpx = seg->Dpx(deId,sector); | |
242 | dpy = seg->Dpy(deId,sector); | |
243 | // printf(" ***** Pad position is ix: %d iy: %d x: %f y: %f sector: %d dpx: %f dpy: %f \n",ix, iy, x, y, sector, dpx, dpy); | |
244 | (new TPave(x-dpx/2., y-dpy/2., x+dpx/2., y+dpy/2., 1))->Draw(); | |
245 | } | |
246 | } | |
247 | } | |
248 | } | |
249 | } | |
e118b27e | 250 | //________________________________________________________________________ |
251 | void AliMUONTest::PrintPadPositions2() | |
252 | { | |
253 | // Iterate over all chamber segmentations and prints | |
254 | // global pad positions | |
255 | ||
256 | AliMUON* muon = (AliMUON*)gAlice->GetModule("MUON"); | |
257 | if (!muon) { | |
258 | AliFatal("MUON detector not defined."); | |
259 | return; | |
260 | } | |
261 | ||
262 | // Loop over chambers | |
263 | for (Int_t i=0; i<1; i++) { | |
264 | ||
265 | // Create chamber segmentations | |
266 | AliSegmentation* seg[2]; | |
267 | seg[0] = muon->Chamber(i).SegmentationModel(0); | |
268 | seg[1] = muon->Chamber(i).SegmentationModel(1); | |
269 | ||
270 | // Iterate over the whole plane and return pad indices and | |
271 | // global/local positions | |
272 | cout << "Go to loop over pads" << endl; | |
273 | for (Int_t cath=0; cath<2; cath++) { | |
274 | ||
275 | cout << setw(6) << "Pads in chamber " << i << " cathod " << cath << endl; | |
276 | cout << "===================================" << endl; | |
277 | TStopwatch timer; | |
278 | timer.Start(); | |
279 | ||
280 | Int_t counter = 0; | |
281 | for ( seg[cath]->FirstPad(70., 70., 0., 80., 80.); | |
282 | seg[cath]->MorePads(); | |
283 | seg[cath]->NextPad() ) | |
284 | { | |
285 | cout << setw(6) << "counter " << counter++ << " "; | |
286 | ||
287 | Int_t ix = seg[cath]->Ix(); | |
288 | Int_t iy = seg[cath]->Iy(); | |
289 | cout << "Pad indices: ( " << ix << ", " << iy << " ) " ; | |
290 | ||
291 | Float_t x, y, z; | |
292 | seg[cath]->GetPadC(ix, iy, x, y, z); | |
293 | cout << "Pad position: ( " << x << ", " << y << ", " << z << " )" << endl; | |
294 | } | |
295 | timer.Stop(); | |
296 | timer.Print(); | |
297 | } | |
298 | } | |
299 | } | |
24def874 | 300 | //_____________________________________________________________________________ |
301 | void AliMUONTest::St3SlatSegmentation() | |
302 | { | |
303 | ||
304 | // Build new segmentations (based on the detection element local | |
305 | // segmentations), iterate over all segmentations and print global | |
306 | // pad positions | |
307 | ||
308 | AliMUON* muon = (AliMUON*)gAlice->GetModule("MUON"); | |
309 | if (!muon) { | |
310 | AliFatal("MUON detector not defined."); | |
311 | return; | |
312 | } | |
313 | ||
314 | //Slats Segmentations | |
315 | AliMUONSt345SlatSegmentation *slatseg[20]; // Types of segmentation for St3 in this framework | |
316 | Int_t ndiv[4] ={ 4, 4, 2, 1}; // densities zones | |
317 | for(Int_t i=0; i<20;i++) { | |
318 | slatseg[i] = new AliMUONSt345SlatSegmentation(); | |
319 | slatseg[i]->SetPadSize(10.,0.5); | |
320 | slatseg[i]->SetPadDivision(ndiv); | |
321 | slatseg[i]->SetId(1); | |
322 | slatseg[i]->SetDAnod(0.25); | |
323 | } | |
324 | ||
325 | //****************************************************************************************** | |
326 | // Station 3 | |
327 | //****************************************************************************************** | |
328 | ||
329 | // Type 112200 for 500, 501, 508, 509, 510, 517 in Ch5 (similar for Ch6) for the futur official numbering | |
330 | // Type 112200 for 503, 504, 505, 555, 554, 553 in Ch5 (similar for Ch6) actual numbering in the code to be changed in jan05 | |
331 | Int_t n0[4] = { 0, 2, 2, 0 }; | |
332 | slatseg[0]->SetPcbBoards(n0); | |
333 | slatseg[0]->Init(0); | |
334 | ||
335 | // Type 122200 for 502, 507, 511, 516 (similar in Ch6) for future official numbering of ALICE | |
336 | // Type 122200 for 502, 506, 556, 552 (similiarin Ch6) for actual numbering in muon code to be changed in jan05 | |
337 | Int_t n1[4] = { 0, 1, 3, 0 }; | |
338 | slatseg[1]->SetPcbBoards(n1); | |
339 | slatseg[1]->Init(0); | |
340 | ||
341 | // Type 222000 for 503, 506, 512, 515 (similar in Ch6) for future official numbering of ALICE | |
342 | // Type 222000 for 501, 507, 557, 551 (similiarin Ch6) for actual numbering in muon code to be changed in jan05 | |
343 | Int_t n2[4] = { 0, 0, 3, 0 }; | |
344 | slatseg[2]->SetPcbBoards(n2); | |
345 | slatseg[2]->Init(0); | |
346 | ||
347 | // Type 220000 for 504, 505, 513, 514 (similar in Ch6) for future official numbering of ALICE | |
348 | // Type 220000 for 500, 508, 558, 550 (similiarin Ch6) for actual numbering in muon code to be changed in jan05 | |
349 | Int_t n3[4] = { 0, 0, 2, 0 }; | |
350 | slatseg[3]->SetPcbBoards(n3); | |
351 | slatseg[3]->Init(0); | |
352 | ||
353 | //****************************************************************************************** | |
354 | // Station 4 & 5 | |
355 | //**************************************************************************************** | |
356 | ||
357 | // Type 122330 for 700, 713 in Ch7 (similar for Ch8) for the futur official numbering | |
358 | // Type 122330 for 706, 756 in Ch7 (similar for Ch8) actual numbering in the code to be changed in jan05 | |
359 | // Type 122330 for 900, 913 in Ch9 (similar for Ch10) for the futur official numbering | |
360 | // Type 122330 for 906, 956 in Ch9 (similar for Ch10) actual numbering in the code to be changed in jan05 | |
361 | ||
362 | Int_t n4[4] = { 0, 1, 2, 2 }; | |
363 | slatseg[4]->SetPcbBoards(n4); | |
364 | slatseg[4]->Init(0); // 0 detection element id | |
365 | ||
366 | // Type 112233 for 701, 712, 714, 725 in Ch7 (similar for Ch8) for the futur official numbering | |
367 | // Type 112233 for 705, 707, 755, 757 in Ch7 (similar for Ch8) actual numbering in the code to be changed in jan05 | |
368 | // Type 112233 for 901, 902, 911, 912, 914, 915, 924, 925 in Ch9 (similar for Ch10) for the futur official numbering | |
369 | // Type 112233 for 904, 905, 907, 908, 954, 955, 957, 958 in Ch9 (similar for Ch10) actual numbering in the code to be changed in jan05 | |
370 | Int_t n5[4] = { 0, 2, 2, 2 }; | |
371 | slatseg[5]->SetPcbBoards(n5); | |
372 | slatseg[5]->Init(0); // 0 detection element id | |
373 | ||
374 | // Type 112230 for 702, 711, 715, 724 in Ch7 (similar for Ch8) for the futur official numbering | |
375 | // Type 112230 for 704, 708, 754, 758 in Ch7 (similar for Ch8) actual numbering in the code to be changed in jan05 | |
376 | Int_t n6[4] = { 0, 2, 2, 1 }; | |
377 | slatseg[6]->SetPcbBoards(n6); | |
378 | slatseg[6]->Init(0); // 0 detection element id | |
379 | ||
380 | // Type 222330 for 703, 710, 716, 723 in Ch7 (similar for Ch8) for the futur official numbering | |
381 | // Type 222330 for 703, 709, 753, 759 in Ch7 (similar for Ch8) actual numbering in the code to be changed in jan05 | |
382 | Int_t n7[4] = { 0, 0, 3, 2 }; | |
383 | slatseg[7]->SetPcbBoards(n7); | |
384 | slatseg[7]->Init(0); // 0 detection element id | |
385 | ||
386 | // Type 223300 for 704, 709, 717, 722 in Ch7 (similar for Ch8) for the futur official numbering | |
387 | // Type 223300 for 702, 710, 752, 760 in Ch7 (similar for Ch8) actual numbering in the code to be changed in jan05 | |
388 | Int_t n8[4] = { 0, 0, 2, 2 }; | |
389 | slatseg[8]->SetPcbBoards(n8); | |
390 | slatseg[8]->Init(0); // 0 detection element id | |
391 | ||
392 | // Type 333000 for 705, 708, 718, 721 in Ch7 (similar for Ch8) for the futur official numbering | |
393 | // Type 333000 for 701, 711, 751, 761 in Ch7 (similar for Ch8) actual numbering in the code to be changed in jan05 | |
394 | // Type 333000 for 906, 907, 919, 920 in Ch9 (similar for Ch10) for the futur official numbering | |
395 | // Type 333000 for 900, 912, 950, 962 in Ch9 (similar for Ch10) actual numbering in the code to be changed in jan05 | |
396 | Int_t n9[4] = { 0, 0, 0, 3 }; | |
397 | slatseg[9]->SetPcbBoards(n9); | |
398 | slatseg[9]->Init(0); // 0 detection element id | |
399 | ||
400 | // Type 330000 for 706, 707, 719, 720 in Ch7 (similar for Ch8) for the futur official numbering | |
401 | // Type 330000 for 700, 712, 750, 762 in Ch7 (similar for Ch8) actual numbering in the code to be changed in jan05 | |
402 | Int_t n10[4] = { 0, 0, 0, 2 }; | |
403 | slatseg[10]->SetPcbBoards(n10); | |
404 | slatseg[10]->Init(0); // 0 detection element id | |
405 | ||
406 | // Type 222333 for 903, 910, 916, 923 in Ch9 (similar for Ch10) for the futur official numbering | |
407 | // Type 222333 for 903, 909, 953, 959 in Ch9 (similar for Ch10) actual numbering in the code to be changed in jan05 | |
408 | Int_t n11[4] = { 0, 0, 3, 3 }; | |
409 | slatseg[11]->SetPcbBoards(n11); | |
410 | slatseg[11]->Init(0); // 0 detection element id | |
411 | ||
412 | // Type 223330 for 904, 909, 917, 922 in Ch9 (similar for Ch10) for the futur official numbering | |
413 | // Type 223330 for 902, 910, 952, 960 in Ch9 (similar for Ch10) actual numbering in the code to be changed in jan05 | |
414 | Int_t n12[4] = { 0, 0, 2, 3 }; | |
415 | slatseg[12]->SetPcbBoards(n12); | |
416 | slatseg[12]->Init(0); // 0 detection element id | |
417 | ||
418 | // Type 333300 for 905, 908, 918, 921 in Ch9 (similar for Ch10) for the futur official numbering | |
419 | // Type 333300 for 901, 911, 951, 961 in Ch9 (similar for Ch10) actual numbering in the code to be changed in jan05 | |
420 | Int_t n13[4] = { 0, 0, 0, 4 }; | |
421 | slatseg[13]->SetPcbBoards(n13); | |
422 | slatseg[13]->Init(0); // 0 detection element id | |
423 | ||
e118b27e | 424 | |
24def874 | 425 | //Loop for St3 (only segmentation for bending plane) |
426 | for (Int_t i=0; i<2; i++) { | |
427 | // Create chamber segmentations | |
428 | Int_t chamber = i+4; | |
429 | AliMUONGeometrySegmentation* st3seg = new AliMUONGeometrySegmentation(muon->Chamber(chamber).GetGeometry()); | |
430 | ||
431 | Int_t id0=(chamber+1)*100; | |
432 | // type 220000 | |
433 | st3seg->Add(id0, slatseg[3]); | |
434 | st3seg->Add(id0+ 8, slatseg[3]); | |
435 | st3seg->Add(id0+50, slatseg[3]); | |
436 | st3seg->Add(id0+58, slatseg[3]); | |
437 | // type 222000 | |
438 | st3seg->Add(id0+ 1, slatseg[2]); | |
439 | st3seg->Add(id0+ 7, slatseg[2]); | |
440 | st3seg->Add(id0+51, slatseg[2]); | |
441 | st3seg->Add(id0+57, slatseg[2]); | |
442 | // type 122200 | |
443 | st3seg->Add(id0+ 2, slatseg[1]); | |
444 | st3seg->Add(id0+ 6, slatseg[1]); | |
445 | st3seg->Add(id0+52, slatseg[1]); | |
446 | st3seg->Add(id0+56, slatseg[1]); | |
447 | // type 112200 | |
448 | st3seg->Add(id0+ 3, slatseg[0]); | |
449 | st3seg->Add(id0+ 4, slatseg[0]); | |
450 | st3seg->Add(id0+ 5, slatseg[0]); | |
451 | st3seg->Add(id0+53, slatseg[0]); | |
452 | st3seg->Add(id0+54, slatseg[0]); | |
453 | st3seg->Add(id0+55, slatseg[0]); | |
454 | ||
455 | // if (i == 0) DrawSegmentation(chamber,st3seg); | |
456 | } | |
457 | ||
458 | //Loop for St4 (only segmentation for bending plane) | |
459 | for (Int_t i=0; i<2; i++) { | |
460 | // Create chamber segmentations | |
461 | Int_t chamber = i+6; | |
462 | AliMUONGeometrySegmentation* st4seg = new AliMUONGeometrySegmentation(muon->Chamber(chamber).GetGeometry()); | |
463 | ||
464 | Int_t id0=(chamber+1)*100; | |
465 | // type 122330 | |
466 | st4seg->Add(id0+ 6, slatseg[4]); | |
467 | st4seg->Add(id0+56, slatseg[4]); | |
468 | // type 112233 | |
469 | st4seg->Add(id0+ 5, slatseg[5]); | |
470 | st4seg->Add(id0+ 7, slatseg[5]); | |
471 | st4seg->Add(id0+55, slatseg[5]); | |
472 | st4seg->Add(id0+57, slatseg[5]); | |
473 | // type 112230 | |
474 | st4seg->Add(id0+ 4, slatseg[6]); | |
475 | st4seg->Add(id0+ 8, slatseg[6]); | |
476 | st4seg->Add(id0+54, slatseg[6]); | |
477 | st4seg->Add(id0+58, slatseg[6]); | |
478 | // type 222330 | |
479 | st4seg->Add(id0+ 3, slatseg[7]); | |
480 | st4seg->Add(id0+ 9, slatseg[7]); | |
481 | st4seg->Add(id0+53, slatseg[7]); | |
482 | st4seg->Add(id0+59, slatseg[7]); | |
483 | // type 223300 | |
484 | st4seg->Add(id0+ 2, slatseg[8]); | |
485 | st4seg->Add(id0+10, slatseg[8]); | |
486 | st4seg->Add(id0+52, slatseg[8]); | |
487 | st4seg->Add(id0+60, slatseg[8]); | |
488 | // type 333000 | |
489 | st4seg->Add(id0+ 1, slatseg[9]); | |
490 | st4seg->Add(id0+11, slatseg[9]); | |
491 | st4seg->Add(id0+51, slatseg[9]); | |
492 | st4seg->Add(id0+61, slatseg[9]); | |
493 | // type 330000 | |
494 | st4seg->Add(id0 , slatseg[10]); | |
495 | st4seg->Add(id0+12, slatseg[10]); | |
496 | st4seg->Add(id0+50, slatseg[10]); | |
497 | st4seg->Add(id0+62, slatseg[10]); | |
498 | ||
499 | // if (i == 0) DrawSegmentation(chamber,st4seg); | |
500 | } | |
501 | ||
502 | //Loop for St5 (only segmentation for bending plane) | |
503 | for (Int_t i=0; i<2; i++) { | |
504 | // Create chamber segmentations | |
505 | Int_t chamber = i+8; | |
506 | AliMUONGeometrySegmentation* st5seg = new AliMUONGeometrySegmentation(muon->Chamber(chamber).GetGeometry()); | |
507 | ||
508 | Int_t id0=(chamber+1)*100; | |
509 | // type 122330 | |
510 | st5seg->Add(id0+ 6, slatseg[4]); | |
511 | st5seg->Add(id0+56, slatseg[4]); | |
512 | // type 112233 | |
513 | st5seg->Add(id0+ 4, slatseg[5]); | |
514 | st5seg->Add(id0+ 5, slatseg[5]); | |
515 | st5seg->Add(id0+ 7, slatseg[5]); | |
516 | st5seg->Add(id0+ 8, slatseg[5]); | |
517 | st5seg->Add(id0+54, slatseg[5]); | |
518 | st5seg->Add(id0+55, slatseg[5]); | |
519 | st5seg->Add(id0+57, slatseg[5]); | |
520 | st5seg->Add(id0+58, slatseg[5]); | |
521 | // type 222333 | |
522 | st5seg->Add(id0+ 3, slatseg[11]); | |
523 | st5seg->Add(id0+ 9, slatseg[11]); | |
524 | st5seg->Add(id0+53, slatseg[11]); | |
525 | st5seg->Add(id0+59, slatseg[11]); | |
526 | // type 223330 | |
527 | st5seg->Add(id0+ 2, slatseg[12]); | |
528 | st5seg->Add(id0+10, slatseg[12]); | |
529 | st5seg->Add(id0+52, slatseg[12]); | |
530 | st5seg->Add(id0+60, slatseg[12]); | |
531 | // type 333300 | |
532 | st5seg->Add(id0+ 1, slatseg[13]); | |
533 | st5seg->Add(id0+11, slatseg[13]); | |
534 | st5seg->Add(id0+51, slatseg[13]); | |
535 | st5seg->Add(id0+61, slatseg[13]); | |
536 | // type 333000 | |
537 | st5seg->Add(id0 , slatseg[9]); | |
538 | st5seg->Add(id0+12, slatseg[9]); | |
539 | st5seg->Add(id0+50, slatseg[9]); | |
540 | st5seg->Add(id0+62, slatseg[9]); | |
541 | ||
542 | if (i == 0) DrawSegmentation(chamber,st5seg); | |
543 | } | |
544 | ||
545 | } |