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 "AliSegmentation.h"
13 //----------------------------------------------
15 // Chamber segmentation for homogeneously segmented circular chamber
17 class AliMUONSegmentationV0 :
18 public AliSegmentation {
20 AliMUONSegmentationV0(){fCorr=0;fChamber=0;}
21 AliMUONSegmentationV0(const AliMUONSegmentationV0 & segmentation);
23 virtual ~AliMUONSegmentationV0(){}
24 // Set Chamber Segmentation Parameters
27 virtual void SetPadSize(Float_t p1, Float_t p2);
29 virtual void SetDAnod(Float_t D) {fWireD = D;};
30 // Transform from pad (wire) to real coordinates and vice versa
32 // Anod wire coordinate closest to xhit
33 virtual Float_t GetAnod(Float_t xhit) const;
34 // Transform from pad to real coordinates
35 virtual void GetPadI(Float_t x, Float_t y , Int_t &ix, Int_t &iy) ;
36 virtual void GetPadI(Float_t x, Float_t y , Float_t z, Int_t &ix, Int_t &iy)
37 {GetPadI(x, y, ix, iy);}
38 // Transform from real to pad coordinates
39 virtual void GetPadC(Int_t ix, Int_t iy, Float_t &x, Float_t &y) ;
40 virtual void GetPadC(Int_t ix, Int_t iy, Float_t &x, Float_t &y, Float_t &z)
41 {z=fZ; GetPadC(ix, iy, x , y);}
44 virtual void Init(Int_t chamber);
49 virtual Float_t Dpx() const {return fDpx;}
51 virtual Float_t Dpy() const {return fDpy;}
52 // Pad size in x by Sector
53 virtual Float_t Dpx(Int_t) const {return fDpx;}
54 // Pad size in y by Secto
55 virtual Float_t Dpy(Int_t) const {return fDpy;}
56 // Maximum number of Pads in x
57 virtual Int_t Npx() const {return fNpx;}
58 // Maximum number of Pads in y
59 virtual Int_t Npy() const {return fNpy;}
61 virtual void SetPad(Int_t ix, Int_t iy);
63 virtual void SetHit(Float_t xhit, Float_t yhit);
64 virtual void SetHit(Float_t xhit, Float_t yhit, Float_t zhit)
69 virtual void FirstPad(Float_t xhit, Float_t yhit, Float_t dx, Float_t dy);
70 virtual void FirstPad(Float_t xhit, Float_t yhit, Float_t zhit, Float_t dx, Float_t dy)
71 {FirstPad(xhit, yhit, dx, dy);}
73 virtual void NextPad();
75 virtual Int_t MorePads();
77 // Distance between 1 pad and a position
78 virtual Float_t Distance2AndOffset(Int_t iX, Int_t iY, Float_t X, Float_t Y, Int_t *
80 // Number of pads read in parallel and offset to add to x
81 // (specific to LYON, but mandatory for display)
82 virtual void GetNParallelAndOffset(Int_t iX, Int_t iY,
83 Int_t *Nparallel, Int_t *Offset) {*Nparallel=1;*Offset=0;}
84 // Get next neighbours
85 virtual void Neighbours
86 (Int_t iX, Int_t iY, Int_t* Nlist, Int_t Xlist[10], Int_t Ylist[10]) ;
88 // Current Pad during Integration
90 virtual Int_t Ix() {return fIx;}
92 virtual Int_t Iy() {return fIy;}
94 virtual Int_t ISector() {return 1;}
95 // calculate sector from pad coordinates
96 virtual Int_t Sector(Int_t ix, Int_t iy) {return 1;}
97 virtual Int_t Sector(Float_t x, Float_t y) {return 1;}
99 // Signal Generation Condition during Stepping
100 virtual Int_t SigGenCond(Float_t x, Float_t y, Float_t z) ;
101 // Initialise signal gneration at coord (x,y,z)
102 virtual void SigGenInit(Float_t x, Float_t y, Float_t z);
103 // Current integration limits
104 virtual void IntegrationLimits
105 (Float_t& x1, Float_t& x2, Float_t& y1, Float_t& y2);
106 // Test points for auto calibration
107 virtual void GiveTestPoints(Int_t &n, Float_t *x, Float_t *y) const;
108 // Draw segmentation zones
109 virtual void Draw(const char *opt="") const;
110 // Function for systematic corrections
111 // Set the correction function
112 virtual void SetCorrFunc(Int_t dum, TF1* func) {fCorr=func;}
113 // Get the correction Function
114 virtual TF1* CorrFunc(Int_t) const {return fCorr;}
115 // assignment operator
116 AliMUONSegmentationV0& operator=(const AliMUONSegmentationV0& rhs);
118 ClassDef(AliMUONSegmentationV0,1) //Class for homogeneous segmentation
121 // Implementation of the segmentation class:
122 // Version 0 models rectangular pads with the same dimensions all
123 // over the cathode plane. Chamber has circular geometry.
125 // Geometry parameters
127 Float_t fDpx; // x pad width per sector
128 Float_t fDpy; // y pad base width
129 Int_t fNpx; // Number of pads in x
130 Int_t fNpy; // Number of pads in y
131 Float_t fWireD; // wire pitch
132 Float_t fRmin; // inner radius
133 Float_t fRmax; // outer radius
136 // Chamber region consideres during disintegration
137 Int_t fIxmin; // ! lower left x
138 Int_t fIxmax; // ! lower left y
139 Int_t fIymin; // ! upper right x
140 Int_t fIymax; // ! upper right y
142 // Current pad during integration (cursor for disintegration)
143 Int_t fIx; // ! pad coord. x
144 Int_t fIy; // ! pad coord. y
145 Float_t fX; // ! real coord. x
146 Float_t fY; // ! real ccord. y
148 // Current pad and wire during tracking (cursor at hit centre)
151 Float_t fXhit; // ! x-position of hit
152 Float_t fYhit; // ! y-position of hit
153 // Reference point to define signal generation condition
154 Int_t fIxt; // ! pad coord. x
155 Int_t fIyt; // ! pad coord. y
156 Int_t fIwt; // ! wire number
159 TF1* fCorr; // ! correction function
161 AliMUONChamber* fChamber; // ! Reference to mother chamber
162 Int_t fId; // Identifier
163 Float_t fZ; // z-position of chamber