]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/AliMUONGeometrySegmentation.h
Introduced new DE names unique to each det element;
[u/mrichter/AliRoot.git] / MUON / AliMUONGeometrySegmentation.h
CommitLineData
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///
a9aad96e 14/// \author Ivana Hrivnacova, IPN Orsay
e118b27e 15
16#ifndef ALI_MUON_GEOMETRY_SEGMENTATION_H
17#define ALI_MUON_GEOMETRY_SEGMENTATION_H
18
6b1e4b22 19#include "AliMUONGeometryDirection.h"
20
e2d5c9df 21#include <TObject.h>
22#include <TString.h>
23
e118b27e 24class TObjArray;
25class TF1;
26
5db8c9c1 27class AliMUONGeometryModuleTransformer;
e118b27e 28class AliMUONGeometryDetElement;
eb6a47db 29class AliMUONVGeometryDESegmentation;
f1501d74 30class AliMUONSegmentManuIndex;
e118b27e 31
21f7f426 32class AliMpExMap;
33
e118b27e 34class AliMUONGeometrySegmentation : public TObject
35{
36 public:
5db8c9c1 37 AliMUONGeometrySegmentation(
38 const AliMUONGeometryModuleTransformer* geometry);
e118b27e 39 AliMUONGeometrySegmentation();
40 virtual ~AliMUONGeometrySegmentation();
41
5db8c9c1 42 // Methods
43 //
44 void Add(Int_t detElemId, const TString& detElemName,
eb6a47db 45 AliMUONVGeometryDESegmentation* segmentation);
46
5db8c9c1 47 // Get methods
48 //
49 const AliMUONGeometryModuleTransformer* GetTransformer() const;
50 // Geometry transformer
51
52 const AliMUONVGeometryDESegmentation* GetDESegmentation(
dec74ccc 53 Int_t detElemId, Bool_t warn = true) const;
f5ed7890 54 // DE segmentation
5db8c9c1 55
56 AliMUONGeometryDirection GetDirection(Int_t detElemId) const;
e9981d13 57 // Direction with a constant pad size
dec74ccc 58 // (Direction or coordinate where the resolution
59 // is the best)
e118b27e 60
5db8c9c1 61 TString GetDEName(Int_t detElemId) const;
62 // DE name
63
64 // Redefined methods from AliSegmentation interface
e118b27e 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
eb6a47db 78 virtual Bool_t GetPadI(Int_t detElemId,
e118b27e 79 Float_t xg, Float_t yg, Float_t zg,
80 Int_t& ix, Int_t& iy);
81 // Transform from pad to real coordinates
eb6a47db 82 virtual Bool_t GetPadC(Int_t detElemId,
e118b27e 83 Int_t ix, Int_t iy,
84 Float_t& x, Float_t& y, Float_t& z);
85 // Transform from real to pad coordinates
1d7b6529 86
e2d5c9df 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);
9db6c8d7 91
e118b27e 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
4ebc2323 170 virtual void Draw(const char *opt = "");
171 virtual void Draw(Int_t detElemId, const char *opt = "");
e118b27e 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
f29ba3e1 181 // Printing
182 //
183 virtual void Print(Option_t* opt = "") const;
1d7b6529 184
e118b27e 185 protected:
186 AliMUONGeometrySegmentation(const AliMUONGeometrySegmentation& rhs);
e118b27e 187 AliMUONGeometrySegmentation& operator=(const AliMUONGeometrySegmentation & rhs);
188
189 private:
190 // methods
dec74ccc 191 Bool_t OwnNotify(Int_t detElemId, Bool_t warn = true) const;
3aadd064 192
193 // static data members
829425a5 194 static const Float_t fgkMaxDistance; ///< \brief the big value passed to pad coordinates
195 /// if pad does not exist
e118b27e 196
197 // data members
829425a5 198 mutable Int_t fCurrentDetElemId; ///< current DE ID
199 mutable AliMUONGeometryDetElement* fCurrentDetElement; ///< current detection element
200 mutable AliMUONVGeometryDESegmentation* fCurrentSegmentation;///< current DE segmentation
5db8c9c1 201
829425a5 202 const AliMUONGeometryModuleTransformer* fkModuleTransformer; ///< associated geometry transformer
21f7f426 203 AliMpExMap* fDESegmentations; ///< DE segmentations
204 AliMpExMap* fDENames; ///< DE names
5db8c9c1 205
e118b27e 206
394d8216 207 ClassDef(AliMUONGeometrySegmentation,3) // Geometry segmentation
e118b27e 208};
209
eb6a47db 210// inline functions
211
a9aad96e 212/// Return associated geometry transformer
5db8c9c1 213inline
214const AliMUONGeometryModuleTransformer*
215AliMUONGeometrySegmentation::GetTransformer() const
216{ return fkModuleTransformer; }
eb6a47db 217
e118b27e 218#endif //ALI_MUON_GEOMETRY_SEGMENTATION_H
219
220
221
222
223
224
225
226