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