]>
Commit | Line | Data |
---|---|---|
e118b27e | 1 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * |
2 | * See cxx source for full Copyright notice */ | |
3 | ||
4 | /* $Id$ */ | |
5 | ||
692de412 | 6 | /// \ingroup geometry |
7 | /// \class AliMUONGeometrySegmentation | |
8 | /// \brief Segmentation for a geometry module | |
9 | /// | |
10 | /// New class for the geometry segmentation | |
11 | /// composed of the segmentations of detection elements. | |
12 | /// Applies transformations defined in geometry. | |
13 | /// | |
14 | /// Author:Ivana Hrivnacova, IPN Orsay | |
e118b27e | 15 | |
16 | #ifndef ALI_MUON_GEOMETRY_SEGMENTATION_H | |
17 | #define ALI_MUON_GEOMETRY_SEGMENTATION_H | |
18 | ||
19 | #include <TObject.h> | |
20 | ||
6b1e4b22 | 21 | #include "AliMUONGeometryDirection.h" |
22 | ||
e118b27e | 23 | class TObjArray; |
24 | class TF1; | |
25 | ||
e118b27e | 26 | class AliMUONGeometryModule; |
27 | class AliMUONGeometryStore; | |
28 | class AliMUONGeometryDetElement; | |
eb6a47db | 29 | class AliMUONVGeometryDESegmentation; |
f1501d74 | 30 | class AliMUONSegmentManuIndex; |
e118b27e | 31 | |
32 | class AliMUONGeometrySegmentation : public TObject | |
33 | { | |
34 | public: | |
35 | AliMUONGeometrySegmentation(AliMUONGeometryModule* geometry); | |
36 | AliMUONGeometrySegmentation(); | |
37 | virtual ~AliMUONGeometrySegmentation(); | |
38 | ||
39 | // methods | |
eb6a47db | 40 | void Add(Int_t detElemId, |
41 | AliMUONVGeometryDESegmentation* segmentation); | |
42 | ||
43 | // get methods | |
44 | AliMUONGeometryModule* GetGeometry() const; | |
f5ed7890 | 45 | virtual const AliMUONVGeometryDESegmentation* GetDESegmentation(Int_t detElemId) const; |
46 | // DE segmentation | |
6b1e4b22 | 47 | virtual AliMUONGeometryDirection GetDirection(Int_t detElemId) const; |
e9981d13 | 48 | // Direction with a constant pad size |
49 | // (Direction or coordinate where the resolution is the best) | |
e118b27e | 50 | |
51 | // | |
52 | // redefined methods from AliSegmentation interface | |
53 | // | |
54 | ||
55 | // Set Chamber Segmentation Parameters | |
56 | // | |
57 | virtual void SetPadSize(Float_t p1, Float_t p2); | |
58 | // Pad size Dx*Dy | |
59 | virtual void SetDAnod(Float_t D); | |
60 | // Anode Pitch | |
61 | ||
62 | // Transform from pad (wire) to real coordinates and vice versa | |
63 | // | |
64 | virtual Float_t GetAnod(Int_t detElemId, Float_t xlhit) const; | |
65 | // Anode wire coordinate closest to xhit | |
eb6a47db | 66 | virtual Bool_t GetPadI(Int_t detElemId, |
e118b27e | 67 | Float_t xg, Float_t yg, Float_t zg, |
68 | Int_t& ix, Int_t& iy); | |
69 | // Transform from pad to real coordinates | |
eb6a47db | 70 | virtual Bool_t GetPadC(Int_t detElemId, |
e118b27e | 71 | Int_t ix, Int_t iy, |
72 | Float_t& x, Float_t& y, Float_t& z); | |
73 | // Transform from real to pad coordinates | |
1d7b6529 | 74 | |
75 | virtual Bool_t HasPad(Int_t detElemId, Int_t ix, Int_t iy); | |
9db6c8d7 | 76 | |
e118b27e | 77 | // Initialisation |
78 | // | |
79 | virtual void Init(Int_t chamber); | |
80 | ||
81 | // Get member data | |
82 | // | |
83 | virtual Float_t Dpx(Int_t detElemId) const; | |
84 | virtual Float_t Dpy(Int_t detElemId) const ; | |
85 | // Pad size in x, y | |
86 | virtual Float_t Dpx(Int_t detElemId, Int_t isector) const; | |
87 | virtual Float_t Dpy(Int_t detElemId, Int_t isector) const; | |
88 | // Pad size in x, y by Sector | |
89 | virtual Int_t Npx(Int_t detElemId) const; | |
90 | virtual Int_t Npy(Int_t detElemId) const; | |
91 | // Maximum number of Pads in y | |
92 | ||
93 | virtual void SetPad(Int_t detElemId, Int_t ix, Int_t iy); | |
94 | // Set pad position | |
95 | virtual void SetHit(Int_t detElemId, Float_t xghit, Float_t yghit, Float_t zghit); | |
96 | // Set hit position | |
97 | ||
98 | // Iterate over pads | |
99 | // | |
100 | virtual void FirstPad(Int_t detElemId, | |
101 | Float_t xghit, Float_t yghit, Float_t zghit, | |
102 | Float_t dx, Float_t dy); | |
103 | virtual void NextPad(Int_t detElemId); | |
104 | virtual Int_t MorePads(Int_t detElemId); | |
105 | ||
106 | virtual Float_t Distance2AndOffset(Int_t detElemId, | |
107 | Int_t ix, Int_t iy, | |
108 | Float_t xg, Float_t yg, Float_t zg, | |
109 | Int_t* dummy); | |
110 | // Distance between 1 pad and a position | |
111 | virtual void GetNParallelAndOffset(Int_t detElemId, | |
112 | Int_t ix, Int_t iy, | |
113 | Int_t* nparallel, Int_t* offset); | |
114 | // Number of pads read in parallel and offset to add to x | |
115 | // (specific to LYON, but mandatory for display) | |
116 | virtual void Neighbours(Int_t detElemId, | |
117 | Int_t ix, Int_t iy, | |
118 | Int_t* nlist, Int_t xlist[10], Int_t ylist[10]); | |
119 | // Get next neighbours | |
120 | ||
121 | // Current values | |
122 | // | |
123 | virtual Int_t Ix(); | |
124 | virtual Int_t Iy(); | |
125 | virtual Int_t DetElemId(); | |
126 | // Current pad cursor during disintegration | |
127 | // x, y-coordinate | |
128 | virtual Int_t ISector(); | |
129 | // current sector | |
130 | ||
131 | virtual Int_t Sector(Int_t detElemId, | |
132 | Int_t ix, Int_t iy); | |
133 | virtual Int_t Sector(Int_t detElemId, | |
134 | Float_t xg, Float_t yg, Float_t zg); | |
135 | // calculate sector from pad coordinates | |
136 | ||
137 | virtual void IntegrationLimits(Int_t detElemId, | |
138 | Float_t& x1, Float_t& x2, | |
139 | Float_t& y1, Float_t& y2); | |
140 | // Current integration limits | |
141 | ||
142 | // Signal Generation | |
143 | // | |
144 | virtual Int_t SigGenCond(Int_t detElemId, | |
145 | Float_t xg, Float_t yg, Float_t zg); | |
146 | // Signal Generation Condition during Stepping | |
147 | virtual void SigGenInit(Int_t detElemId, | |
148 | Float_t xg, Float_t yg, Float_t zg); | |
149 | // Initialise signal generation at coord (x,y,z) | |
150 | ||
151 | ||
152 | virtual void GiveTestPoints(Int_t detElemId, | |
153 | Int_t& n, Float_t* xg, Float_t* yg) const; | |
154 | // Test points for auto calibration | |
4ebc2323 | 155 | virtual void Draw(const char *opt = ""); |
156 | virtual void Draw(Int_t detElemId, const char *opt = ""); | |
e118b27e | 157 | // Draw the segmentation zones |
158 | ||
159 | // Function for systematic corrections | |
160 | // | |
161 | virtual void SetCorrFunc(Int_t detElemId, | |
162 | Int_t isec, TF1* func); | |
163 | // Set the correction function | |
164 | virtual TF1* CorrFunc(Int_t detElemId, Int_t isec) const; | |
165 | // Get the correction Function | |
f29ba3e1 | 166 | // Printing |
167 | // | |
168 | virtual void Print(Option_t* opt = "") const; | |
1d7b6529 | 169 | |
e118b27e | 170 | protected: |
171 | AliMUONGeometrySegmentation(const AliMUONGeometrySegmentation& rhs); | |
172 | ||
173 | // operators | |
174 | AliMUONGeometrySegmentation& operator=(const AliMUONGeometrySegmentation & rhs); | |
175 | ||
176 | private: | |
177 | // methods | |
4ebc2323 | 178 | Bool_t OwnNotify(Int_t detElemId) const; |
e118b27e | 179 | |
180 | // data members | |
eb6a47db | 181 | mutable Int_t fCurrentDetElemId; |
182 | mutable AliMUONGeometryDetElement* fCurrentDetElement; | |
183 | mutable AliMUONVGeometryDESegmentation* fCurrentSegmentation; | |
e118b27e | 184 | AliMUONGeometryModule* fGeometryModule; |
185 | AliMUONGeometryStore* fDESegmentations; | |
186 | ||
eb6a47db | 187 | ClassDef(AliMUONGeometrySegmentation,2) // Geometry segmentation |
e118b27e | 188 | }; |
189 | ||
eb6a47db | 190 | // inline functions |
191 | ||
192 | inline AliMUONGeometryModule* AliMUONGeometrySegmentation::GetGeometry() const | |
193 | { return fGeometryModule; } | |
194 | ||
e118b27e | 195 | #endif //ALI_MUON_GEOMETRY_SEGMENTATION_H |
196 | ||
197 | ||
198 | ||
199 | ||
200 | ||
201 | ||
202 | ||
203 |