New version of MUON from M.Bondila & A.Morsch
[u/mrichter/AliRoot.git] / MUON / AliMUONSegResV0.h
CommitLineData
a897a37a 1#ifndef MUONSegResV0_H
2#define MUONSegResV0_H
3
4#include "AliMUONSegRes.h"
5class AliMUONchamber;
6
7class AliMUONsegmentationV0 :
8public AliMUONsegmentation {
9 public:
10 AliMUONsegmentationV0(){}
11 virtual ~AliMUONsegmentationV0(){}
12 // Set Chamber Segmentation Parameters
13 //
14 // Pad size Dx*Dy
15 virtual void SetPADSIZ(Float_t p1, Float_t p2);
16 // Anod Pitch
17 virtual void SetDAnod(Float_t D) {fWireD = D;};
18 // Transform from pad (wire) to real coordinates and vice versa
19 //
20 // Anod wire coordinate closest to xhit
21 virtual Float_t GetAnod(Float_t xhit);
22 // Transform from pad to real coordinates
23 virtual void GetPadIxy(Float_t x ,Float_t y ,Int_t &ix,Int_t &iy);
24 // Transform from real to pad coordinates
25 virtual void GetPadCxy(Int_t ix,Int_t iy,Float_t &x ,Float_t &y );
26 //
27 // Initialisation
28 virtual void Init(AliMUONchamber*);
29 //
30 // Get member data
31 //
32 // Pad size in x
33 virtual Float_t Dpx(){return fDpx;}
34 // Pad size in y
35 virtual Float_t Dpy(){return fDpy;}
36 // Pad size in x by Sector
37 virtual Float_t Dpx(Int_t) {return fDpx;}
38 // Pad size in y by Secto
39 virtual Float_t Dpy(Int_t) {return fDpy;}
40 // Max number of Pads in x
41 virtual Int_t Npx(){return fNpx;}
42 // max number of Pads in y
43 virtual Int_t Npy(){return fNpy;}
44 // set pad position
45 virtual void SetPad(Int_t, Int_t);
46 // set hit position
47 virtual void SetHit(Float_t, Float_t);
48 //
49 // Iterate over pads
50 // Initialiser
51 virtual void FirstPad(Float_t xhit, Float_t yhit, Float_t dx, Float_t dy);
52 // Stepper
53 virtual void NextPad();
54 // Condition
55 virtual Int_t MorePads();
56 //
57 // Distance between 1 pad and a position
58 virtual Float_t Distance2AndOffset(Int_t iX, Int_t iY, Float_t X, Float_t Y, Int_t *
59dummy);
60 // Number of pads read in parallel and offset to add to x
61 // (specific to LYON, but mandatory for display)
62 virtual void GetNParallelAndOffset(Int_t iX, Int_t iY,
63 Int_t *Nparallel, Int_t *Offset) {*Nparallel=1;*Offset=0;}
64 // Get next neighbours
65 virtual void Neighbours
66 (Int_t iX, Int_t iY, Int_t* Nlist, Int_t Xlist[10], Int_t Ylist[10]);
67 // Provisory RecCluster coordinates reconstructor
68 virtual void FitXY(AliMUONRecCluster* Cluster,TClonesArray* MUONdigits);
69 //
70 // Current Pad during Integration
71 // x-coordinaten
72 virtual Int_t Ix(){return fix;}
73 // y-coordinate
74 virtual Int_t Iy(){return fiy;}
75 // current sector
76 virtual Int_t ISector(){return 1;}
77 // calculate sector from pad coordinates
78 virtual Int_t Sector(Int_t ix, Int_t iy) {return 1;}
79 //
80 // Signal Generation Condition during Stepping
81 virtual Int_t SigGenCond(Float_t x, Float_t y, Float_t z);
82 // Initialise signal gneration at coord (x,y,z)
83 virtual void SigGenInit(Float_t x, Float_t y, Float_t z);
84 // Current integration limits
85 virtual void IntegrationLimits
86 (Float_t& x1, Float_t& x2, Float_t& y1, Float_t& y2);
87 // Test points for auto calibration
88 virtual void GiveTestPoints(Int_t &n, Float_t *x, Float_t *y);
89 // Debugging utilities
90 virtual void Draw();
91 // Function for systematic corrections
92 virtual void SetCorrFunc(Int_t dum, TF1* func) {fCorr=func;}
93
94 virtual TF1* CorrFunc(Int_t) {return fCorr;}
95
96
97 ClassDef(AliMUONsegmentationV0,1)
98 protected:
99 //
100 // Implementation of the segmentation data
101 // Version 0 models rectangular pads with the same dimensions all
102 // over the cathode plane
103 //
104 // geometry
105 //
106 Float_t fDpx; // x pad width per sector
107 Float_t fDpy; // y pad base width
108 Int_t fNpx; // Number of pads in x
109 Int_t fNpy; // Number of pads in y
110 Float_t fWireD; // wire pitch
111 Float_t fRmin; // inner radius
112 Float_t fRmax; // outer radius
113
114
115 // Chamber region consideres during disintegration
116 Int_t fixmin; // lower left x
117 Int_t fixmax; // lower left y
118 Int_t fiymin; // upper right x
119 Int_t fiymax; // upper right y
120 //
121 // Current pad during integration (cursor for disintegration)
122 Int_t fix; // pad coord. x
123 Int_t fiy; // pad coord. y
124 Float_t fx; // x
125 Float_t fy; // y
126 //
127 // Current pad and wire during tracking (cursor at hit centre)
128 //
129 //
130 Float_t fxhit;
131 Float_t fyhit;
132 // Reference point to define signal generation condition
133 Int_t fixt; // pad coord. x
134 Int_t fiyt; // pad coord. y
135 Int_t fiwt; // wire number
136 Float_t fxt; // x
137 Float_t fyt; // y
138 TF1* fCorr; // correction function
139
140};
141
142class AliMUONresponseV0 : //Mathieson response
143public AliMUONresponse {
144 public:
145 AliMUONresponseV0(){}
146 virtual ~AliMUONresponseV0(){}
147 //
148 // Configuration methods
149 //
150 // Number of sigmas over which cluster didintegration is performed
151 virtual void SetSigmaIntegration(Float_t p1) {fSigmaIntegration=p1;}
152 virtual Float_t SigmaIntegration() {return fSigmaIntegration;}
153 // charge slope in ADC/e
154 virtual void SetChargeSlope(Float_t p1) {fChargeSlope=p1;}
155 virtual Float_t ChargeSlope() {return fChargeSlope;}
156 // sigma of the charge spread function
157 virtual void SetChargeSpread(Float_t p1, Float_t p2)
158 {fChargeSpreadX=p1; fChargeSpreadY=p2;}
159 virtual Float_t ChargeSpreadX() {return fChargeSpreadX;}
160 virtual Float_t ChargeSpreadY() {return fChargeSpreadY;}
161 // Adc-count saturation value
162 virtual void SetMaxAdc(Float_t p1) {fMaxAdc=p1;}
163 virtual Float_t MaxAdc() {return fMaxAdc;}
164 // anode cathode Pitch
165 virtual Float_t Pitch() {return fPitch;}
166 virtual void SetPitch(Float_t p1) {fPitch=p1;};
167 // Mathieson parameters
168 virtual void SetSqrtKx3(Float_t p1) {fSqrtKx3=p1;};
169 virtual void SetKx2(Float_t p1) {fKx2=p1;};
170 virtual void SetKx4(Float_t p1) {fKx4=p1;};
171 virtual void SetSqrtKy3(Float_t p1) {fSqrtKy3=p1;};
172 virtual void SetKy2(Float_t p1) {fKy2=p1;};
173 virtual void SetKy4(Float_t p1) {fKy4=p1;};
174
175 //
176 // Chamber response methods
177 // Pulse height from scored quantity (eloss)
178 virtual Float_t IntPH(Float_t eloss);
179 // Charge disintegration
180 virtual Float_t IntXY(AliMUONsegmentation * segmentation);
181
182 ClassDef(AliMUONresponseV0,1)
183 protected:
184 Float_t fChargeSlope; // Slope of the charge distribution
185 Float_t fChargeSpreadX; // Width of the charge distribution in x
186 Float_t fChargeSpreadY; // Width of the charge distribution in y
187 Float_t fSigmaIntegration; // Number of sigma's used for charge distribution
188 Float_t fMaxAdc; // Maximum ADC channel
189 Float_t fSqrtKx3; // Mathieson parameters for x
190 Float_t fKx2;
191 Float_t fKx4;
192 Float_t fSqrtKy3; // Mathieson parameters for y
193 Float_t fKy2;
194 Float_t fKy4;
195 Float_t fPitch; //anode-cathode pitch
196};
197#endif
198
199
200
201
202
203
204
205
206
207
208