Removing warnings ...
[u/mrichter/AliRoot.git] / MUON / AliMUONSegmentationSlat.h
CommitLineData
5de7d27f 1#ifndef ALIMUONSEGMENTATIONSLAT_H
2#define ALIMUONSEGMENTATIONSLAT_H
3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6/* $Id$ */
5de7d27f 7/////////////////////////////////////////////////////
8// Segmentation classes for slat modules //
9// to be used with AluMUONSegmentationSlat //
10/////////////////////////////////////////////////////
11
12#include "AliSegmentation.h"
13
14class TArrayI;
15class TObjArray;
16class AliMUONSegmentationSlatModule;
17class AliMUONChamber;
18
19
20class AliMUONSegmentationSlat :
21public AliSegmentation {
22 public:
23 AliMUONSegmentationSlat();
e9e4cdf2 24 AliMUONSegmentationSlat(Int_t nsec);
c2c0190f 25 virtual ~AliMUONSegmentationSlat();
5de7d27f 26 //
27 // Set Chamber Segmentation Parameters
28 //
29 // Pad size Dx*Dy
30 virtual void SetPadSize(Float_t p1, Float_t p2);
31 // Anod Pitch
32 virtual void SetDAnod(Float_t D) {fWireD = D;};
33
34 // Anod wire coordinate closest to xhit
35 virtual Float_t GetAnod(Float_t xhit) const;
36
37 void SetPadDivision(Int_t ndiv[4]);
38
39 // Transform from pad to real coordinates
40 virtual void GetPadI(Float_t x, Float_t y , Float_t z, Int_t &ix, Int_t &iy);
41 // Transform from real to pad coordinates
42 virtual void GetPadC(Int_t ix, Int_t iy, Float_t &x, Float_t &y, Float_t &z);
43 // Initialisation
44 virtual void Init(Int_t chamber);
45 //
46 // Get member data
47 //
48 //
49 // Pad size in x
50 virtual Float_t Dpx() const {return fDpx;}
51
52 // Pad size in y
53 virtual Float_t Dpy() const {return fDpy;}
54 // Pad size in x by Sector
55 virtual Float_t Dpx(Int_t isec) const;
56 // Pad size in y by Sector
57 virtual Float_t Dpy(Int_t isec) const;
58 // Maximum number of Pads in x
59 virtual Int_t Npx() const {return fNpx;}
60 // Maximum number of Pads in y
61 virtual Int_t Npy() const {return fNpy;}
62 //
63 virtual void SetPad(Int_t ix,Int_t iy);
64
65 virtual void SetHit(Float_t xhit, Float_t yhit, Float_t zhit);
66 //
67 // Iterate over pads
68 // Initialiser
69 virtual void FirstPad(Float_t xhit, Float_t yhit, Float_t zhit, Float_t dx, Float_t dy);
70 // Stepper
71 virtual void NextPad();
72 // Condition
73 virtual Int_t MorePads();
74 // Get next neighbours
75 virtual void Neighbours
76 (Int_t iX, Int_t iY, Int_t* Nlist, Int_t Xlist[10], Int_t Ylist[10]);
6aaf81e6 77 virtual Float_t Distance2AndOffset(Int_t iX, Int_t iY, Float_t X, Float_t Y, Int_t *dummy);
78 virtual void GetNParallelAndOffset(Int_t iX, Int_t iY, Int_t *Nparallel, Int_t *Offset);
5de7d27f 79 //
80 // Current Pad during Integration
81 // x-coordinate
82 virtual Int_t Ix();
83 // y-coordinate
84 virtual Int_t Iy();
85 // current sector
86 virtual Int_t ISector();
87 // calculate sector from pad coordinates
88 virtual Int_t Sector(Int_t ix, Int_t iy);
4193aa5d 89 virtual Int_t Sector(Float_t x, Float_t y)
90 {
91 Int_t ix, iy;
92 GetPadI(x,y,0.,ix,iy);
80ceb231 93 return Sector(ix,iy);
4193aa5d 94 }
95
5de7d27f 96 //
97 // Signal Generation Condition during Stepping
98 virtual Int_t SigGenCond(Float_t x, Float_t y, Float_t z);
99 // Initialise signal generation at coord (x,y,z)
100 virtual void SigGenInit(Float_t x, Float_t y, Float_t z);
101
102 //
103 // Integration
104 // Current integration limits
105 virtual void IntegrationLimits
106 (Float_t& x1, Float_t& x2, Float_t& y1, Float_t& y2);
107 //
108 // Class specific methods
109 virtual void SetNSlats(Int_t nslats) {fNSlats = nslats;}
110 virtual void SetShift(Float_t shift) {fShift = shift;}
111 virtual void SetNPCBperSector(Int_t *npcb);
112 virtual void SetSlatXPositions(Float_t *xpos);
2b202c2e 113 virtual void SetSlatYPosition(Float_t ypos) {fYPosOrigin = ypos;}
5de7d27f 114 virtual AliMUONSegmentationSlatModule* Slat(Int_t index) const;
115
116// Not used
117 // Test points for auto calibration
6aaf81e6 118 virtual void GiveTestPoints(Int_t &n, Float_t *x, Float_t *y) const;
5de7d27f 119 // Draw the segmentation zones
aaf4addd 120 virtual void Draw(const char *opt = "") const;
121
5de7d27f 122
123 // Function for systematic corrections
124 // Set the correction function
125 virtual void SetCorrFunc(Int_t, TF1*) {;}
126
127 // Get the correction Function
128 virtual TF1* CorrFunc(Int_t) const {return NULL;}
129 protected:
130
131 virtual void GlobalToLocal(
132 Float_t x, Float_t y, Float_t z, Int_t &islat, Float_t &xlocal, Float_t &ylocal);
133 virtual void GlobalToLocal(
134 Int_t ix, Int_t iy, Int_t &islat, Int_t &ixlocal, Int_t &iylocal);
135
136 virtual void LocalToGlobal(
137 Int_t islat, Float_t xlocal, Float_t ylocal, Float_t &x, Float_t &y, Float_t &z);
138 virtual void LocalToGlobal(
139 Int_t islat, Int_t ixlocal, Int_t iylocal, Int_t &ix, Int_t &iy);
2b202c2e 140 virtual void SetSymmetry(Int_t ix);
141 virtual void SetSymmetry(Float_t x);
5de7d27f 142 // Factory method for associated slat module class
143 virtual AliMUONSegmentationSlatModule* CreateSlatModule();
144
145 protected:
146
147 AliMUONChamber* fChamber; // Parent Chamber
aaf4addd 148 Int_t fId; // Identifier
5de7d27f 149 //
150 // Geometry
151 //
152 Float_t fWireD; // Wire Pitch
153 Int_t fNSlats; // Number of slats
2b202c2e 154 Int_t fPcb[15][4]; // PcbSegmentation
155 Float_t fXPosition[15]; // x-position of slats
156 Float_t fYPosOrigin; // y-Position of lowest slat
157 Float_t fYPosition[15]; // y-position of slats
158 Float_t fSlatX[15]; // Slat x-dimension
5de7d27f 159 Float_t fSlatY; // Slat y-dimension
160 Float_t fDpx; // Pad size x
161 Float_t fDpy; // Pad size y
162 Int_t fNpx; // maximum number of pads in x
163 Int_t fNpy; // maximum number of pads in y
2b202c2e 164 Int_t fSym; // signs for symmetry trafo
5de7d27f 165 Float_t fShift; // Half overlap of pad planes
166 Float_t fDz; // Half distance between slat planes
167
168 TArrayI* fNDiv; // Pad size division
169 // Slats
aaf4addd 170 TObjArray* fSlats; // Array of Slats
5de7d27f 171 // Proxy data
aaf4addd 172 AliMUONSegmentationSlatModule* fCurrentSlat; // Pointer to current slat
173 Int_t fSlatIndex; // Current slat index
174 ClassDef(AliMUONSegmentationSlat,1) // Segmentation for Muon Chamber built from Slat Modules
5de7d27f 175};
176
177
178#endif
179
180
181
182
183
184
185
186
187