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