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