1 #ifndef ALIMUONSEGMENTATIONV0_H
2 #define ALIMUONSEGMENTATIONV0_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
8 #include "AliMUONSegmentation.h"
11 //----------------------------------------------
13 // Chamber segmentation for homogeneously segmented circular chamber
15 class AliMUONSegmentationV0 :
16 public AliMUONSegmentation {
18 AliMUONSegmentationV0(){}
19 AliMUONSegmentationV0(const AliMUONSegmentationV0 & segmentation);
21 virtual ~AliMUONSegmentationV0(){}
22 // Set Chamber Segmentation Parameters
25 virtual void SetPadSize(Float_t p1, Float_t p2);
27 virtual void SetDAnod(Float_t D) {fWireD = D;};
28 // Transform from pad (wire) to real coordinates and vice versa
30 // Anod wire coordinate closest to xhit
31 virtual Float_t GetAnod(Float_t xhit);
32 // Transform from pad to real coordinates
33 virtual void GetPadIxy(Float_t x ,Float_t y ,Int_t &ix,Int_t &iy);
34 // Transform from real to pad coordinates
35 virtual void GetPadCxy(Int_t ix,Int_t iy,Float_t &x ,Float_t &y );
38 virtual void Init(AliMUONChamber* chamber);
43 virtual Float_t Dpx(){return fDpx;}
45 virtual Float_t Dpy(){return fDpy;}
46 // Pad size in x by Sector
47 virtual Float_t Dpx(Int_t) {return fDpx;}
48 // Pad size in y by Secto
49 virtual Float_t Dpy(Int_t) {return fDpy;}
50 // Maximum number of Pads in x
51 virtual Int_t Npx(){return fNpx;}
52 // Maximum number of Pads in y
53 virtual Int_t Npy(){return fNpy;}
55 virtual void SetPad(Int_t ix, Int_t iy);
57 virtual void SetHit(Float_t xhit, Float_t yhit);
61 virtual void FirstPad(Float_t xhit, Float_t yhit, Float_t dx, Float_t dy);
63 virtual void NextPad();
65 virtual Int_t MorePads();
67 // Distance between 1 pad and a position
68 virtual Float_t Distance2AndOffset(Int_t iX, Int_t iY, Float_t X, Float_t Y, Int_t *
70 // Number of pads read in parallel and offset to add to x
71 // (specific to LYON, but mandatory for display)
72 virtual void GetNParallelAndOffset(Int_t iX, Int_t iY,
73 Int_t *Nparallel, Int_t *Offset) {*Nparallel=1;*Offset=0;}
74 // Get next neighbours
75 virtual void Neighbours
76 (Int_t iX, Int_t iY, Int_t* Nlist, Int_t Xlist[10], Int_t Ylist[10]);
78 // Current Pad during Integration
80 virtual Int_t Ix(){return fix;}
82 virtual Int_t Iy(){return fiy;}
84 virtual Int_t ISector(){return 1;}
85 // calculate sector from pad coordinates
86 virtual Int_t Sector(Int_t ix, Int_t iy) {return 1;}
88 // Signal Generation Condition during Stepping
89 virtual Int_t SigGenCond(Float_t x, Float_t y, Float_t z);
90 // Initialise signal gneration at coord (x,y,z)
91 virtual void SigGenInit(Float_t x, Float_t y, Float_t z);
92 // Current integration limits
93 virtual void IntegrationLimits
94 (Float_t& x1, Float_t& x2, Float_t& y1, Float_t& y2);
95 // Test points for auto calibration
96 virtual void GiveTestPoints(Int_t &n, Float_t *x, Float_t *y);
97 // Draw segmentation zones
99 // Function for systematic corrections
100 // Set the correction function
101 virtual void SetCorrFunc(Int_t dum, TF1* func) {fCorr=func;}
102 // Get the correction Function
103 virtual TF1* CorrFunc(Int_t) {return fCorr;}
104 // assignment operator
105 AliMUONSegmentationV0& operator=(const AliMUONSegmentationV0& rhs);
107 ClassDef(AliMUONSegmentationV0,1) //Class for homogeneous segmentation
110 // Implementation of the segmentation class:
111 // Version 0 models rectangular pads with the same dimensions all
112 // over the cathode plane. Chamber has circular geometry.
114 // Geometry parameters
116 Float_t fDpx; // x pad width per sector
117 Float_t fDpy; // y pad base width
118 Int_t fNpx; // Number of pads in x
119 Int_t fNpy; // Number of pads in y
120 Float_t fWireD; // wire pitch
121 Float_t fRmin; // inner radius
122 Float_t fRmax; // outer radius
125 // Chamber region consideres during disintegration
126 Int_t fixmin; // lower left x
127 Int_t fixmax; // lower left y
128 Int_t fiymin; // upper right x
129 Int_t fiymax; // upper right y
131 // Current pad during integration (cursor for disintegration)
132 Int_t fix; // pad coord. x
133 Int_t fiy; // pad coord. y
134 Float_t fx; // real coord. x
135 Float_t fy; // real ccord. y
137 // Current pad and wire during tracking (cursor at hit centre)
140 Float_t fxhit; // x-position of hit
141 Float_t fyhit; // y-position of hit
142 // Reference point to define signal generation condition
143 Int_t fixt; // pad coord. x
144 Int_t fiyt; // pad coord. y
145 Int_t fiwt; // wire number
148 TF1* fCorr; // correction function