]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/AliMUONSegmentationV0.h
Mainly coding conventions + some small bug fixes
[u/mrichter/AliRoot.git] / MUON / AliMUONSegmentationV0.h
CommitLineData
a9e2aefa 1#ifndef ALIMUONSEGMENTATIONV0_H
2#define ALIMUONSEGMENTATIONV0_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$ */
a897a37a 7
a30a000f 8#include "AliSegmentation.h"
a897a37a 9
a9e2aefa 10//----------------------------------------------
11//
12// Chamber segmentation for homogeneously segmented circular chamber
13//
14class AliMUONSegmentationV0 :
a30a000f 15public AliSegmentation {
a897a37a 16 public:
a9e2aefa 17 AliMUONSegmentationV0(){}
18 AliMUONSegmentationV0(const AliMUONSegmentationV0 & segmentation);
19
20 virtual ~AliMUONSegmentationV0(){}
a897a37a 21 // Set Chamber Segmentation Parameters
22 //
23 // Pad size Dx*Dy
a9e2aefa 24 virtual void SetPadSize(Float_t p1, Float_t p2);
a897a37a 25 // Anod Pitch
26 virtual void SetDAnod(Float_t D) {fWireD = D;};
27 // Transform from pad (wire) to real coordinates and vice versa
28 //
29 // Anod wire coordinate closest to xhit
30 virtual Float_t GetAnod(Float_t xhit);
31 // Transform from pad to real coordinates
a30a000f 32 virtual void GetPadI(Float_t x, Float_t y , Int_t &ix, Int_t &iy);
33 virtual void GetPadI(Float_t x, Float_t y , Float_t z, Int_t &ix, Int_t &iy)
34 {GetPadI(x, y, ix, iy);}
a897a37a 35 // Transform from real to pad coordinates
a30a000f 36 virtual void GetPadC(Int_t ix, Int_t iy, Float_t &x, Float_t &y);
37 virtual void GetPadC(Int_t ix, Int_t iy, Float_t &x, Float_t &y, Float_t &z)
38 {z=0; GetPadC(ix, iy, x , y);}
a897a37a 39 //
40 // Initialisation
d81db581 41 virtual void Init(Int_t chamber);
a897a37a 42 //
43 // Get member data
44 //
45 // Pad size in x
46 virtual Float_t Dpx(){return fDpx;}
47 // Pad size in y
48 virtual Float_t Dpy(){return fDpy;}
49 // Pad size in x by Sector
50 virtual Float_t Dpx(Int_t) {return fDpx;}
51 // Pad size in y by Secto
52 virtual Float_t Dpy(Int_t) {return fDpy;}
a9e2aefa 53 // Maximum number of Pads in x
a897a37a 54 virtual Int_t Npx(){return fNpx;}
a9e2aefa 55 // Maximum number of Pads in y
a897a37a 56 virtual Int_t Npy(){return fNpy;}
a9e2aefa 57 // Set pad position
58 virtual void SetPad(Int_t ix, Int_t iy);
59 // Set hit position
60 virtual void SetHit(Float_t xhit, Float_t yhit);
24b005db 61 virtual void SetHit(Float_t xhit, Float_t yhit, Float_t zhit)
62 {SetHit(xhit, yhit);}
a897a37a 63 //
64 // Iterate over pads
65 // Initialiser
66 virtual void FirstPad(Float_t xhit, Float_t yhit, Float_t dx, Float_t dy);
24b005db 67 virtual void FirstPad(Float_t xhit, Float_t yhit, Float_t zhit, Float_t dx, Float_t dy)
68 {FirstPad(xhit, yhit, dx, dy);}
a897a37a 69 // Stepper
70 virtual void NextPad();
71 // Condition
72 virtual Int_t MorePads();
73 //
74 // Distance between 1 pad and a position
75 virtual Float_t Distance2AndOffset(Int_t iX, Int_t iY, Float_t X, Float_t Y, Int_t *
76dummy);
77 // Number of pads read in parallel and offset to add to x
78 // (specific to LYON, but mandatory for display)
a9e2aefa 79 virtual void GetNParallelAndOffset(Int_t iX, Int_t iY,
a897a37a 80 Int_t *Nparallel, Int_t *Offset) {*Nparallel=1;*Offset=0;}
81 // Get next neighbours
82 virtual void Neighbours
83 (Int_t iX, Int_t iY, Int_t* Nlist, Int_t Xlist[10], Int_t Ylist[10]);
a9e2aefa 84 //
a897a37a 85 // Current Pad during Integration
86 // x-coordinaten
87 virtual Int_t Ix(){return fix;}
88 // y-coordinate
89 virtual Int_t Iy(){return fiy;}
90 // current sector
91 virtual Int_t ISector(){return 1;}
92 // calculate sector from pad coordinates
a9e2aefa 93 virtual Int_t Sector(Int_t ix, Int_t iy) {return 1;}
a897a37a 94 //
95 // Signal Generation Condition during Stepping
96 virtual Int_t SigGenCond(Float_t x, Float_t y, Float_t z);
97 // Initialise signal gneration at coord (x,y,z)
98 virtual void SigGenInit(Float_t x, Float_t y, Float_t z);
99 // Current integration limits
100 virtual void IntegrationLimits
101 (Float_t& x1, Float_t& x2, Float_t& y1, Float_t& y2);
102 // Test points for auto calibration
103 virtual void GiveTestPoints(Int_t &n, Float_t *x, Float_t *y);
a9e2aefa 104 // Draw segmentation zones
ef42d733 105 virtual void Draw(const char *opt="");
a897a37a 106 // Function for systematic corrections
a9e2aefa 107 // Set the correction function
108 virtual void SetCorrFunc(Int_t dum, TF1* func) {fCorr=func;}
109 // Get the correction Function
110 virtual TF1* CorrFunc(Int_t) {return fCorr;}
111 // assignment operator
112 AliMUONSegmentationV0& operator=(const AliMUONSegmentationV0& rhs);
a897a37a 113
a9e2aefa 114 ClassDef(AliMUONSegmentationV0,1) //Class for homogeneous segmentation
115 protected:
a897a37a 116 //
a9e2aefa 117 // Implementation of the segmentation class:
a897a37a 118 // Version 0 models rectangular pads with the same dimensions all
a9e2aefa 119 // over the cathode plane. Chamber has circular geometry.
120 //
121 // Geometry parameters
a897a37a 122 //
123 Float_t fDpx; // x pad width per sector
124 Float_t fDpy; // y pad base width
125 Int_t fNpx; // Number of pads in x
126 Int_t fNpy; // Number of pads in y
127 Float_t fWireD; // wire pitch
128 Float_t fRmin; // inner radius
129 Float_t fRmax; // outer radius
130
131
132 // Chamber region consideres during disintegration
133 Int_t fixmin; // lower left x
134 Int_t fixmax; // lower left y
135 Int_t fiymin; // upper right x
136 Int_t fiymax; // upper right y
137 //
138 // Current pad during integration (cursor for disintegration)
a9e2aefa 139 Int_t fix; // pad coord. x
140 Int_t fiy; // pad coord. y
141 Float_t fx; // real coord. x
142 Float_t fy; // real ccord. y
a897a37a 143 //
144 // Current pad and wire during tracking (cursor at hit centre)
145 //
146 //
a9e2aefa 147 Float_t fxhit; // x-position of hit
148 Float_t fyhit; // y-position of hit
a897a37a 149 // Reference point to define signal generation condition
150 Int_t fixt; // pad coord. x
151 Int_t fiyt; // pad coord. y
152 Int_t fiwt; // wire number
153 Float_t fxt; // x
154 Float_t fyt; // y
155 TF1* fCorr; // correction function
a897a37a 156};
157#endif
158
159
160
161
162
163
164
165
166
167
168