]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/AliMUONSegmentationV01.cxx
Message commented out
[u/mrichter/AliRoot.git] / MUON / AliMUONSegmentationV01.cxx
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 /////////////////////////////////////////////////////
19 //  Segmentation and Response classes version 01   //
20 /////////////////////////////////////////////////////
21
22 #include <TBox.h> 
23 #include <TTUBE.h>
24 #include <TBRIK.h>
25 #include <TNode.h>  
26 #include <TGeometry.h>  
27 #include <TF1.h> 
28 #include <TVector3.h> 
29 #include <TObjArray.h>
30
31 #include "AliMUONSegmentationV01.h"
32 #include "AliMUON.h"
33 #include "AliMUONChamber.h"
34 #include "AliRun.h"
35 #include "AliLog.h"
36
37
38
39 //___________________________________________
40 ClassImp(AliMUONSegmentationV01)
41
42 AliMUONSegmentationV01::AliMUONSegmentationV01(const AliMUONSegmentationV01& segmentation)
43   : AliMUONSegmentationV0(segmentation)
44 {
45 // Protected copy constructor
46
47   AliFatal("Not implemented.");
48 }
49
50 AliMUONSegmentationV01::AliMUONSegmentationV01() 
51   : AliMUONSegmentationV0()
52 {
53 // Default constructor
54     fRSec = 0;
55     fNDiv = 0;      
56     fDpxD = 0;
57     fCorrA = 0;
58     fSector = -1;
59 }
60
61 AliMUONSegmentationV01::AliMUONSegmentationV01(Int_t nsec) 
62   : AliMUONSegmentationV0()
63 {
64 //  Non default constructor
65
66     fNsec = nsec;
67     fRSec = new TArrayF(fNsec);
68     fNDiv = new TArrayI(fNsec);      
69     fDpxD = new TArrayF(fNsec);      
70
71
72     (*fRSec)[0]=(*fRSec)[1]=(*fRSec)[2]=(*fRSec)[3]=0;     
73     (*fNDiv)[0]=(*fNDiv)[1]=(*fNDiv)[2]=(*fNDiv)[3]=0;     
74     (*fDpxD)[0]=(*fDpxD)[1]=(*fDpxD)[2]=(*fDpxD)[3]=0;     
75     fCorrA = new TObjArray(3);
76     fCorrA->AddAt(0,0);
77     fCorrA->AddAt(0,1);
78     fCorrA->AddAt(0,2);
79     fOffsetY=0;
80     fSector = -1;
81
82
83 AliMUONSegmentationV01::~AliMUONSegmentationV01() 
84 {
85 // Destructor
86     if (fRSec) delete fRSec;
87     if (fNDiv) delete fNDiv;
88     if (fDpxD) delete fDpxD;
89     if (fCorrA) {
90         fCorrA->Delete();
91         delete fCorrA;
92     }
93
94
95
96 Float_t AliMUONSegmentationV01::Dpx(Int_t isec) const
97 {
98 //
99 // Returns x-pad size for given sector isec
100    Float_t dpx = (*fDpxD)[isec];
101    return dpx;
102 }
103
104 Float_t AliMUONSegmentationV01::Dpy(Int_t /*isec*/) const
105 {
106 //
107 // Returns y-pad size for given sector isec
108    return fDpy;
109 }
110     
111 void   AliMUONSegmentationV01::SetSegRadii(Float_t  r[4])
112 {
113 //
114 // Set the radii of the segmentation zones 
115     for (Int_t i=0; i<4; i++) {
116         (*fRSec)[i]=r[i];
117     }
118 }
119
120
121 void AliMUONSegmentationV01::SetPadDivision(Int_t ndiv[4])
122 {
123 //
124 // Defines the pad size perp. to the anode wire (y) for different sectors. 
125 // Pad sizes are defined as integral fractions ndiv of a basis pad size
126 // fDpx
127 // 
128     for (Int_t i=0; i<4; i++) {
129         (*fNDiv)[i]=ndiv[i];
130     }
131     ndiv[0]=ndiv[1];
132 }
133
134
135 void AliMUONSegmentationV01::Init(Int_t chamber)
136 {
137 //
138 //  Fill the arrays fCx (x-contour) and fNpxS (ix-contour) for each sector
139 //  These arrays help in converting from real to pad co-ordinates and
140 //  vice versa.
141 //  This version approximates concentric segmentation zones
142 //
143
144     Int_t isec;
145     //printf("\n Initialise Segmentation V01\n");
146
147
148     fNpy=Int_t((*fRSec)[fNsec-1]/fDpy)+1;
149
150     (*fDpxD)[fNsec-1]=fDpx;
151     if (fNsec > 1) {
152         for (Int_t i=fNsec-2; i>=0; i--){
153             (*fDpxD)[i]=(*fDpxD)[fNsec-1]/(*fNDiv)[i];
154         }
155     }
156 //
157 // fill the arrays defining the pad segmentation boundaries
158     Float_t ry;
159     Int_t   dnx;
160     Int_t   add;
161 //
162 //  loop over sections
163     for(isec=0; isec<fNsec; isec++) {
164 //  
165 //  loop over pads along the aode wires
166         for (Int_t iy=1; iy<=fNpy; iy++) {
167 //
168             Float_t x=iy*fDpy-fDpy/2;
169             if (x > (*fRSec)[isec]) {
170                 fNpxS[isec][iy]=0;
171                 fCx[isec][iy]=0;
172             } else {
173                 ry=TMath::Sqrt((*fRSec)[isec]*(*fRSec)[isec]-x*x);
174                 if (isec > 1) {
175                     dnx= Int_t((ry-fCx[isec-1][iy])/(*fDpxD)[isec]);
176                     if (isec < fNsec-1) {
177                         if (TMath::Odd((Long_t)dnx)) dnx++;             
178                     }
179                     fNpxS[isec][iy]=fNpxS[isec-1][iy]+dnx;
180                     fCx[isec][iy]=fCx[isec-1][iy]+dnx*(*fDpxD)[isec];
181                 } else if (isec == 1) {
182                     dnx= Int_t((ry-fCx[isec-1][iy])/(*fDpxD)[isec]);
183                     fNpxS[isec][iy]=fNpxS[isec-1][iy]+dnx;
184                     add=4 - (fNpxS[isec][iy])%4;
185                     if (add < 4) fNpxS[isec][iy]+=add; 
186                     dnx=fNpxS[isec][iy]-fNpxS[isec-1][iy];
187                     fCx[isec][iy]=fCx[isec-1][iy]+dnx*(*fDpxD)[isec];
188                 } else {
189                     dnx=Int_t(ry/(*fDpxD)[isec]);
190                     fNpxS[isec][iy]=dnx;
191                     fCx[isec][iy]=dnx*(*fDpxD)[isec];
192                 }
193             }
194         } // y-pad loop
195     } // sector loop
196
197 // reference to chamber
198     AliMUON *pMUON  = (AliMUON *) gAlice->GetModule("MUON");
199     fChamber=&(pMUON->Chamber(chamber));
200     fRmin=fChamber->RInner();
201     fRmax=fChamber->ROuter();    
202     fCorr=0;
203     fZ = fChamber->Z();
204     fId=chamber;
205 }
206
207 //______________________________________________________________________
208 Int_t AliMUONSegmentationV01::Sector(Int_t ix, Int_t iy)
209 {
210 // Returns sector number for given pad position
211 //
212     Int_t absix=TMath::Abs(ix);
213     Int_t absiy=TMath::Abs(iy);
214     Int_t isec=0;
215     for (Int_t i=0; i<fNsec; i++) {
216         if (absix<=fNpxS[i][absiy]){
217             isec=i;
218             break;
219         }
220     }
221     return isec;
222 }
223
224 //______________________________________________________________________
225 void AliMUONSegmentationV01::GetPadI(Float_t x, Float_t y, Int_t &ix, Int_t &iy)
226 {
227 //  Returns pad coordinates (ix,iy) for given real coordinates (x,y)
228 //
229     iy = (y-fOffsetY >0)? 
230       Int_t((y-fOffsetY)/fDpy)+1 
231       : 
232       Int_t((y-fOffsetY)/fDpy)-1;
233   
234     if (iy >  fNpy) iy= fNpy;
235     if (iy < -fNpy) iy=-fNpy;
236 //
237 //  Find sector isec
238     Int_t isec=-1;
239     Float_t absx=TMath::Abs(x);
240     Int_t absiy=TMath::Abs(iy);
241     for (Int_t i=0; i < fNsec; i++) {
242         if (absx <= fCx[i][absiy]) {
243             isec=i;
244             break;
245         }
246     }
247     if (isec>0) {
248         ix= Int_t((absx-fCx[isec-1][absiy])/(*fDpxD)[isec])
249             +fNpxS[isec-1][absiy]+1;
250     } else if (isec == 0) {
251         ix= Int_t(absx/(*fDpxD)[isec])+1;
252     } else {
253         ix=fNpxS[fNsec-1][absiy]+1;     
254     }
255     ix = (x>0) ? ix:-ix;
256 }
257 //________________________________________________________________
258 void AliMUONSegmentationV01::GetPadI(Float_t x, Float_t y , Float_t /*z*/, Int_t &ix, Int_t &iy) 
259 {
260   GetPadI(x, y, ix, iy);
261 }
262 //________________________________________________________________
263
264 void AliMUONSegmentationV01::
265 GetPadC(Int_t ix, Int_t iy, Float_t &x, Float_t &y)
266 {
267 //  Returns real coordinates (x,y) for given pad coordinates (ix,iy)
268 //
269     y = (iy>0) ?
270       Float_t(iy*fDpy)-fDpy/2.+fOffsetY
271       :
272       Float_t(iy*fDpy)+fDpy/2.+fOffsetY; 
273
274 //
275 //  Find sector isec
276     Int_t isec=AliMUONSegmentationV01::Sector(ix,iy);
277 //
278     Int_t absix=TMath::Abs(ix);
279     Int_t absiy=TMath::Abs(iy);
280     if (isec) {
281         x=fCx[isec-1][absiy]+(absix-fNpxS[isec-1][absiy])*(*fDpxD)[isec];
282         x=(ix>0) ?  x-(*fDpxD)[isec]/2 : -x+(*fDpxD)[isec]/2;
283     } else {
284         x=y=0;
285     }
286
287 }
288 //________________________________________________________________
289
290 void AliMUONSegmentationV01::
291 GetPadC(Int_t ix, Int_t iy, Float_t &x, Float_t &y, Float_t &z)
292 {
293 //  Returns real coordinates (x,y,z) for given pad coordinates (ix,iy)
294 //
295   GetPadC(ix,iy,x,y); 
296     
297   // To be properly interfaced with chamber geometry (AliMUONSt1GeometryBuilderV2) ???
298   TVector3 scale[4];  
299   scale[0] = TVector3( 1,  1,  1);  // quadrant I
300   scale[1] = TVector3(-1,  1, -1);  // quadrant II
301   scale[2] = TVector3(-1, -1,  1);  // quadrant III
302   scale[3] = TVector3( 1, -1, -1);  // quadrant IV
303
304   Int_t iQuadrant;
305   
306   if (ix > 0) {
307     if (iy > 0) {
308       iQuadrant = 0;
309     } else {
310       iQuadrant = 3;
311     }
312   } else {
313     if (iy > 0) {
314       iQuadrant = 1;
315     } else {
316       iQuadrant = 2;
317     }
318   }      
319   if (TMath::Abs(fZ) <  600) {
320     z = fZ + scale[iQuadrant].Z()*6.5/2.; // Station 1
321   } else {
322     z = fZ;  // Station 2
323   }
324 }
325
326 void AliMUONSegmentationV01::
327 SetPad(Int_t ix, Int_t iy)
328 {
329     //
330     // Sets virtual pad coordinates, needed for evaluating pad response 
331     // outside the tracking program 
332     GetPadC(ix,iy,fX,fY);
333     fSector=Sector(ix,iy);
334 }
335
336 //______________________________________________________________________
337 void AliMUONSegmentationV01::FirstPad(Float_t xhit, Float_t yhit, Float_t dx, Float_t dy)
338 {
339 // Initialises iteration over pads for charge distribution algorithm
340 //
341     //
342     // Find the wire position (center of charge distribution)
343     Float_t x0a=GetAnod(xhit);
344     fXhit=x0a;
345     fYhit=yhit;
346     
347     //
348     // and take fNsigma*sigma around this center
349     Float_t x01=x0a  - dx;
350     Float_t x02=x0a  + dx;
351     Float_t y01=yhit - dy;
352     Float_t y02=yhit + dy;
353     //
354     // find the pads over which the charge distributes
355
356     GetPadI(x01,y01,fIxmin,fIymin);
357     GetPadI(x02,y02,fIxmax,fIymax);
358     fXmin=x01;
359     fXmax=x02;
360     fYmin=y01;
361     fYmax=y02;
362     
363     // 
364     // Set current pad to lower left corner
365     if (fIxmax < fIxmin) fIxmax=fIxmin;
366     if (fIymax < fIymin) fIymax=fIymin;    
367     fIx=fIxmin;
368     fIy=fIymin;
369     GetPadC(fIx,fIy,fX,fY);
370
371     // added 
372     if (fSector == -1) {
373       fSector=Sector(fIx,fIy);
374     }
375 }
376
377
378 void AliMUONSegmentationV01::NextPad()
379 {
380 // Stepper for the iteration over pads
381 //
382 // Step to next pad in the integration region
383   // 
384   // Step to next pad in integration region
385     Float_t xc,yc;
386     Int_t   iyc;
387     
388 //  step from left to right    
389
390     if (fX < fXmax && fX != 0) {
391         if (fIx==-1) fIx++;
392         fIx++;
393 //  step up 
394     } else if (fIy != fIymax) {
395         if (fIy==-1) fIy++;
396         fIy++;
397 //      get y-position of next row (yc), xc not used here       
398         GetPadC(fIx,fIy,xc,yc);
399 //      get x-pad coordiante for first pad in row (fIx)
400         GetPadI(fXmin,yc,fIx,iyc);
401     } else {
402         fIx=-1;
403         fIy=-1;
404     }
405     GetPadC(fIx,fIy,fX,fY);
406     fSector=Sector(fIx,fIy);
407     if (MorePads() && 
408         (fSector ==-1 || fSector==0)) 
409         NextPad();
410 }
411
412 Int_t AliMUONSegmentationV01::MorePads()
413
414 {
415 // Stopping condition for the iterator over pads
416 //
417 // Are there more pads in the integration region
418     return  (fIx != -1  || fIy != -1);
419 /*
420     if ((fX >= fXmax  && fIy >= fIymax) || fY==0) {
421         return 0;
422     } else {
423         return 1;
424     }
425 */
426 }
427 //______________________________________________________________________
428 void AliMUONSegmentationV01::FirstPad(Float_t xhit, Float_t yhit, Float_t /*zhit*/, Float_t dx, Float_t dy)
429 {
430   FirstPad(xhit, yhit, dx, dy);
431 }
432
433
434 void AliMUONSegmentationV01::
435 IntegrationLimits(Float_t& x1,Float_t& x2,Float_t& y1, Float_t& y2)
436 {
437 //  Returns integration limits for current pad
438 //
439     x1=fXhit-fX-Dpx(fSector)/2.;
440     x2=x1+Dpx(fSector);
441     y1=fYhit-fY-Dpy(fSector)/2.;
442     y2=y1+Dpy(fSector);    
443 }
444
445 void AliMUONSegmentationV01::
446 Neighbours(Int_t iX, Int_t iY, Int_t* Nlist, Int_t Xlist[10], Int_t Ylist[10])
447 {
448 // Returns list of next neighbours for given Pad (iX, iY)
449 //
450     const Float_t kEpsilon=fDpy/1000;
451     
452     Float_t x,y;
453     Int_t   ixx, iyy, isec1;
454 //
455     Int_t   isec0=AliMUONSegmentationV01::Sector(iX,iY);
456     Int_t i=0;
457 //    
458 //  step right
459     Xlist[i]=iX+1;
460     if (Xlist[i]==0) Xlist[i]++;
461     Ylist[i++]=iY;
462 //
463 //  step left    
464     Xlist[i]=iX-1;
465     if (Xlist[i]==0) Xlist[i]--;
466     Ylist[i++]=iY;
467 //
468 //  step up 
469     AliMUONSegmentationV01::GetPadC(iX,iY,x,y);
470     AliMUONSegmentationV01::GetPadI(x+kEpsilon,y+fDpy,ixx,iyy);
471     Xlist[i]=ixx;
472     Ylist[i++]=iyy;
473     isec1=AliMUONSegmentationV01::Sector(ixx,iyy);
474     if (isec1==isec0) {
475 //
476 //  no sector boundary crossing
477 //      Xlist[i]=ixx+1;
478 //      Ylist[i++]=iY+1;
479         
480 //      Xlist[i]=ixx-1;
481 //      Ylist[i++]=iY+1;
482     } else if (isec1 < isec0) {
483 // finer segmentation
484 //      Xlist[i]=ixx+1;
485 //      Ylist[i++]=iY+1;
486         
487         Xlist[i]=ixx-1;
488         Ylist[i++]=iyy;
489         
490 //      Xlist[i]=ixx-2;
491 //      Ylist[i++]=iY+1;
492     } else {
493 // coarser segmenation  
494 /*
495         if (TMath::Odd(iX-fNpxS[isec1-1][iY+1])) {
496             Xlist[i]=ixx-1;
497             Ylist[i++]=iY+1;
498         } else {
499             Xlist[i]=ixx+1;
500             Ylist[i++]=iY+1;
501         }
502 */
503     }
504
505 //
506 // step down 
507     AliMUONSegmentationV01::GetPadC(iX,iY,x,y);
508     AliMUONSegmentationV01::GetPadI(x+kEpsilon,y-fDpy,ixx,iyy);
509     Xlist[i]=ixx;
510     Ylist[i++]=iyy;
511     isec1=AliMUONSegmentationV01::Sector(ixx,iyy);
512     if (isec1==isec0) {
513 //
514 //  no sector boundary crossing
515 /*
516     Xlist[i]=ixx+1;
517     Ylist[i++]=iY-1;
518         
519     Xlist[i]=ixx-1;
520     Ylist[i++]=iY-1;
521 */
522     } else if (isec1 < isec0) {
523 // finer segmentation
524 //      Xlist[i]=ixx+1;
525 //      Ylist[i++]=iY-1;
526         
527         Xlist[i]=ixx-1;
528         Ylist[i++]=iyy;
529         
530 //      Xlist[i]=ixx-2;
531 //      Ylist[i++]=iY-1;
532     } else {
533 // coarser segmentation 
534 /*
535         if (TMath::Odd(iX-fNpxS[isec1-1][iY-1])) {
536             Xlist[i]=ixx-1;
537             Ylist[i++]=iY-1;
538         } else {
539             Xlist[i]=ixx+1;
540             Ylist[i++]=iY-1;
541         }
542 */
543     }
544     *Nlist=i;
545 }
546
547 void AliMUONSegmentationV01::GiveTestPoints(Int_t &n, Float_t *x, Float_t *y) const
548 {
549 // Returns test point on the pad plane.
550 // Used during determination of the segmoid correction of the COG-method
551
552     n=3;
553     x[0]=((*fRSec)[0]+(*fRSec)[1])/2/TMath::Sqrt(2.);
554     y[0]=x[0];
555     x[1]=((*fRSec)[1]+(*fRSec)[2])/2/TMath::Sqrt(2.);
556     y[1]=x[1];
557     x[2]=((*fRSec)[2]+(*fRSec)[3])/2/TMath::Sqrt(2.);
558     y[2]=x[2];
559 }
560
561 void AliMUONSegmentationV01::Draw(const char* opt)
562 {
563  
564 // Draws the segmentation zones
565 //
566   if (!strcmp(opt,"eventdisplay")) { 
567     const int kColorMUON  = kBlue;
568
569     TRotMatrix* rot000 = new TRotMatrix("Rot000"," ", 90,  0, 90, 90, 0, 0);
570     TRotMatrix* rot090 = new TRotMatrix("Rot090"," ", 90, 90, 90,180, 0, 0);
571     TRotMatrix* rot180 = new TRotMatrix("Rot180"," ", 90,180, 90,270, 0, 0);
572     TRotMatrix* rot270 = new TRotMatrix("Rot270"," ", 90,270, 90,  0, 0, 0);
573
574     char nameChamber[9], nameSense[9], nameFrame[9], nameNode[9];
575     char nameSense1[9], nameSense2[9];    
576     TNode *node, *nodeF;
577  
578     sprintf(nameChamber,"C_MUON%d",fId+1);
579     sprintf(nameSense,"S_MUON%d",fId+1);
580     sprintf(nameSense1,"S1_MUON%d",fId+1);
581     sprintf(nameSense2,"S2_MUON%d",fId+1);
582     sprintf(nameFrame,"F_MUON%d",fId+1);        
583
584     TNode* top=gAlice->GetGeometry()->GetNode("alice");
585
586     Float_t rmin = (*fRSec)[0]-3;
587     Float_t rmax = (*fRSec)[3]+3;
588     new TTUBE(nameChamber,"Mother","void",rmin,rmax,0.25,1.);
589     rmin = (*fRSec)[0];
590     rmax = (*fRSec)[3];
591     new TTUBE(nameSense,"Sens. region","void",rmin,rmax,0.25, 1.);
592     Float_t dx=(rmax-rmin)/2;
593     Float_t dy=3.;
594     Float_t dz=0.25;
595     TBRIK* frMUON = new TBRIK(nameFrame,"Frame","void",dx,dy,dz);
596     top->cd();
597     sprintf(nameNode,"MUON%d",100+fId+1);
598     node = new TNode(nameNode,"ChamberNode",nameChamber,0,0,fChamber->Z(),"");
599     node->SetLineColor(kColorMUON);
600     AliMUON *pMUON  = (AliMUON *) gAlice->GetModule("MUON");
601     (pMUON->Nodes())->Add(node);
602     node->cd();
603     sprintf(nameNode,"MUON%d",200+fId+1);
604     node = new TNode(nameNode,"Sens. Region Node",nameSense,0,0,0,"");
605     node->SetLineColor(kColorMUON);
606     node->cd();
607     Float_t dr=dx+rmin;
608     sprintf(nameNode,"MUON%d",300+fId+1);
609     nodeF = new TNode(nameNode,"Frame0",frMUON,dr, 0, 0,rot000,"");
610     nodeF->SetLineColor(kColorMUON);
611     node->cd();
612     sprintf(nameNode,"MUON%d",400+fId+1);
613     nodeF = new TNode(nameNode,"Frame1",frMUON,0 ,dr,0,rot090,"");
614     nodeF->SetLineColor(kColorMUON);
615     node->cd();
616     sprintf(nameNode,"MUON%d",500+fId+1);
617     nodeF = new TNode(nameNode,"Frame2",frMUON,-dr,0,0,rot180,"");
618     nodeF->SetLineColor(kColorMUON);
619     node  ->cd();
620     sprintf(nameNode,"MUON%d",600+fId+1);   
621     nodeF = new TNode(nameNode,"Frame3",frMUON,0,-dr,0,rot270,"");
622     nodeF->SetLineColor(kColorMUON);   
623   } else {
624     TBox *box;
625     
626     Float_t dx=0.95/fCx[3][1]/2;
627     Float_t dy=0.95/(Float_t(Npy()))/2;
628     Float_t x0,y0,x1,y1;
629     Float_t xc=0.5;
630     Float_t yc=0.5;
631     
632     for (Int_t iy=1; iy<Npy(); iy++) {
633       for (Int_t isec=0; isec<4; isec++) {
634         if (isec==0) {
635           x0=0;
636           x1=fCx[isec][iy]*dx;
637         } else {
638           x0=fCx[isec-1][iy]*dx;
639           x1=fCx[isec][iy]*dx;
640         }
641         y0=Float_t(iy-1)*dy;
642         y1=y0+dy;
643         box=new TBox(x0+xc,y0+yc,x1+xc,y1+yc);
644         box->SetFillColor(isec+1);
645         box->Draw();
646         
647         box=new TBox(-x1+xc,y0+yc,-x0+xc,y1+yc);
648         box->SetFillColor(isec+1);
649         box->Draw();
650         
651         box=new TBox(x0+xc,-y1+yc,x1+xc,-y0+yc);
652         box->SetFillColor(isec+1);
653         box->Draw();
654         
655         box=new TBox(-x1+xc,-y1+yc,-x0+xc,-y0+yc);
656         box->SetFillColor(isec+1);
657         box->Draw();
658       }
659     }
660   }
661 }
662 void AliMUONSegmentationV01::SetCorrFunc(Int_t isec, TF1* func)
663 {
664 // Set the correction function
665     fCorrA->AddAt(func,isec);
666 }
667
668 TF1* AliMUONSegmentationV01::CorrFunc(Int_t isec) const
669
670 // Get correction function
671   //PH    return (TF1*) (*fCorrA)[isec];
672     return (TF1*) fCorrA->At(isec);
673 }
674
675 AliMUONSegmentationV01& 
676 AliMUONSegmentationV01::operator =(const AliMUONSegmentationV01 & rhs)
677 {
678 // Protected assignement operator
679
680   if (this == &rhs) return *this;
681
682   AliFatal("Not implemented.");
683     
684   return *this;  
685 }
686