]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/AliMUONSegmentationV0.h
Adopt to const declaration of some of the methods in AliSegmentation.
[u/mrichter/AliRoot.git] / MUON / AliMUONSegmentationV0.h
1 #ifndef ALIMUONSEGMENTATIONV0_H
2 #define ALIMUONSEGMENTATIONV0_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice                               */
5
6 /* $Id$ */
7
8 #include "AliSegmentation.h"
9
10 class TF1;
11
12 //----------------------------------------------
13 //
14 // Chamber segmentation for homogeneously segmented circular chamber
15 //
16 class AliMUONSegmentationV0 :
17 public AliSegmentation {
18  public:
19     AliMUONSegmentationV0(){}
20     AliMUONSegmentationV0(const AliMUONSegmentationV0 & segmentation);
21     
22     virtual ~AliMUONSegmentationV0(){}
23     // Set Chamber Segmentation Parameters
24     //
25     // Pad size Dx*Dy 
26     virtual  void    SetPadSize(Float_t p1, Float_t p2);
27     // Anod Pitch
28     virtual  void    SetDAnod(Float_t D) {fWireD = D;};
29     // Transform from pad (wire) to real coordinates and vice versa
30     //
31     // Anod wire coordinate closest to xhit
32     virtual Float_t GetAnod(Float_t xhit) const;
33     // Transform from pad to real coordinates
34     virtual void    GetPadI(Float_t x, Float_t y , Int_t &ix, Int_t &iy) ;
35     virtual void    GetPadI(Float_t x, Float_t y , Float_t z, Int_t &ix, Int_t &iy)  
36         {GetPadI(x, y, ix, iy);}
37     // Transform from real to pad coordinates
38     virtual void    GetPadC(Int_t ix, Int_t iy, Float_t &x, Float_t &y) ;
39     virtual void    GetPadC(Int_t ix, Int_t iy, Float_t &x, Float_t &y, Float_t &z) 
40         {z=0; GetPadC(ix, iy, x , y);}
41     //
42     // Initialisation
43     virtual void Init(Int_t chamber);
44     //
45     // Get member data
46     //
47     // Pad size in x
48     virtual Float_t Dpx() const {return fDpx;}
49     // Pad size in y
50     virtual Float_t Dpy() const {return fDpy;}
51     // Pad size in x by Sector
52     virtual Float_t Dpx(Int_t) const {return fDpx;}
53     // Pad size in y by Secto
54     virtual Float_t Dpy(Int_t) const {return fDpy;}
55     // Maximum number of Pads in x
56     virtual Int_t   Npx() const {return fNpx;}
57     // Maximum number of Pads in y
58     virtual Int_t   Npy() const {return fNpy;}
59     // Set pad position
60     virtual void     SetPad(Int_t ix, Int_t iy);
61     // Set hit position
62     virtual void     SetHit(Float_t xhit, Float_t yhit);
63     virtual void     SetHit(Float_t xhit, Float_t yhit, Float_t zhit)
64         {SetHit(xhit, yhit);}
65     //
66     // Iterate over pads
67     // Initialiser
68     virtual void  FirstPad(Float_t xhit, Float_t yhit, Float_t dx, Float_t dy);
69     virtual void  FirstPad(Float_t xhit, Float_t yhit, Float_t zhit, Float_t dx, Float_t dy)
70         {FirstPad(xhit, yhit, dx, dy);}
71     // Stepper
72     virtual void  NextPad();
73     // Condition
74     virtual Int_t MorePads();
75     //
76     // Distance between 1 pad and a position
77     virtual Float_t Distance2AndOffset(Int_t iX, Int_t iY, Float_t X, Float_t Y, Int_t *
78 dummy);
79     // Number of pads read in parallel and offset to add to x 
80     // (specific to LYON, but mandatory for display)
81     virtual void GetNParallelAndOffset(Int_t iX, Int_t iY,
82         Int_t *Nparallel, Int_t *Offset) {*Nparallel=1;*Offset=0;}
83     // Get next neighbours 
84     virtual void Neighbours
85         (Int_t iX, Int_t iY, Int_t* Nlist, Int_t Xlist[10], Int_t Ylist[10]) ;
86     //
87     // Current Pad during Integration
88     // x-coordinaten
89     virtual Int_t  Ix() {return fIx;}
90     // y-coordinate
91     virtual Int_t  Iy() {return fIy;}
92     // current sector
93     virtual Int_t  ISector() const {return 1;}
94     // calculate sector from pad coordinates
95     virtual Int_t  Sector(Int_t ix, Int_t iy)  {return 1;}
96     //
97     // Signal Generation Condition during Stepping
98     virtual Int_t SigGenCond(Float_t x, Float_t y, Float_t z) ;
99     // Initialise signal gneration at coord (x,y,z)
100     virtual void  SigGenInit(Float_t x, Float_t y, Float_t z);
101     // Current integration limits
102     virtual void IntegrationLimits
103         (Float_t& x1, Float_t& x2, Float_t& y1, Float_t& y2);
104     // Test points for auto calibration
105     virtual void GiveTestPoints(Int_t &n, Float_t *x, Float_t *y) const;
106     // Draw segmentation zones
107     virtual void Draw(const char *opt="") const;
108     // Function for systematic corrections
109     // Set the correction function
110     virtual void SetCorrFunc(Int_t dum, TF1* func) {fCorr=func;}
111     // Get the correction Function
112     virtual TF1* CorrFunc(Int_t) const {return fCorr;}
113     // assignment operator
114     AliMUONSegmentationV0& operator=(const AliMUONSegmentationV0& rhs);
115     
116     ClassDef(AliMUONSegmentationV0,1) //Class for homogeneous segmentation
117         protected:
118     //
119     // Implementation of the segmentation class:
120     // Version 0 models rectangular pads with the same dimensions all
121     // over the cathode plane. Chamber has circular geometry.
122     // 
123     //  Geometry parameters
124     //
125     Float_t    fDpx;           // x pad width per sector  
126     Float_t    fDpy;           // y pad base width
127     Int_t      fNpx;           // Number of pads in x
128     Int_t      fNpy;           // Number of pads in y
129     Float_t    fWireD;         // wire pitch
130     Float_t    fRmin;          // inner radius
131     Float_t    fRmax;          // outer radius
132     
133     
134     // Chamber region consideres during disintegration   
135     Int_t fIxmin; // lower left  x
136     Int_t fIxmax; // lower left  y
137     Int_t fIymin; // upper right x
138     Int_t fIymax; // upper right y 
139     //
140     // Current pad during integration (cursor for disintegration)
141     Int_t fIx;  // pad coord.  x 
142     Int_t fIy;  // pad coord.  y 
143     Float_t fX; // real coord. x
144     Float_t fY; // real ccord. y
145     //
146     // Current pad and wire during tracking (cursor at hit centre)
147     //
148     //
149     Float_t fXhit;  // x-position of hit
150     Float_t fYhit;  // y-position of hit
151     // Reference point to define signal generation condition
152     Int_t fIxt;     // pad coord. x
153     Int_t fIyt;     // pad coord. y
154     Int_t fIwt;     // wire number
155     Float_t fXt;    // x
156     Float_t fYt;    // y
157     TF1*    fCorr;  // correction function
158 };
159 #endif
160
161
162
163
164
165
166
167
168
169
170