Remove several warnings
[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;}
e3a4d40e 36 virtual Float_t Dpx(Int_t ){return fDpx;}
37 virtual Float_t Dpy(Int_t ){return fDpy;}
a897a37a 38 virtual Int_t Npx(){return fNpx;}
39 virtual Int_t Npy(){return fNpy;}
e3a4d40e 40 virtual Float_t GetRealDpx(Int_t ) {return fDpx;}
a897a37a 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);
a897a37a 69 // Channel number expressed in pad coordinates (stored in Cluster)
70 virtual Int_t Ix(Int_t trueX, Int_t trueY);
71 virtual Int_t Ix();
72 virtual Int_t Iy(){return fiy;}
73 // Actual number of pad in the chain
74 virtual Int_t ISector();
e3a4d40e 75 virtual Int_t Sector(Int_t , Int_t ) {return 1;}
a897a37a 76 // Position of pad in perellel read-out
77 virtual Int_t IsParallel2(Int_t iX, Int_t iY);
78 virtual Int_t IsParallel3(Int_t iX, Int_t iY);
79 // Number of pads read in parallel
80 virtual Int_t NParallel2(Int_t iX, Int_t iY);
81 virtual Int_t NParallel3(Int_t iX, Int_t iY);
82 //
83 // Number of pads read in parallel and offset to add to x
84 virtual void GetNParallelAndOffset(Int_t iX, Int_t iY,
85 Int_t *Nparallel, Int_t *Offset);
86 // Minimum distance between 1 pad and a position
87 virtual Float_t Distance2AndOffset(Int_t iX, Int_t iY, Float_t X, Float_t Y, Int_t *Offset);
88 //
89 // Signal Generation Condition during Stepping
90 Int_t SigGenCond(Float_t x, Float_t y, Float_t z);
91 void SigGenInit(Float_t x, Float_t y, Float_t z);
92 void GiveTestPoints(Int_t &n, Float_t *x, Float_t *y);
93 virtual void IntegrationLimits
94 (Float_t& x1, Float_t& x2, Float_t& y1, Float_t& y2);
95 //
e3a4d40e 96 virtual void Draw(Option_t *){;}
a897a37a 97 // Function for systematic corrections
e3a4d40e 98 virtual void SetCorrFunc(Int_t , TF1* func) {fCorr=func;}
a897a37a 99 virtual TF1* CorrFunc(Int_t) {return fCorr;}
100
101 //
102 // Identification
103 virtual char* YourName() {return fName;}
104
105 ClassDef(AliMUONsegmentationV1,1)
106 protected:
107 //
108 // Implementation of the segmentation data
109 // Version This models rectangular pads with the same dimensions all
110 // over the cathode plane but let the possibilit for different design
111 //
112 // geometry
113 Int_t fNzone; // Number of differents sensitive zones
114 Float_t fDpx; // X pad width
115 Float_t fDpy; // Y pad width
116 Int_t fNZoneCut[NZONEm1]; // Number of cuts for given zone
117 Int_t fZoneX[NZONEm1][NZONECUT]; // X descriptor of zone segmentations
118 Int_t fZoneY[NZONEm1][NZONECUT]; // Y descriptor of zone segmentations
119 Float_t frSensMax2; // square of maximum sensitive radius
120 Float_t frSensMin2; // square of minimum sensitive radius
121 Int_t fNpx; // Maximum number of pads along x
122 Int_t fNpy; // Maximum number of pads along y
123 Float_t fDAnod; // Anod gap
124 Float_t fSensOffset; // Offset of sensitive zone with respect to quadrant (positive)
125
126 // Chamber region consideres during disintegration (lower left and upper right corner)
127 //
128 Int_t fixmin;
129 Int_t fixmax;
130 Int_t fiymin;
131 Int_t fiymax;
132 //
133 // Current pad during integration (cursor for disintegration)
134 Int_t fix;
135 Int_t fiy;
136 Float_t fx;
137 Float_t fy;
138 //
139 // Current pad and wire during tracking (cursor at hit centre)
140 Int_t fixt;
141 Int_t fiyt;
142 Int_t fiwt;
143 Float_t fxt;
144 Float_t fyt;
145 Float_t fxhit;
146 Float_t fyhit;
147
148 TF1* fCorr;
149
150 //
151 // Version Identifier
152 char *fName;
153
154
155
156};
157
158#endif
159
160