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