]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/AliMUONGeometrySegmentation.h
New numbering of motif positions.
[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
6//
7// Class AliMUONGeometrySegmentation
8// ----------------------------------
9// New class for the geometry segmentation
10// composed of the segmentations of detection elements.
11// Applies transformations defined in geometry.
12//
13// Author:Ivana Hrivnacova, IPN Orsay
14
15#ifndef ALI_MUON_GEOMETRY_SEGMENTATION_H
16#define ALI_MUON_GEOMETRY_SEGMENTATION_H
17
18#include <TObject.h>
19
6b1e4b22 20#include "AliMUONGeometryDirection.h"
21
e118b27e 22class TObjArray;
23class TF1;
24
e118b27e 25class AliMUONGeometryModule;
26class AliMUONGeometryStore;
27class AliMUONGeometryDetElement;
eb6a47db 28class AliMUONVGeometryDESegmentation;
f1501d74 29class AliMUONSegmentManuIndex;
e118b27e 30
31class AliMUONGeometrySegmentation : public TObject
32{
33 public:
34 AliMUONGeometrySegmentation(AliMUONGeometryModule* geometry);
35 AliMUONGeometrySegmentation();
36 virtual ~AliMUONGeometrySegmentation();
37
38 // methods
eb6a47db 39 void Add(Int_t detElemId,
40 AliMUONVGeometryDESegmentation* segmentation);
41
42 // get methods
43 AliMUONGeometryModule* GetGeometry() const;
f5ed7890 44 virtual const AliMUONVGeometryDESegmentation* GetDESegmentation(Int_t detElemId) const;
45 // DE segmentation
6b1e4b22 46 virtual AliMUONGeometryDirection GetDirection(Int_t detElemId) const;
e9981d13 47 // Direction with a constant pad size
48 // (Direction or coordinate where the resolution is the best)
e118b27e 49
50 //
51 // redefined methods from AliSegmentation interface
52 //
53
54 // Set Chamber Segmentation Parameters
55 //
56 virtual void SetPadSize(Float_t p1, Float_t p2);
57 // Pad size Dx*Dy
58 virtual void SetDAnod(Float_t D);
59 // Anode Pitch
60
61 // Transform from pad (wire) to real coordinates and vice versa
62 //
63 virtual Float_t GetAnod(Int_t detElemId, Float_t xlhit) const;
64 // Anode wire coordinate closest to xhit
eb6a47db 65 virtual Bool_t GetPadI(Int_t detElemId,
e118b27e 66 Float_t xg, Float_t yg, Float_t zg,
67 Int_t& ix, Int_t& iy);
68 // Transform from pad to real coordinates
eb6a47db 69 virtual Bool_t GetPadC(Int_t detElemId,
e118b27e 70 Int_t ix, Int_t iy,
71 Float_t& x, Float_t& y, Float_t& z);
72 // Transform from real to pad coordinates
f1501d74 73 // get pad for a given connection
74 virtual Bool_t GetPadE(Int_t detElemId, Int_t &ix, Int_t &iy, AliMUONSegmentManuIndex* connect);
75 virtual AliMUONSegmentManuIndex* GetMpConnection(Int_t detElemId, Int_t ix, Int_t iy);
76 // get electronics connection for given pad
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
166
167 protected:
168 AliMUONGeometrySegmentation(const AliMUONGeometrySegmentation& rhs);
169
170 // operators
171 AliMUONGeometrySegmentation& operator=(const AliMUONGeometrySegmentation & rhs);
172
173 private:
174 // methods
4ebc2323 175 Bool_t OwnNotify(Int_t detElemId) const;
e118b27e 176
177 // data members
eb6a47db 178 mutable Int_t fCurrentDetElemId;
179 mutable AliMUONGeometryDetElement* fCurrentDetElement;
180 mutable AliMUONVGeometryDESegmentation* fCurrentSegmentation;
e118b27e 181 AliMUONGeometryModule* fGeometryModule;
182 AliMUONGeometryStore* fDESegmentations;
183
eb6a47db 184 ClassDef(AliMUONGeometrySegmentation,2) // Geometry segmentation
e118b27e 185};
186
eb6a47db 187// inline functions
188
189inline AliMUONGeometryModule* AliMUONGeometrySegmentation::GetGeometry() const
190{ return fGeometryModule; }
191
e118b27e 192#endif //ALI_MUON_GEOMETRY_SEGMENTATION_H
193
194
195
196
197
198
199
200