Remove warnings on HP-UX
[u/mrichter/AliRoot.git] / MUON / AliMUONSegResV1.h
CommitLineData
a897a37a 1#ifndef MUONSegResV1_H
2#define MUONSegResV1_H
3/////////////////////////////////////////////////////////
4// Manager and hits classes for set:MUON version 0 //
5/////////////////////////////////////////////////////////
6
7#include "AliMUONSegRes.h"
8
9const Int_t NZONE = 3; // Specific for chamber with equal pads
10const Int_t NZONEm1 = 2; // NZONE - 1
11const Int_t NZONECUT = 30;
12
13class AliMUONsegmentationV1 :
14public AliMUONsegmentation {
15 public:
16 AliMUONsegmentationV1();
17 virtual ~AliMUONsegmentationV1(){}
18 //
19 // Set Chamber Segmentation Parameters
20 void SetNzone(Int_t N) {fNzone = N;};
21 virtual void SetPADSIZ(Float_t p1, Float_t p2);
22 void SetSensOffset(Float_t Offset) {fSensOffset = Offset;};
23 void SetDAnod(Float_t D) {fDAnod = D;};
24 // max x and y for the zone in number of pads units
25 //(WARNING : first pad is labelled 0 !!)
26 virtual void AddCut(Int_t Zone, Int_t nX, Int_t nY);
27 virtual void DefaultCut(void);
28
29 //
30 // Initialisation
31 virtual void Init(AliMUONchamber*);
32 //
33 // Get member data
34 virtual Float_t Dpx(){return fDpx;}
35 virtual Float_t Dpy(){return fDpy;}
36 virtual Float_t Dpx(Int_t i){return fDpx;}
37 virtual Float_t Dpy(Int_t i){return fDpy;}
38 virtual Int_t Npx(){return fNpx;}
39 virtual Int_t Npy(){return fNpy;}
40 virtual Float_t GetRealDpx(Int_t isec) {return fDpx;}
41 //
42 // know the zone of segmentation
43 virtual Int_t GetZone(Float_t X, Float_t Y);
44 virtual Int_t GetZone(Int_t X, Int_t Y);
45 //
46 // Transform from pad (wire) to real coordinates and vice versa
47 virtual Int_t GetiAnod(Float_t xhit);
48 virtual Float_t GetAnod(Float_t xhit);
49 virtual void GetPadIxy(Float_t x ,Float_t y ,Int_t &ix,Int_t &iy);
50 virtual void GetPadCxy(Int_t ix,Int_t iy,Float_t &x ,Float_t &y );
51 // set pad position
52 virtual void SetPad(Int_t, Int_t);
53 // set hit position
54 virtual void SetHit(Float_t, Float_t);
55 //
56 // Iterate over pads
57 virtual void SetPadCoord(Int_t iX, Int_t iY);
58 virtual void FirstPad(Float_t xhit, Float_t yhit, Float_t dx, Float_t dy);
59 virtual void NextPad();
60 virtual Int_t MorePads();
61 // Get next neighbours
62 virtual void Neighbours // implementation Neighbours function
63 (Int_t iX, Int_t iY, Int_t* Nlist, Int_t *Xlist, Int_t *Ylist);
64 virtual void NeighboursDiag // with diagonal elements
65 (Int_t iX, Int_t iY, Int_t* Nlist, Int_t *Xlist, Int_t *Ylist);
66 virtual void NeighboursNonDiag // without diagonal elements
67 (Int_t iX, Int_t iY, Int_t* Nlist, Int_t *Xlist, Int_t *Ylist);
68 void CleanNeighbours(Int_t* Nlist, Int_t *Xlist, Int_t *Ylist);
69 // Provisory RecCluster coordinates reconstructor
70 virtual void FitXY(AliMUONRecCluster* Cluster,TClonesArray* MUONdigits);
71 //
72 // Channel number expressed in pad coordinates (stored in Cluster)
73 virtual Int_t Ix(Int_t trueX, Int_t trueY);
74 virtual Int_t Ix();
75 virtual Int_t Iy(){return fiy;}
76 // Actual number of pad in the chain
77 virtual Int_t ISector();
78 virtual Int_t Sector(Int_t ix, Int_t iy) {return 1;}
79 // Position of pad in perellel read-out
80 virtual Int_t IsParallel2(Int_t iX, Int_t iY);
81 virtual Int_t IsParallel3(Int_t iX, Int_t iY);
82 // Number of pads read in parallel
83 virtual Int_t NParallel2(Int_t iX, Int_t iY);
84 virtual Int_t NParallel3(Int_t iX, Int_t iY);
85 //
86 // Number of pads read in parallel and offset to add to x
87 virtual void GetNParallelAndOffset(Int_t iX, Int_t iY,
88 Int_t *Nparallel, Int_t *Offset);
89 // Minimum distance between 1 pad and a position
90 virtual Float_t Distance2AndOffset(Int_t iX, Int_t iY, Float_t X, Float_t Y, Int_t *Offset);
91 //
92 // Signal Generation Condition during Stepping
93 Int_t SigGenCond(Float_t x, Float_t y, Float_t z);
94 void SigGenInit(Float_t x, Float_t y, Float_t z);
95 void GiveTestPoints(Int_t &n, Float_t *x, Float_t *y);
96 virtual void IntegrationLimits
97 (Float_t& x1, Float_t& x2, Float_t& y1, Float_t& y2);
98 //
99 virtual void Draw(){;}
100 // Function for systematic corrections
101 virtual void SetCorrFunc(Int_t dum, TF1* func) {fCorr=func;}
102 virtual TF1* CorrFunc(Int_t) {return fCorr;}
103
104 //
105 // Identification
106 virtual char* YourName() {return fName;}
107
108 ClassDef(AliMUONsegmentationV1,1)
109 protected:
110 //
111 // Implementation of the segmentation data
112 // Version This models rectangular pads with the same dimensions all
113 // over the cathode plane but let the possibilit for different design
114 //
115 // geometry
116 Int_t fNzone; // Number of differents sensitive zones
117 Float_t fDpx; // X pad width
118 Float_t fDpy; // Y pad width
119 Int_t fNZoneCut[NZONEm1]; // Number of cuts for given zone
120 Int_t fZoneX[NZONEm1][NZONECUT]; // X descriptor of zone segmentations
121 Int_t fZoneY[NZONEm1][NZONECUT]; // Y descriptor of zone segmentations
122 Float_t frSensMax2; // square of maximum sensitive radius
123 Float_t frSensMin2; // square of minimum sensitive radius
124 Int_t fNpx; // Maximum number of pads along x
125 Int_t fNpy; // Maximum number of pads along y
126 Float_t fDAnod; // Anod gap
127 Float_t fSensOffset; // Offset of sensitive zone with respect to quadrant (positive)
128
129 // Chamber region consideres during disintegration (lower left and upper right corner)
130 //
131 Int_t fixmin;
132 Int_t fixmax;
133 Int_t fiymin;
134 Int_t fiymax;
135 //
136 // Current pad during integration (cursor for disintegration)
137 Int_t fix;
138 Int_t fiy;
139 Float_t fx;
140 Float_t fy;
141 //
142 // Current pad and wire during tracking (cursor at hit centre)
143 Int_t fixt;
144 Int_t fiyt;
145 Int_t fiwt;
146 Float_t fxt;
147 Float_t fyt;
148 Float_t fxhit;
149 Float_t fyhit;
150
151 TF1* fCorr;
152
153 //
154 // Version Identifier
155 char *fName;
156
157
158
159};
160
161#endif
162
163