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 virtual void GetPadIxy(Float_t x, Float_t y , Float_t z, Int_t &ix, Int_t &iy)
35 {GetPadIxy(x, y, ix, iy);}
36 // Transform from real to pad coordinates
37 virtual void GetPadCxy(Int_t ix, Int_t iy, Float_t &x, Float_t &y);
38 virtual void GetPadCxy(Int_t ix, Int_t iy, Float_t &x, Float_t &y, Float_t &z)
39 {z=0; GetPadCxy(ix, iy, x , y);}
42 virtual void Init(AliMUONChamber* chamber);
47 virtual Float_t Dpx(){return fDpx;}
49 virtual Float_t Dpy(){return fDpy;}
50 // Pad size in x by Sector
51 virtual Float_t Dpx(Int_t) {return fDpx;}
52 // Pad size in y by Secto
53 virtual Float_t Dpy(Int_t) {return fDpy;}
54 // Maximum number of Pads in x
55 virtual Int_t Npx(){return fNpx;}
56 // Maximum number of Pads in y
57 virtual Int_t Npy(){return fNpy;}
59 virtual void SetPad(Int_t ix, Int_t iy);
61 virtual void SetHit(Float_t xhit, Float_t yhit);
62 virtual void SetHit(Float_t xhit, Float_t yhit, Float_t zhit)
67 virtual void FirstPad(Float_t xhit, Float_t yhit, Float_t dx, Float_t dy);
68 virtual void FirstPad(Float_t xhit, Float_t yhit, Float_t zhit, Float_t dx, Float_t dy)
69 {FirstPad(xhit, yhit, dx, dy);}
71 virtual void NextPad();
73 virtual Int_t MorePads();
75 // Distance between 1 pad and a position
76 virtual Float_t Distance2AndOffset(Int_t iX, Int_t iY, Float_t X, Float_t Y, Int_t *
78 // Number of pads read in parallel and offset to add to x
79 // (specific to LYON, but mandatory for display)
80 virtual void GetNParallelAndOffset(Int_t iX, Int_t iY,
81 Int_t *Nparallel, Int_t *Offset) {*Nparallel=1;*Offset=0;}
82 // Get next neighbours
83 virtual void Neighbours
84 (Int_t iX, Int_t iY, Int_t* Nlist, Int_t Xlist[10], Int_t Ylist[10]);
86 // Current Pad during Integration
88 virtual Int_t Ix(){return fix;}
90 virtual Int_t Iy(){return fiy;}
92 virtual Int_t ISector(){return 1;}
93 // calculate sector from pad coordinates
94 virtual Int_t Sector(Int_t ix, Int_t iy) {return 1;}
96 // Signal Generation Condition during Stepping
97 virtual Int_t SigGenCond(Float_t x, Float_t y, Float_t z);
98 // Initialise signal gneration at coord (x,y,z)
99 virtual void SigGenInit(Float_t x, Float_t y, Float_t z);
100 // Current integration limits
101 virtual void IntegrationLimits
102 (Float_t& x1, Float_t& x2, Float_t& y1, Float_t& y2);
103 // Test points for auto calibration
104 virtual void GiveTestPoints(Int_t &n, Float_t *x, Float_t *y);
105 // Draw segmentation zones
107 // Function for systematic corrections
108 // Set the correction function
109 virtual void SetCorrFunc(Int_t dum, TF1* func) {fCorr=func;}
110 // Get the correction Function
111 virtual TF1* CorrFunc(Int_t) {return fCorr;}
112 // assignment operator
113 AliMUONSegmentationV0& operator=(const AliMUONSegmentationV0& rhs);
115 ClassDef(AliMUONSegmentationV0,1) //Class for homogeneous segmentation
118 // Implementation of the segmentation class:
119 // Version 0 models rectangular pads with the same dimensions all
120 // over the cathode plane. Chamber has circular geometry.
122 // Geometry parameters
124 Float_t fDpx; // x pad width per sector
125 Float_t fDpy; // y pad base width
126 Int_t fNpx; // Number of pads in x
127 Int_t fNpy; // Number of pads in y
128 Float_t fWireD; // wire pitch
129 Float_t fRmin; // inner radius
130 Float_t fRmax; // outer radius
133 // Chamber region consideres during disintegration
134 Int_t fixmin; // lower left x
135 Int_t fixmax; // lower left y
136 Int_t fiymin; // upper right x
137 Int_t fiymax; // upper right y
139 // Current pad during integration (cursor for disintegration)
140 Int_t fix; // pad coord. x
141 Int_t fiy; // pad coord. y
142 Float_t fx; // real coord. x
143 Float_t fy; // real ccord. y
145 // Current pad and wire during tracking (cursor at hit centre)
148 Float_t fxhit; // x-position of hit
149 Float_t fyhit; // y-position of hit
150 // Reference point to define signal generation condition
151 Int_t fixt; // pad coord. x
152 Int_t fiyt; // pad coord. y
153 Int_t fiwt; // wire number
156 TF1* fCorr; // correction function