]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/AliMUONGeometrySegmentation.h
Removing obsolete methods ( Christian )
[u/mrichter/AliRoot.git] / MUON / AliMUONGeometrySegmentation.h
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 <TObject.h>
20
21 #include "AliMUONGeometryDirection.h"
22
23 class TObjArray;
24 class TF1;
25
26 class AliMUONGeometryModule;
27 class AliMUONGeometryStore;
28 class AliMUONGeometryDetElement;
29 class AliMUONVGeometryDESegmentation;
30 class AliMUONSegmentManuIndex;
31
32 class AliMUONGeometrySegmentation : public TObject
33 {
34   public:
35     AliMUONGeometrySegmentation(AliMUONGeometryModule* geometry);
36     AliMUONGeometrySegmentation();
37     virtual ~AliMUONGeometrySegmentation();
38
39     // methods
40     void Add(Int_t detElemId, 
41              AliMUONVGeometryDESegmentation* segmentation); 
42  
43     // get methods
44     AliMUONGeometryModule* GetGeometry() const;       
45     virtual const AliMUONVGeometryDESegmentation* GetDESegmentation(Int_t detElemId) const;
46                        // DE segmentation
47     virtual AliMUONGeometryDirection GetDirection(Int_t detElemId) const;
48                        // Direction with a constant pad size  
49                        // (Direction or coordinate where the resolution is the best)
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
66     virtual Bool_t  GetPadI(Int_t detElemId,
67                           Float_t xg, Float_t yg, Float_t  zg, 
68                           Int_t& ix, Int_t& iy);
69                        // Transform from pad to real coordinates
70     virtual Bool_t  GetPadC(Int_t detElemId,
71                           Int_t ix, Int_t iy,
72                           Float_t& x, Float_t& y, Float_t& z);
73                        // Transform from real to pad coordinates
74
75     virtual Bool_t HasPad(Int_t detElemId, Int_t ix, Int_t iy);
76   
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
155     virtual void Draw(const char *opt = "");
156     virtual void Draw(Int_t detElemId, const char *opt = "");
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     virtual void Print(Option_t* ="") const;
167         
168   protected:
169     AliMUONGeometrySegmentation(const AliMUONGeometrySegmentation& rhs);
170   
171     // operators
172     AliMUONGeometrySegmentation& operator=(const AliMUONGeometrySegmentation & rhs);
173
174   private:
175     // methods
176     Bool_t OwnNotify(Int_t detElemId) const;
177   
178     // data members
179     mutable  Int_t                           fCurrentDetElemId;  
180     mutable  AliMUONGeometryDetElement*      fCurrentDetElement;  
181     mutable  AliMUONVGeometryDESegmentation* fCurrentSegmentation;
182     AliMUONGeometryModule*    fGeometryModule;
183     AliMUONGeometryStore*     fDESegmentations;
184  
185    ClassDef(AliMUONGeometrySegmentation,2) // Geometry segmentation
186 };
187
188 // inline functions
189
190 inline AliMUONGeometryModule* AliMUONGeometrySegmentation::GetGeometry() const
191 { return fGeometryModule; }           
192
193 #endif //ALI_MUON_GEOMETRY_SEGMENTATION_H
194
195
196
197
198
199
200
201