1 #ifndef ALIMUONSEGMENTATIONV01_H
2 #define ALIMUONSEGMENTATIONV01_H
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
9 /////////////////////////////////////////////////////
10 // Segmentation and Response classes version 01 //
11 /////////////////////////////////////////////////////
15 #include "AliMUONSegmentationV0.h"
16 #include "TArrayI.h" // because the object, and not the pointer,
17 #include "TArrayF.h" // belongs to the class
20 class AliMUONSegmentationV01 :
21 public AliMUONSegmentationV0 {
23 AliMUONSegmentationV01();
24 AliMUONSegmentationV01(Int_t nsec);
25 AliMUONSegmentationV01(const AliMUONSegmentationV01 & segmentation);
27 virtual ~AliMUONSegmentationV01();
30 // Set Chamber Segmentation Parameters
32 virtual void SetPadDivision(Int_t ndiv[4]);
34 virtual void SetSegRadii(Float_t r[4]);
35 virtual void SetOffsetY(Float_t off) {fOffsetY = off;}
37 // Transform from pad (wire) to real coordinates and vice versa
39 // Transform from pad to real coordinates
40 virtual void GetPadI(Float_t x ,Float_t y ,Int_t &ix,Int_t &iy);
41 virtual void GetPadI(Float_t x, Float_t y , Float_t z, Int_t &ix, Int_t &iy)
42 {GetPadI(x, y, ix, iy);}
43 // Transform from real to pad coordinates
44 virtual void GetPadC(Int_t ix,Int_t iy,Float_t &x ,Float_t &y );
45 virtual void GetPadC(Int_t ix, Int_t iy, Float_t &x, Float_t &y, Float_t &z)
46 {z=fZ; GetPadC(ix, iy, x , y);}
49 virtual void Init(Int_t chamber);
53 // Pad size in x by Sector
54 virtual Float_t Dpx(Int_t isec) const;
55 // Pad size in y by Sector
56 virtual Float_t Dpy(Int_t isec) const;
57 // Max number of Pads in x
58 virtual Int_t Npx() const {return fNpxS[fNsec-1][1]+1;}
60 virtual void SetPad(Int_t ix,Int_t iy);
64 virtual void FirstPad(Float_t xhit, Float_t yhit, Float_t dx, Float_t dy);
65 virtual void FirstPad(Float_t xhit, Float_t yhit, Float_t zhit, Float_t dx, Float_t dy)
66 {FirstPad(xhit, yhit, dx, dy);}
68 virtual void NextPad();
70 virtual Int_t MorePads();
71 // Get next neighbours
72 virtual void Neighbours
73 (Int_t iX, Int_t iY, Int_t* Nlist, Int_t Xlist[10], Int_t Ylist[10]);
75 // Current Pad during Integration
77 virtual Int_t ISector() {return fSector;}
78 // calculate sector from pad coordinates
79 virtual Int_t Sector(Int_t ix, Int_t iy);
82 // Current integration limits
83 virtual void IntegrationLimits
84 (Float_t& x1, Float_t& x2, Float_t& y1, Float_t& y2);
85 // Test points for auto calibration
86 void GiveTestPoints(Int_t &n, Float_t *x, Float_t *y) const;
88 // Draw segmentation zones
89 virtual void Draw(const char *opt="") const;
90 // Function for systematic corrections
91 // Set the correction function
92 virtual void SetCorrFunc(Int_t dum, TF1* func);
93 // Get the correction function
94 virtual TF1* CorrFunc(Int_t iZone) const;
95 // assignment operator
96 AliMUONSegmentationV01& operator=(const AliMUONSegmentationV01& rhs);
97 ClassDef(AliMUONSegmentationV01,1) // Segmentation approximating circular zones with different pad size
101 Int_t fNsec; // Number of sectors
102 TArrayF* fRSec; // Sector outer radia
103 TArrayI* fNDiv; // Pad size division
104 TArrayF* fDpxD; // y pad width per sector
105 Float_t fOffsetY; // Staggering offset in y
107 Int_t fNpxS[10][1000]; // Number of pads per sector in x
108 Float_t fCx[10][1000]; // pad-sector contour x vs y
109 // Chamber region consideres during disintegration
110 // (lower left and upper right corner)
112 Float_t fXmin; // ! lower left x
113 Float_t fXmax; // ! lower left y
114 Float_t fYmin; // ! upper right x
115 Float_t fYmax; // ! upper right y
118 // Current pad during integration (cursor for disintegration)
119 Int_t fSector; // ! Current sector
121 TObjArray *fCorrA; // ! Array of correction functions