]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/AliMUONSt1Segmentation.h
Redefinition of data member corrected.
[u/mrichter/AliRoot.git] / MUON / AliMUONSt1Segmentation.h
1 #ifndef ALI_MUON_ST1_SEGMENTATION_H
2 #define ALI_MUON_ST1_SEGMENTATION_H
3
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5  * See cxx source for full Copyright notice                               */
6
7 /* $Id$ */
8
9 // Authors: David Guez, Ivana Hrivnacova, Marion MacCormick; IPN Orsay
10 //
11 // Class AliMUONSt1Segmentation
12 // -----------------------------
13 // Segmentation for MUON station 1 using the external 
14 // mapping package
15
16 #include "AliMpPlaneType.h"
17
18 #include "AliSegmentation.h"
19
20 class TObjArray;
21
22 class AliMpPlane;
23 class AliMpPlaneSegmentation;
24 class AliMpVPadIterator;
25 class AliMpPad;
26
27 class AliMUONChamber;
28
29 class AliMUONSt1Segmentation : public AliSegmentation 
30 {
31   public:
32     AliMUONSt1Segmentation(const AliMpPlaneType planeType);
33     AliMUONSt1Segmentation(const AliMUONSt1Segmentation& rhs);
34     AliMUONSt1Segmentation();
35     
36     virtual ~AliMUONSt1Segmentation();
37     
38     //    
39     // methods derived from base class    
40     // 
41
42     // Set Chamber Segmentation Parameters
43     //
44     virtual void SetPadSize(Float_t p1, Float_t p2);
45                        // Pad size Dx*Dy 
46     virtual void SetDAnod(Float_t D);
47                        // Anode Pitch
48
49     // Transform from pad (wire) to real coordinates and vice versa
50     //
51     virtual Float_t GetAnod(Float_t xhit) const;
52                        // Anode wire coordinate closest to xhit
53     virtual void  GetPadI(Float_t x, Float_t y, Float_t  z, Int_t& ix, Int_t& iy);
54     virtual void  GetPadI(Float_t x, Float_t y , Int_t &ix, Int_t &iy) ;
55                        // Transform from pad to real coordinates
56     virtual void  GetPadC(Int_t ix, Int_t iy, Float_t& x, Float_t& y, Float_t& z);
57     virtual void  GetPadC(Int_t ix, Int_t iy, Float_t& x, Float_t& y);
58                        // Transform from real to pad coordinates
59                       
60
61     // Initialisation
62     //
63     virtual void Init(Int_t chamber);
64  
65     // Get member data
66     //
67     virtual Float_t Dpx() const;
68     virtual Float_t Dpy() const;
69                       // Pad size in x, y 
70     virtual Float_t Dpx(Int_t isector) const;
71     virtual Float_t Dpy(Int_t isector) const;
72                       // Pad size in x, y by Sector 
73     virtual Int_t   Npx() const;
74     virtual Int_t   Npy() const;
75                       // Maximum number of Pads in y
76
77     virtual void  SetPad(Int_t ix, Int_t iy);
78                       // Set pad position
79     virtual void  SetHit(Float_t xhit, Float_t yhit, Float_t zhit);
80                       // Set hit position
81     
82     // Iterate over pads
83     //
84     virtual void  FirstPad(Float_t xhit, Float_t yhit, Float_t zhit, 
85                            Float_t dx, Float_t dy);
86     virtual void  NextPad();
87     virtual Int_t MorePads();
88
89     virtual Float_t Distance2AndOffset(Int_t iX, Int_t iY, 
90                                        Float_t X, Float_t Y, Int_t* dummy) ;
91                       // Distance between 1 pad and a position
92     virtual void GetNParallelAndOffset(Int_t iX, Int_t iY,
93                                        Int_t* Nparallel, Int_t* Offset);
94                       // Number of pads read in parallel and offset to add to x 
95                       // (specific to LYON, but mandatory for display)
96     virtual void Neighbours(Int_t iX, Int_t iY, 
97                             Int_t* Nlist, Int_t Xlist[10], Int_t Ylist[10]);
98                       // Get next neighbours 
99
100     // Current values
101     //
102     virtual Int_t  Ix();
103     virtual Int_t  Iy();
104                      // Current pad cursor during disintegration
105                      // x, y-coordinate
106     virtual Int_t  ISector();
107                     // current sector
108
109     virtual Int_t  Sector(Int_t ix, Int_t iy);
110     virtual Int_t  Sector(Float_t x, Float_t y);
111                     // calculate sector from pad coordinates
112
113     virtual void  IntegrationLimits(Float_t& x1, Float_t& x2,
114                                     Float_t& y1, Float_t& y2);
115                    // Current integration limits 
116
117     // Signal Generation
118     //
119     virtual Int_t SigGenCond(Float_t x, Float_t y, Float_t z);
120                     // Signal Generation Condition during Stepping
121     virtual void  SigGenInit(Float_t x, Float_t y, Float_t z);
122                     // Initialise signal generation at coord (x,y,z)
123                     
124     
125     virtual void GiveTestPoints(Int_t& n, Float_t* x, Float_t* y) const;
126                    // Test points for auto calibration
127     virtual void Draw(const char *opt = "") const;
128                    // Draw the segmentation zones
129
130     // Function for systematic corrections
131     //
132     virtual void SetCorrFunc(Int_t isec,  TF1* func);
133                    // Set the correction function
134     virtual TF1* CorrFunc(Int_t isec)  const;
135                    // Get the correction Function
136  
137   private:
138     // operators
139     AliMUONSt1Segmentation& operator=(const AliMUONSt1Segmentation & rhs);
140
141     // methods
142     void UpdateCurrentPadValues(const AliMpPad& pad);
143   
144     // constants
145     static const Float_t  fgkWireD;     // default wire pitch
146     static const Float_t  fgkLengthUnit;// conversion between length units
147                                         // from mapping (mm) to AliRoot (cm)
148   
149     // data members
150
151     // From mapping
152     //
153     AliMpPlane*             fPlane;            //  plane (from mapping)
154     AliMpPlaneSegmentation* fPlaneSegmentation;//  plane segmantation (from mapping)
155     AliMpVPadIterator*      fPlaneIterator;    // ! iterator over pads
156
157     // Wire pitch
158     //
159     Float_t         fWireD;  // wire pitch
160                              // (smaller distance between anode wires)
161     
162     // Reference to mother chamber
163     //
164     AliMUONChamber* fChamber; // ! Reference to mother chamber
165     Int_t           fId;      // Identifier
166     Float_t         fRmin;    // inner radius
167     Float_t         fRmax;    // outer radius
168     Float_t         fZ;       // z-position of chamber
169
170     // Current pad during integration (cursor for disintegration)
171     //
172     Int_t   fIx;     // ! pad coord.  x 
173     Int_t   fIy;     // ! pad coord.  y 
174     Float_t fX;      // ! real coord. x
175     Float_t fY;      // ! real ccord. y
176     Int_t   fSector;    // ! Current sector
177     
178     // Current pad and wire during tracking (cursor at hit centre)
179     //
180     Float_t fXhit;  // ! x-position of hit
181     Float_t fYhit;  // ! y-position of hit
182
183     // Reference point to define signal generation condition
184     //
185     Int_t   fIxt;   // ! pad coord. x
186     Int_t   fIyt;   // ! pad coord. y
187     Int_t   fIwt;   // ! wire number
188     Float_t fXt;    // ! x
189     Float_t fYt;    // ! y
190
191     TObjArray* fCorrA; // ! Array of correction functions
192
193   ClassDef(AliMUONSt1Segmentation,1) // Station1 segmentation
194 };
195
196 #endif //ALI_MUON_ST1_SEGMENTATION_H
197
198
199
200
201
202
203
204