AliMUONSegmentation and AliMUONHitMap have been replaced by AliSegmentation and AliHi...
[u/mrichter/AliRoot.git] / MUON / AliMUONSegmentationV1.h
CommitLineData
a9e2aefa 1#ifndef ALIMUONSEGMENTATIONV1_H
2#define ALIMUONSEGMENTATIONV1_H
3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6/* $Id$ */
7
a30a000f 8#include "AliSegmentation.h"
a9e2aefa 9
10const Int_t kNzone = 3; // Specific for chamber with equal pads
11const Int_t kNzonem1 = 2; // kNzone - 1
12const Int_t kNzoneCUT = 30;
13
14class AliMUONSegmentationV1 :
a30a000f 15public AliSegmentation {
a9e2aefa 16 public:
17 AliMUONSegmentationV1();
18 AliMUONSegmentationV1(const AliMUONSegmentationV1 & segmentation);
19 virtual ~AliMUONSegmentationV1(){}
20 //
21 // Set Chamber Segmentation Parameters
22 // Set Number of zones
23 void SetNzone(Int_t N) {fNzone = N;};
24 // Pad size Dx*Dy
25 virtual void SetPadSize(Float_t p1, Float_t p2);
26 // Set Sense wire offset
27 void SetSensOffset(Float_t Offset) {fSensOffset = Offset;};
28 // Anod Pitch
29 void SetDAnod(Float_t D) {fDAnod = D;};
30 // max x and y for the zone in number of pads units
31 //(WARNING : first pad is labelled 0 !!)
32 virtual void AddCut(Int_t Zone, Int_t nX, Int_t nY);
33 // Apply default cut
34 virtual void DefaultCut(void);
35 //
36 // Initialisation
d81db581 37 virtual void Init(Int_t id);
a9e2aefa 38 //
39 // Get member data
40 //
41 // Pad size in x
42 virtual Float_t Dpx(){return fDpx;}
43 // Pad size in y
44 virtual Float_t Dpy(){return fDpy;}
45 // Pad size in x by Sector
46 virtual Float_t Dpx(Int_t i){return fDpx;}
47 // Pad size in y by Sector
48 virtual Float_t Dpy(Int_t i){return fDpy;}
49 // Maximum number of Pads in x
50 virtual Int_t Npx(){return fNpx;}
51 // Maximum number of Pads in y
52 virtual Int_t Npy(){return fNpy;}
53 //
54 // Get the zone of segmentation
55 virtual Int_t GetZone(Float_t X, Float_t Y);
56 virtual Int_t GetZone(Int_t X, Int_t Y);
57 //
58 // Transform from pad (wire) to real coordinates and vice versa
59 virtual Int_t GetiAnod(Float_t xhit);
60 // Anod wire coordinate closest to xhit
61 virtual Float_t GetAnod(Float_t xhit);
62 // Transform from pad to real coordinates
a30a000f 63 virtual void GetPadI(Float_t x ,Float_t y , Int_t &ix, Int_t &iy);
64 virtual void GetPadI(Float_t x, Float_t y , Float_t z, Int_t &ix, Int_t &iy)
65 {GetPadI(x, y, ix, iy);}
a9e2aefa 66 // Transform from real to pad coordinates
a30a000f 67 virtual void GetPadC(Int_t ix, Int_t iy, Float_t &x, Float_t &y);
68 virtual void GetPadC(Int_t ix, Int_t iy, Float_t &x, Float_t &y, Float_t &z)
69 {z=0; GetPadC(ix, iy, x , y);}
a9e2aefa 70 // Set pad position
71 virtual void SetPad(Int_t ix, Int_t iy);
72 // Set hit position
73 virtual void SetHit(Float_t xhit, Float_t yhit);
24b005db 74 virtual void SetHit(Float_t xhit, Float_t yhit, Float_t zhit)
75 {SetHit(xhit, yhit);}
a9e2aefa 76 //
77 // Iterate over pads
78 // Set Pad coordinates
79 virtual void SetPadCoord(Int_t iX, Int_t iY);
80 // Initialiser
81 virtual void FirstPad(Float_t xhit, Float_t yhit, Float_t dx, Float_t dy);
24b005db 82 virtual void FirstPad(Float_t xhit, Float_t yhit, Float_t zhit, Float_t dx, Float_t dy)
83 {FirstPad(xhit, yhit, dx, dy);}
a9e2aefa 84 // Stepper
85 virtual void NextPad();
86 // Condition
87 virtual Int_t MorePads();
88 // Get next neighbours
89 virtual void Neighbours // implementation Neighbours function
90 (Int_t iX, Int_t iY, Int_t* Nlist, Int_t *Xlist, Int_t *Ylist);
91 virtual void NeighboursDiag // with diagonal elements
92 (Int_t iX, Int_t iY, Int_t* Nlist, Int_t *Xlist, Int_t *Ylist);
93 virtual void NeighboursNonDiag // without diagonal elements
94 (Int_t iX, Int_t iY, Int_t* Nlist, Int_t *Xlist, Int_t *Ylist);
95 void CleanNeighbours(Int_t* Nlist, Int_t *Xlist, Int_t *Ylist);
96 //
97 // Current pad cursor during disintegration
98 // x-coordinate
99 virtual Int_t Ix(Int_t trueX, Int_t trueY);
100 virtual Int_t Ix();
101 // y-coordinate
102 virtual Int_t Iy(){return fiy;}
103 // current sector
104 virtual Int_t ISector();
105 // calculate sector from pad coordinates
106 virtual Int_t Sector(Int_t ix, Int_t iy) {return 1;}
107 // Position of pad in perellel read-out
108 virtual Int_t IsParallel2(Int_t iX, Int_t iY);
109 virtual Int_t IsParallel3(Int_t iX, Int_t iY);
110 // Number of pads read in parallel
111 virtual Int_t NParallel2(Int_t iX, Int_t iY);
112 virtual Int_t NParallel3(Int_t iX, Int_t iY);
113 //
114 // Number of pads read in parallel and offset to add to x
115 virtual void GetNParallelAndOffset(Int_t iX, Int_t iY,
116 Int_t *Nparallel, Int_t *Offset);
117 // Minimum distance between 1 pad and a position
118 virtual Float_t Distance2AndOffset(Int_t iX, Int_t iY, Float_t X, Float_t Y, Int_t *Offset);
119 //
120 // Signal Generation Condition during Stepping
121 Int_t SigGenCond(Float_t x, Float_t y, Float_t z);
122 // Initialise signal generation at coord (x,y,z)
123 void SigGenInit(Float_t x, Float_t y, Float_t z);
124 // Test points for auto calibration
125 void GiveTestPoints(Int_t &n, Float_t *x, Float_t *y);
126 // Current integration limits
127 virtual void IntegrationLimits
128 (Float_t& x1, Float_t& x2, Float_t& y1, Float_t& y2);
129 // Draw the segmentation zones
130 virtual void Draw(){;}
131 // Function for systematic corrections
132 // Set the correction function
133 virtual void SetCorrFunc(Int_t dum, TF1* func) {fCorr=func;}
134 // Get the correction function
135 virtual TF1* CorrFunc(Int_t) {return fCorr;}
136 //
137 AliMUONSegmentationV1& operator=(const AliMUONSegmentationV1& rhs);
138 ClassDef(AliMUONSegmentationV1,1) // Implementation of the Lyon type chamber segmentation with parallel read-out
139 protected:
140 //
141 // Implementation of the segmentation data
142 // Version This models rectangular pads with the same dimensions all
143 // over the cathode plane but let the possibilit for different design.
144 //
145 // geometry
146 Int_t fNzone; // Number of differents sensitive zones
147 Float_t fDpx; // X pad width
148 Float_t fDpy; // Y pad width
149 Int_t fNZoneCut[kNzonem1]; // Number of cuts for given zone
150 Int_t fZoneX[kNzonem1][kNzoneCUT]; // X descriptor of zone segmentations
151 Int_t fZoneY[kNzonem1][kNzoneCUT]; // Y descriptor of zone segmentations
152 Float_t frSensMax2; // square of maximum sensitive radius
153 Float_t frSensMin2; // square of minimum sensitive radius
154 Int_t fNpx; // Maximum number of pads along x
155 Int_t fNpy; // Maximum number of pads along y
156 Float_t fDAnod; // Anod gap
157 Float_t fSensOffset; // Offset of sensitive zone with respect to quadrant (positive)
158
159 // Chamber region consideres during disintegration (lower left and upper right corner)
160 //
161 Int_t fixmin; // lower left x
162 Int_t fixmax; // lower left y
163 Int_t fiymin; // upper right x
164 Int_t fiymax; // upper right y
165 //
166 // Current pad during integration (cursor for disintegration)
167 Int_t fix; // pad coord. x
168 Int_t fiy; // pad coord. y
169 Float_t fx; // real coord. x
170 Float_t fy; // real ccord. y
171 //
172 // Current pad and wire during tracking (cursor at hit centre)
173 Int_t fixt; // x-position of hit
174 Int_t fiyt; // y-position of hit
175 // Reference point to define signal generation condition
176 Int_t fiwt; // wire number
177 Float_t fxt; // x
178 Float_t fyt; // y
179 Float_t fxhit; // x-position of hit
180 Float_t fyhit; // y-position of hit
181
182 TF1* fCorr; // correction function
183};
184
185#endif
186
187