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