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