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