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