]> git.uio.no Git - u/mrichter/AliRoot.git/blame_incremental - MUON/AliMUONGeometrySegmentation.h
Updated list of MUON libraries
[u/mrichter/AliRoot.git] / MUON / AliMUONGeometrySegmentation.h
... / ...
CommitLineData
1/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
2 * See cxx source for full Copyright notice */
3
4/* $Id$ */
5
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
15
16#ifndef ALI_MUON_GEOMETRY_SEGMENTATION_H
17#define ALI_MUON_GEOMETRY_SEGMENTATION_H
18
19#include "AliMUONGeometryDirection.h"
20
21#include <TObject.h>
22#include <TString.h>
23
24class TObjArray;
25class TF1;
26
27class AliMUONGeometryModuleTransformer;
28class AliMUONGeometryDetElement;
29class AliMUONVGeometryDESegmentation;
30class AliMUONSegmentManuIndex;
31
32class AliMpExMap;
33
34class AliMUONGeometrySegmentation : public TObject
35{
36 public:
37 AliMUONGeometrySegmentation(
38 const AliMUONGeometryModuleTransformer* geometry);
39 AliMUONGeometrySegmentation();
40 virtual ~AliMUONGeometrySegmentation();
41
42 // Methods
43 //
44 void Add(Int_t detElemId, const TString& detElemName,
45 AliMUONVGeometryDESegmentation* segmentation);
46
47 // Get methods
48 //
49 const AliMUONGeometryModuleTransformer* GetTransformer() const;
50 // Geometry transformer
51
52 const AliMUONVGeometryDESegmentation* GetDESegmentation(
53 Int_t detElemId, Bool_t warn = true) const;
54 // DE segmentation
55
56 AliMUONGeometryDirection GetDirection(Int_t detElemId) const;
57 // Direction with a constant pad size
58 // (Direction or coordinate where the resolution
59 // is the best)
60
61 TString GetDEName(Int_t detElemId) const;
62 // DE name
63
64 // Redefined methods from AliSegmentation interface
65 //
66
67 // Set Chamber Segmentation Parameters
68 //
69 virtual void SetPadSize(Float_t p1, Float_t p2);
70 // Pad size Dx*Dy
71 virtual void SetDAnod(Float_t D);
72 // Anode Pitch
73
74 // Transform from pad (wire) to real coordinates and vice versa
75 //
76 virtual Float_t GetAnod(Int_t detElemId, Float_t xlhit) const;
77 // Anode wire coordinate closest to xhit
78 virtual Bool_t GetPadI(Int_t detElemId,
79 Float_t xg, Float_t yg, Float_t zg,
80 Int_t& ix, Int_t& iy);
81 // Transform from pad to real coordinates
82 virtual Bool_t GetPadC(Int_t detElemId,
83 Int_t ix, Int_t iy,
84 Float_t& x, Float_t& y, Float_t& z);
85 // Transform from real to pad coordinates
86
87 virtual Bool_t HasPad(Int_t detElemId,
88 Int_t ix, Int_t iy);
89 virtual Bool_t HasPad(Int_t detElemId,
90 Float_t x, Float_t y, Float_t z);
91
92 // Initialisation
93 //
94 virtual void Init(Int_t chamber);
95
96 // Get member data
97 //
98 virtual Float_t Dpx(Int_t detElemId) const;
99 virtual Float_t Dpy(Int_t detElemId) const ;
100 // Pad size in x, y
101 virtual Float_t Dpx(Int_t detElemId, Int_t isector) const;
102 virtual Float_t Dpy(Int_t detElemId, Int_t isector) const;
103 // Pad size in x, y by Sector
104 virtual Int_t Npx(Int_t detElemId) const;
105 virtual Int_t Npy(Int_t detElemId) const;
106 // Maximum number of Pads in y
107
108 virtual void SetPad(Int_t detElemId, Int_t ix, Int_t iy);
109 // Set pad position
110 virtual void SetHit(Int_t detElemId, Float_t xghit, Float_t yghit, Float_t zghit);
111 // Set hit position
112
113 // Iterate over pads
114 //
115 virtual void FirstPad(Int_t detElemId,
116 Float_t xghit, Float_t yghit, Float_t zghit,
117 Float_t dx, Float_t dy);
118 virtual void NextPad(Int_t detElemId);
119 virtual Int_t MorePads(Int_t detElemId);
120
121 virtual Float_t Distance2AndOffset(Int_t detElemId,
122 Int_t ix, Int_t iy,
123 Float_t xg, Float_t yg, Float_t zg,
124 Int_t* dummy);
125 // Distance between 1 pad and a position
126 virtual void GetNParallelAndOffset(Int_t detElemId,
127 Int_t ix, Int_t iy,
128 Int_t* nparallel, Int_t* offset);
129 // Number of pads read in parallel and offset to add to x
130 // (specific to LYON, but mandatory for display)
131 virtual void Neighbours(Int_t detElemId,
132 Int_t ix, Int_t iy,
133 Int_t* nlist, Int_t xlist[10], Int_t ylist[10]);
134 // Get next neighbours
135
136 // Current values
137 //
138 virtual Int_t Ix();
139 virtual Int_t Iy();
140 virtual Int_t DetElemId();
141 // Current pad cursor during disintegration
142 // x, y-coordinate
143 virtual Int_t ISector();
144 // current sector
145
146 virtual Int_t Sector(Int_t detElemId,
147 Int_t ix, Int_t iy);
148 virtual Int_t Sector(Int_t detElemId,
149 Float_t xg, Float_t yg, Float_t zg);
150 // calculate sector from pad coordinates
151
152 virtual void IntegrationLimits(Int_t detElemId,
153 Float_t& x1, Float_t& x2,
154 Float_t& y1, Float_t& y2);
155 // Current integration limits
156
157 // Signal Generation
158 //
159 virtual Int_t SigGenCond(Int_t detElemId,
160 Float_t xg, Float_t yg, Float_t zg);
161 // Signal Generation Condition during Stepping
162 virtual void SigGenInit(Int_t detElemId,
163 Float_t xg, Float_t yg, Float_t zg);
164 // Initialise signal generation at coord (x,y,z)
165
166
167 virtual void GiveTestPoints(Int_t detElemId,
168 Int_t& n, Float_t* xg, Float_t* yg) const;
169 // Test points for auto calibration
170 virtual void Draw(const char *opt = "");
171 virtual void Draw(Int_t detElemId, const char *opt = "");
172 // Draw the segmentation zones
173
174 // Function for systematic corrections
175 //
176 virtual void SetCorrFunc(Int_t detElemId,
177 Int_t isec, TF1* func);
178 // Set the correction function
179 virtual TF1* CorrFunc(Int_t detElemId, Int_t isec) const;
180 // Get the correction Function
181 // Printing
182 //
183 virtual void Print(Option_t* opt = "") const;
184
185 protected:
186 /// Not implemented
187 AliMUONGeometrySegmentation(const AliMUONGeometrySegmentation& rhs);
188 /// Not implemented
189 AliMUONGeometrySegmentation& operator=(const AliMUONGeometrySegmentation & rhs);
190
191 private:
192 // methods
193 Bool_t OwnNotify(Int_t detElemId, Bool_t warn = true) const;
194
195 // static data members
196 static const Float_t fgkMaxDistance; ///< \brief the big value passed to pad coordinates
197 /// if pad does not exist
198
199 // data members
200 mutable Int_t fCurrentDetElemId; ///< current DE ID
201 mutable AliMUONGeometryDetElement* fCurrentDetElement; ///< current detection element
202 mutable AliMUONVGeometryDESegmentation* fCurrentSegmentation;///< current DE segmentation
203
204 const AliMUONGeometryModuleTransformer* fkModuleTransformer; ///< associated geometry transformer
205 AliMpExMap* fDESegmentations; ///< DE segmentations
206 AliMpExMap* fDENames; ///< DE names
207
208
209 ClassDef(AliMUONGeometrySegmentation,3) // Geometry segmentation
210};
211
212// inline functions
213
214/// Return associated geometry transformer
215inline
216const AliMUONGeometryModuleTransformer*
217AliMUONGeometrySegmentation::GetTransformer() const
218{ return fkModuleTransformer; }
219
220#endif //ALI_MUON_GEOMETRY_SEGMENTATION_H
221
222
223
224
225
226
227
228