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