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