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