1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
20 // Class with functions for testing
22 // Author: Ivana Hrivnacova, IPN Orsay
24 #include <TStopwatch.h>
25 #include <Riostream.h>
31 #include "AliSegmentation.h"
34 #include "AliMUONTest.h"
36 #include "AliMUONConstants.h"
37 #include "AliMUONGeometryModule.h"
38 #include "AliMUONGeometryStore.h"
39 #include "AliMUONGeometrySegmentation.h"
40 #include "AliMUONSt12QuadrantSegmentation.h"
41 #include "AliMUONSt345SlatSegmentation.h"
45 //__________________________________________________________________
46 AliMUONTest::AliMUONTest(const TString& configMacro)
50 // Standard Constructor
53 gAlice->Init(configMacro.Data());
56 //__________________________________________________________________
57 AliMUONTest::AliMUONTest()
61 // Default Constructor
65 //____________________________________________________________________
66 AliMUONTest::AliMUONTest(const AliMUONTest& rhs)
69 // Protected copy constructor
71 AliFatal("Not implemented.");
74 //____________________________________________________________________
75 AliMUONTest::~AliMUONTest()
82 //________________________________________________________________________
83 AliMUONTest& AliMUONTest::operator = (const AliMUONTest& rhs)
85 // Protected assignement operator
87 if (this == &rhs) return *this;
89 AliFatal("Not implemented.");
98 //________________________________________________________________________
99 AliMUONGeometrySegmentation*
100 AliMUONTest::CreateSt1Segmentation(Int_t chamberId, Int_t cathod)
102 // Create St1 geometry segmentation for given chamber and cathod
104 AliMUON* muon = (AliMUON*)gAlice->GetModule("MUON");
106 AliFatal("MUON detector not defined.");
110 AliMUONGeometrySegmentation* segmentation
111 = new AliMUONGeometrySegmentation(muon->Chamber(chamberId).GetGeometry());
113 // Quadrant segmentations:
114 AliMUONSt12QuadrantSegmentation* bendSt1
115 = new AliMUONSt12QuadrantSegmentation(kStation1, kBendingPlane);
116 AliMUONSt12QuadrantSegmentation* nonbendSt1
117 = new AliMUONSt12QuadrantSegmentation(kStation1, kNonBendingPlane);
119 // The same configuration for both chambers of Station 1
120 Int_t id0 = (chamberId+1)*100;
122 // Configure St1 chamber segmentations
125 segmentation->Add(id0, bendSt1);
126 segmentation->Add(id0 + 1, nonbendSt1);
127 segmentation->Add(id0 + 50, bendSt1);
128 segmentation->Add(id0 + 51, nonbendSt1);
130 else if (cathod == 1) {
132 segmentation->Add(id0, nonbendSt1);
133 segmentation->Add(id0 + 1, bendSt1);
134 segmentation->Add(id0 + 50, nonbendSt1);
135 segmentation->Add(id0 + 51, bendSt1);
138 AliError("Wrong cathod number");
145 //_____________________________________________________________________________
146 AliMUONGeometrySegmentation*
147 AliMUONTest::CreateSlatSegmentation(Int_t chamberId, Int_t cathod)
149 // Create St1 geometry segmentation for given chamber and cathod
151 AliMUON* muon = (AliMUON*)gAlice->GetModule("MUON");
153 AliFatal("MUON detector not defined.");
157 //Slats Segmentations
158 AliMUONSt345SlatSegmentation *slatseg[20]; // Types of segmentation for St3 in this framework
159 Int_t ndiv[4] ={ 4, 4, 2, 1}; // densities zones
160 for(Int_t i=0; i<20;i++) {
161 slatseg[i] = new AliMUONSt345SlatSegmentation();
162 slatseg[i]->SetPadSize(10.,0.5);
163 slatseg[i]->SetPadDivision(ndiv);
164 slatseg[i]->SetId(1);
165 slatseg[i]->SetDAnod(0.25);
168 //******************************************************************************************
170 //******************************************************************************************
172 // Type 112200 for 500, 501, 508, 509, 510, 517 in Ch5 (similar for Ch6) for the futur official numbering
173 // Type 112200 for 503, 504, 505, 555, 554, 553 in Ch5 (similar for Ch6) actual numbering in the code to be changed in jan05
174 Int_t n0[4] = { 0, 2, 2, 0 };
175 slatseg[0]->SetPcbBoards(n0);
178 // Type 122200 for 502, 507, 511, 516 (similar in Ch6) for future official numbering of ALICE
179 // Type 122200 for 502, 506, 556, 552 (similiarin Ch6) for actual numbering in muon code to be changed in jan05
180 Int_t n1[4] = { 0, 1, 3, 0 };
181 slatseg[1]->SetPcbBoards(n1);
184 // Type 222000 for 503, 506, 512, 515 (similar in Ch6) for future official numbering of ALICE
185 // Type 222000 for 501, 507, 557, 551 (similiarin Ch6) for actual numbering in muon code to be changed in jan05
186 Int_t n2[4] = { 0, 0, 3, 0 };
187 slatseg[2]->SetPcbBoards(n2);
190 // Type 220000 for 504, 505, 513, 514 (similar in Ch6) for future official numbering of ALICE
191 // Type 220000 for 500, 508, 558, 550 (similiarin Ch6) for actual numbering in muon code to be changed in jan05
192 Int_t n3[4] = { 0, 0, 2, 0 };
193 slatseg[3]->SetPcbBoards(n3);
196 //******************************************************************************************
198 //****************************************************************************************
200 // Type 122330 for 700, 713 in Ch7 (similar for Ch8) for the futur official numbering
201 // Type 122330 for 706, 756 in Ch7 (similar for Ch8) actual numbering in the code to be changed in jan05
202 // Type 122330 for 900, 913 in Ch9 (similar for Ch10) for the futur official numbering
203 // Type 122330 for 906, 956 in Ch9 (similar for Ch10) actual numbering in the code to be changed in jan05
205 Int_t n4[4] = { 0, 1, 2, 2 };
206 slatseg[4]->SetPcbBoards(n4);
207 slatseg[4]->Init(0); // 0 detection element id
209 // Type 112233 for 701, 712, 714, 725 in Ch7 (similar for Ch8) for the futur official numbering
210 // Type 112233 for 705, 707, 755, 757 in Ch7 (similar for Ch8) actual numbering in the code to be changed in jan05
211 // Type 112233 for 901, 902, 911, 912, 914, 915, 924, 925 in Ch9 (similar for Ch10) for the futur official numbering
212 // 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
213 Int_t n5[4] = { 0, 2, 2, 2 };
214 slatseg[5]->SetPcbBoards(n5);
215 slatseg[5]->Init(0); // 0 detection element id
217 // Type 112230 for 702, 711, 715, 724 in Ch7 (similar for Ch8) for the futur official numbering
218 // Type 112230 for 704, 708, 754, 758 in Ch7 (similar for Ch8) actual numbering in the code to be changed in jan05
219 Int_t n6[4] = { 0, 2, 2, 1 };
220 slatseg[6]->SetPcbBoards(n6);
221 slatseg[6]->Init(0); // 0 detection element id
223 // Type 222330 for 703, 710, 716, 723 in Ch7 (similar for Ch8) for the futur official numbering
224 // Type 222330 for 703, 709, 753, 759 in Ch7 (similar for Ch8) actual numbering in the code to be changed in jan05
225 Int_t n7[4] = { 0, 0, 3, 2 };
226 slatseg[7]->SetPcbBoards(n7);
227 slatseg[7]->Init(0); // 0 detection element id
229 // Type 223300 for 704, 709, 717, 722 in Ch7 (similar for Ch8) for the futur official numbering
230 // Type 223300 for 702, 710, 752, 760 in Ch7 (similar for Ch8) actual numbering in the code to be changed in jan05
231 Int_t n8[4] = { 0, 0, 2, 2 };
232 slatseg[8]->SetPcbBoards(n8);
233 slatseg[8]->Init(0); // 0 detection element id
235 // Type 333000 for 705, 708, 718, 721 in Ch7 (similar for Ch8) for the futur official numbering
236 // Type 333000 for 701, 711, 751, 761 in Ch7 (similar for Ch8) actual numbering in the code to be changed in jan05
237 // Type 333000 for 906, 907, 919, 920 in Ch9 (similar for Ch10) for the futur official numbering
238 // Type 333000 for 900, 912, 950, 962 in Ch9 (similar for Ch10) actual numbering in the code to be changed in jan05
239 Int_t n9[4] = { 0, 0, 0, 3 };
240 slatseg[9]->SetPcbBoards(n9);
241 slatseg[9]->Init(0); // 0 detection element id
243 // Type 330000 for 706, 707, 719, 720 in Ch7 (similar for Ch8) for the futur official numbering
244 // Type 330000 for 700, 712, 750, 762 in Ch7 (similar for Ch8) actual numbering in the code to be changed in jan05
245 Int_t n10[4] = { 0, 0, 0, 2 };
246 slatseg[10]->SetPcbBoards(n10);
247 slatseg[10]->Init(0); // 0 detection element id
249 // Type 222333 for 903, 910, 916, 923 in Ch9 (similar for Ch10) for the futur official numbering
250 // Type 222333 for 903, 909, 953, 959 in Ch9 (similar for Ch10) actual numbering in the code to be changed in jan05
251 Int_t n11[4] = { 0, 0, 3, 3 };
252 slatseg[11]->SetPcbBoards(n11);
253 slatseg[11]->Init(0); // 0 detection element id
255 // Type 223330 for 904, 909, 917, 922 in Ch9 (similar for Ch10) for the futur official numbering
256 // Type 223330 for 902, 910, 952, 960 in Ch9 (similar for Ch10) actual numbering in the code to be changed in jan05
257 Int_t n12[4] = { 0, 0, 2, 3 };
258 slatseg[12]->SetPcbBoards(n12);
259 slatseg[12]->Init(0); // 0 detection element id
261 // Type 333300 for 905, 908, 918, 921 in Ch9 (similar for Ch10) for the futur official numbering
262 // Type 333300 for 901, 911, 951, 961 in Ch9 (similar for Ch10) actual numbering in the code to be changed in jan05
263 Int_t n13[4] = { 0, 0, 0, 4 };
264 slatseg[13]->SetPcbBoards(n13);
265 slatseg[13]->Init(0); // 0 detection element id
268 //Loop for St3 (only segmentation for bending plane)
269 for (Int_t i=0; i<2; i++) {
270 // Create chamber segmentations
272 AliMUONGeometrySegmentation*
273 st3seg = new AliMUONGeometrySegmentation(muon->Chamber(chamber).GetGeometry());
275 Int_t id0=(chamber+1)*100;
277 st3seg->Add(id0, slatseg[3]);
278 st3seg->Add(id0+ 8, slatseg[3]);
279 st3seg->Add(id0+50, slatseg[3]);
280 st3seg->Add(id0+58, slatseg[3]);
282 st3seg->Add(id0+ 1, slatseg[2]);
283 st3seg->Add(id0+ 7, slatseg[2]);
284 st3seg->Add(id0+51, slatseg[2]);
285 st3seg->Add(id0+57, slatseg[2]);
287 st3seg->Add(id0+ 2, slatseg[1]);
288 st3seg->Add(id0+ 6, slatseg[1]);
289 st3seg->Add(id0+52, slatseg[1]);
290 st3seg->Add(id0+56, slatseg[1]);
292 st3seg->Add(id0+ 3, slatseg[0]);
293 st3seg->Add(id0+ 4, slatseg[0]);
294 st3seg->Add(id0+ 5, slatseg[0]);
295 st3seg->Add(id0+53, slatseg[0]);
296 st3seg->Add(id0+54, slatseg[0]);
297 st3seg->Add(id0+55, slatseg[0]);
299 // if (i == 0) DrawSegmentation(chamber,st3seg);
301 if (chamberId == chamber) return st3seg;
304 //Loop for St4 (only segmentation for bending plane)
305 for (Int_t i=0; i<2; i++) {
306 // Create chamber segmentations
308 AliMUONGeometrySegmentation* st4seg = new AliMUONGeometrySegmentation(muon->Chamber(chamber).GetGeometry());
310 Int_t id0=(chamber+1)*100;
312 st4seg->Add(id0+ 6, slatseg[4]);
313 st4seg->Add(id0+56, slatseg[4]);
315 st4seg->Add(id0+ 5, slatseg[5]);
316 st4seg->Add(id0+ 7, slatseg[5]);
317 st4seg->Add(id0+55, slatseg[5]);
318 st4seg->Add(id0+57, slatseg[5]);
320 st4seg->Add(id0+ 4, slatseg[6]);
321 st4seg->Add(id0+ 8, slatseg[6]);
322 st4seg->Add(id0+54, slatseg[6]);
323 st4seg->Add(id0+58, slatseg[6]);
325 st4seg->Add(id0+ 3, slatseg[7]);
326 st4seg->Add(id0+ 9, slatseg[7]);
327 st4seg->Add(id0+53, slatseg[7]);
328 st4seg->Add(id0+59, slatseg[7]);
330 st4seg->Add(id0+ 2, slatseg[8]);
331 st4seg->Add(id0+10, slatseg[8]);
332 st4seg->Add(id0+52, slatseg[8]);
333 st4seg->Add(id0+60, slatseg[8]);
335 st4seg->Add(id0+ 1, slatseg[9]);
336 st4seg->Add(id0+11, slatseg[9]);
337 st4seg->Add(id0+51, slatseg[9]);
338 st4seg->Add(id0+61, slatseg[9]);
340 st4seg->Add(id0 , slatseg[10]);
341 st4seg->Add(id0+12, slatseg[10]);
342 st4seg->Add(id0+50, slatseg[10]);
343 st4seg->Add(id0+62, slatseg[10]);
345 // if (i == 0) DrawSegmentation(chamber,st4seg);
347 if (chamberId == chamber) return st4seg;
350 //Loop for St5 (only segmentation for bending plane)
351 for (Int_t i=0; i<2; i++) {
352 // Create chamber segmentations
354 AliMUONGeometrySegmentation* st5seg
355 = new AliMUONGeometrySegmentation(muon->Chamber(chamber).GetGeometry());
357 Int_t id0=(chamber+1)*100;
359 st5seg->Add(id0+ 6, slatseg[4]);
360 st5seg->Add(id0+56, slatseg[4]);
362 st5seg->Add(id0+ 4, slatseg[5]);
363 st5seg->Add(id0+ 5, slatseg[5]);
364 st5seg->Add(id0+ 7, slatseg[5]);
365 st5seg->Add(id0+ 8, slatseg[5]);
366 st5seg->Add(id0+54, slatseg[5]);
367 st5seg->Add(id0+55, slatseg[5]);
368 st5seg->Add(id0+57, slatseg[5]);
369 st5seg->Add(id0+58, slatseg[5]);
371 st5seg->Add(id0+ 3, slatseg[11]);
372 st5seg->Add(id0+ 9, slatseg[11]);
373 st5seg->Add(id0+53, slatseg[11]);
374 st5seg->Add(id0+59, slatseg[11]);
376 st5seg->Add(id0+ 2, slatseg[12]);
377 st5seg->Add(id0+10, slatseg[12]);
378 st5seg->Add(id0+52, slatseg[12]);
379 st5seg->Add(id0+60, slatseg[12]);
381 st5seg->Add(id0+ 1, slatseg[13]);
382 st5seg->Add(id0+11, slatseg[13]);
383 st5seg->Add(id0+51, slatseg[13]);
384 st5seg->Add(id0+61, slatseg[13]);
386 st5seg->Add(id0 , slatseg[9]);
387 st5seg->Add(id0+12, slatseg[9]);
388 st5seg->Add(id0+50, slatseg[9]);
389 st5seg->Add(id0+62, slatseg[9]);
391 // if (i == 0) DrawSegmentation(chamber,st5seg);
393 if (chamberId == chamber) return st5seg;
396 AliWarning(Form("Segmentation for chamber %d , cathod %d is not yet defined",
405 //______________________________________________________________________________
406 AliMUONGeometrySegmentation*
407 AliMUONTest::CreateSegmentation(Int_t chamberId, Int_t cath)
409 // Create geometry segmentation for the specified chamber and cathod
416 return CreateSt1Segmentation(chamberId, cath);
422 AliWarning("Not yet implemented");
433 return CreateSlatSegmentation(chamberId, cath);
441 //return CreateTriggerSegmentation(chamberId, cath);
442 AliWarning("Not yet implemented");
447 AliWarning("Wrong chamber Id");
453 //______________________________________________________________________________
454 void AliMUONTest::DetElemTransforms()
457 AliMUON* muon = (AliMUON*)gAlice->GetModule("MUON");
459 AliFatal("MUON detector not defined.");
463 // Loop over chambers
464 for (Int_t i=0; i<AliMUONConstants::NCh(); i++) {
466 AliMUONGeometryModule* geometry = muon->Chamber(i).GetGeometry();
467 AliMUONGeometryStore* detElements = geometry->GetDetElementStore();
469 // Loop over detection elements
470 for (Int_t j=0; j<detElements->GetNofEntries(); j++) {
472 //Int_t detElemId = geometry->GetDetElemId(j);
473 Int_t detElemId = detElements->GetEntry(j)->GetUniqueID();
474 cout << "Detection element Id: " << detElemId << endl;
477 geometry->Local2Global(detElemId, 0., 0., 0., x, y, z);
478 cout << " Global DE position: "
479 << x << ", " << y << ", " << z << endl;
482 geometry->Global2Local(detElemId, 0., 0., 0., x2, y2, z2);
483 cout << " ALIC center in the local frame: "
484 << x2 << ", " << y2 << ", " << z2 << endl;
487 geometry->Global2Local(detElemId, x, y, z, x3, y3, z3);
488 cout << " Back in the local frame: "
489 << x3 << ", " << y3 << ", " << z3 << endl;
495 //________________________________________________________________________
496 void AliMUONTest::PrintPadPositionsOld()
498 // Iterate over all old chamber segmentations and prints
499 // global pad positions
501 AliMUON* muon = (AliMUON*)gAlice->GetModule("MUON");
503 AliFatal("MUON detector not defined.");
507 // Loop over chambers
508 for (Int_t i=0; i<1; i++) {
510 // Create chamber segmentations
511 AliSegmentation* seg[2];
512 seg[0] = muon->Chamber(i).SegmentationModel(0);
513 seg[1] = muon->Chamber(i).SegmentationModel(1);
515 // Iterate over the whole plane and return pad indices and
516 // global/local positions
517 cout << "Go to loop over pads" << endl;
518 for (Int_t cath=0; cath<2; cath++) {
520 cout << setw(6) << "Pads in chamber " << i << " cathod " << cath << endl;
521 cout << "===================================" << endl;
526 for ( seg[cath]->FirstPad(70., 70., 0., 80., 80.);
527 seg[cath]->MorePads();
528 seg[cath]->NextPad() )
530 cout << setw(6) << "counter " << counter++ << " ";
532 Int_t ix = seg[cath]->Ix();
533 Int_t iy = seg[cath]->Iy();
534 cout << "Pad indices: ( " << ix << ", " << iy << " ) " ;
537 seg[cath]->GetPadC(ix, iy, x, y, z);
538 cout << "Pad position: ( " << x << ", " << y << ", " << z << " )" << endl;
546 //______________________________________________________________________________
547 void AliMUONTest::ForWhole(AliMUONTests testCase)
549 // Perform test for all chambers and first cathod
551 AliMUON* muon = (AliMUON*)gAlice->GetModule("MUON");
553 AliFatal("MUON detector not defined.");
560 // Loop over chambers
561 for (Int_t iChamber=0; iChamber<AliMUONConstants::NCh(); iChamber++) {
564 //for (Int_t cath=0; cath<2; cath++) {
565 for (Int_t cath=0; cath<1; cath++) {
567 AliMUONGeometrySegmentation* segmentation
568 = CreateSegmentation(iChamber, cath);
570 if (!segmentation) continue;
572 cout << setw(6) << "Pads in chamber " << iChamber
573 << " cathod " << cath << endl;
574 cout << "===================================" << endl;
576 ForSegmentation(testCase, segmentation);
578 //if (testCase == kDrawPads) {
586 //______________________________________________________________________________
587 void AliMUONTest::ForSegmentation(AliMUONTests testCase,
588 AliMUONGeometrySegmentation *segmentation)
590 // Perform test for a given segmentation
597 // Loop over detection elements
599 AliMUONGeometryStore* detElements
600 = segmentation->GetGeometry()->GetDetElementStore();
602 for (Int_t j=0; j<detElements->GetNofEntries(); j++) {
604 Int_t detElemId = detElements->GetEntry(j)->GetUniqueID();
605 cout << "Detection element id: " << detElemId << endl;
607 ForDetElement(testCase, detElemId, segmentation);
616 //______________________________________________________________________________
617 void AliMUONTest::ForDetElement(AliMUONTests testCase,
619 AliMUONGeometrySegmentation *segmentation)
621 // Prints global pad positions for given detection element
622 // in a given geometry segmentation
627 // Loop over pads in a detection element
630 for(Int_t ix=1; ix<=segmentation->Npx(detElemId); ix++)
631 for(Int_t iy=1; iy<=segmentation->Npy(detElemId); iy++)
636 PrintPad(counter, detElemId, ix, iy, segmentation);
640 DrawPad(counter, detElemId, ix, iy, segmentation);
646 //______________________________________________________________________________
647 void AliMUONTest::Before(AliMUONTests testCase)
649 // Do some initialization if necessary
658 fCanvas = new TCanvas("c1","c1", 0, 0, 600, 600);
659 fCanvas->Range(-300,-300, 300, 300);
666 //______________________________________________________________________________
667 void AliMUONTest::After(AliMUONTests testCase)
669 // Do some cleanup if necessary
678 cout << "Print any key + enter to continue ..." << endl;
686 //______________________________________________________________________________
687 void AliMUONTest::PrintPad(Int_t& counter,
688 Int_t detElemId, Int_t ix, Int_t iy,
689 AliMUONGeometrySegmentation* segmentation)
691 // Prints global pad positions for the given pad
695 = segmentation->GetPadC(detElemId, ix, iy, x, y, z);
697 if (!success) return;
699 cout << setw(6) << "counter " << counter++ << " ";
700 cout << "Pad indices: ( " << detElemId << "; " << ix << ", " << iy << " ) " ;
701 cout << "Pad position: ( " << x << ", " << y << ", " << z << " )" << endl;
704 //______________________________________________________________________________
705 void AliMUONTest::DrawPad(Int_t& counter,
706 Int_t detElemId, Int_t ix, Int_t iy,
707 AliMUONGeometrySegmentation* segmentation)
709 // Prints global pad positions for the given pad
713 = segmentation->GetPadC(detElemId, ix, iy, x, y, z);
715 if (!success) return;
717 // PrintPad(counter,detElemId, ix, iy, segmentation);
721 Int_t sector = segmentation->Sector(detElemId, ix, iy);
722 Float_t dpx = segmentation->Dpx(detElemId, sector);
723 Float_t dpy = segmentation->Dpy(detElemId, sector);
725 //printf(" ***** Pad position is ix: %d iy: %d x: %f y: %f sector: %d dpx: %f dpy: %f \n",
726 // ix, iy, x, y, sector, dpx, dpy);
729 TPave* pave = new TPave(x-dpx/2., y-dpy/2., x+dpx/2., y+dpy/2., 1);
733 //______________________________________________________________________________
734 void AliMUONTest::DrawSegmentation(Int_t chamber, AliMUONGeometrySegmentation *seg)
742 // TH2F * frame = new TH2F(" "," ",10,-10.,245.,10, -5., 45.);
743 TH2F * frame = new TH2F(" "," ",10,-300.,300.,10, -300., 300.);
744 // TH2F * frame = new TH2F(" "," ",10,-300.,300.,10, -25., 25.);
746 // (new TPave( 0., 0., 40., 40.,2))->Draw();
747 // (new TPave( 40., 0., 80., 40.,2))->Draw();
748 // (new TPave( 80., 0.,120., 40.,2))->Draw();
749 // (new TPave(120., 0.,160., 40.,2))->Draw();
750 // (new TPave(160., 0.,200., 40.,2))->Draw();
751 // (new TPave(200., 0.,240., 40.,2))->Draw();
753 for (Int_t iDE = 0; iDE < 13; iDE++) {
755 for (Int_t side = 0; side < 2; side++) {
757 deId = (chamber+1)*100+iDE;
759 deId = (chamber+1)*100+50+iDE;
762 // for ( seg->FirstPad(detElementId, 0., 0., 0., 100., 100.);
763 // seg->MorePads(detElementId);
764 // seg->NextPad(detElementId) ) {
765 for(ix=1; ix<=seg->Npx(deId); ix++) {
766 for(iy=1; iy<=seg->Npy(deId); iy++) {
768 seg->GetPadC(deId, ix, iy, x, y, z);
769 Int_t sector = seg->Sector(deId, ix, iy);
770 dpx = seg->Dpx(deId,sector);
771 dpy = seg->Dpy(deId,sector);
773 //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);
774 (new TPave(x-dpx/2., y-dpy/2., x+dpx/2., y+dpy/2., 1))->Draw();