]> git.uio.no Git - u/mrichter/AliRoot.git/blame - RICH/AliRICHSegmentationV0.h
Added member data and getters for padplane dimensions
[u/mrichter/AliRoot.git] / RICH / AliRICHSegmentationV0.h
CommitLineData
237c933d 1#ifndef ALIRICHSEGMENTATIONV0_H
2#define ALIRICHSEGMENTATIONV0_H
3
4
5/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
6 * See cxx source for full Copyright notice */
7
8/* $Id$ */
9
a2f7eaf6 10#include "AliSegmentation.h"
237c933d 11
12class AliRICHSegmentationV0 :
a2f7eaf6 13public AliSegmentation {
237c933d 14 public:
15 AliRICHSegmentationV0(){}
16 virtual ~AliRICHSegmentationV0(){}
17 //
18 // Set Chamber Segmentation Parameters
19 //
20 // Pad size Dx*Dy
21 virtual void SetPadSize(Float_t p1, Float_t p2);
22 // Anod Pitch
23 virtual void SetDAnod(Float_t D) {fWireD = D;};
24
25 //
26 // Transform from pad (wire) to real coordinates and vice versa
27 //
28 // Anod wire coordinate closest to xhit
a2f7eaf6 29 virtual Float_t GetAnod(Float_t xhit) const;
237c933d 30 // Transform from pad to real coordinates
a2f7eaf6 31 virtual void GetPadI(Float_t x, Float_t y , Int_t &ix, Int_t &iy);
32 virtual void GetPadI(Float_t x, Float_t y , Float_t z, Int_t &ix, Int_t &iy)
33 {GetPadI(x, y, ix, iy);}
237c933d 34 // Transform from real to pad coordinates
a2f7eaf6 35 virtual void GetPadC(Int_t ix, Int_t iy, Float_t &x, Float_t &y);
36 virtual void GetPadC(Int_t ix, Int_t iy, Float_t &x, Float_t &y, Float_t &z)
37 {z=0; GetPadC(ix, iy, x , y);}
237c933d 38 //
39 // Initialisation
a2f7eaf6 40 virtual void Init(Int_t id);
237c933d 41 //
42 // Get member data
43 //
44 // Pad size in x
a2f7eaf6 45 virtual Float_t Dpx() const {return fDpx;}
237c933d 46 //
47 // Pad size in y
a2f7eaf6 48 virtual Float_t Dpy() const {return fDpy;}
237c933d 49 // Pad size in x by Sector
a2f7eaf6 50 virtual Float_t Dpx(Int_t) const {return fDpx;}
237c933d 51 // Pad size in y by Sector
a2f7eaf6 52 virtual Float_t Dpy(Int_t) const {return fDpy;}
237c933d 53 // Max number of Pads in x
a2f7eaf6 54 virtual Int_t Npx() const {return fNpx;}
237c933d 55 // Max number of Pads in y
a2f7eaf6 56 virtual Int_t Npy() const {return fNpy;}
237c933d 57
58
59 // set pad position
60 virtual void SetPad(Int_t ix, Int_t iy);
61 // set hit position
62 virtual void SetHit(Float_t xhit , Float_t yhit);
a2f7eaf6 63 virtual void SetHit(Float_t xhit, Float_t yhit, Float_t zhit)
64 {SetHit(xhit, yhit);}
237c933d 65 //
66 // Iterate over pads
67 // Initialiser
68 virtual void FirstPad(Float_t xhit, Float_t yhit, Float_t dx, Float_t dy);
a2f7eaf6 69 virtual void FirstPad(Float_t xhit, Float_t yhit, Float_t zhit, Float_t dx, Float_t dy)
70 {FirstPad(xhit, yhit, dx, dy);}
237c933d 71 // Stepper
72 virtual void NextPad();
73 // Condition
74 virtual Int_t MorePads();
75 //
76 // Distance between 1 pad and a position
77 virtual Float_t Distance2AndOffset(Int_t iX, Int_t iY, Float_t X, Float_t Y, Int_t *
78 dummy);
79 // Number of pads read in parallel and offset to add to x
80 // (specific to LYON, but mandatory for display)
81 virtual void GetNParallelAndOffset(Int_t iX, Int_t iY,
82 Int_t *Nparallel, Int_t *Offset) {*Nparallel=1;*Offset=0;}
83 // Get next neighbours
84 virtual void Neighbours
85 (Int_t iX, Int_t iY, Int_t* Nlist, Int_t Xlist[10], Int_t Ylist[10]);
86 //
87 // Current Pad during Integration
88 // x-coordinate
a2f7eaf6 89 virtual Int_t Ix() {return fIx;}
237c933d 90 // y-coordinate
a2f7eaf6 91 virtual Int_t Iy() {return fIy;}
237c933d 92 // current sector
a2f7eaf6 93 virtual Int_t ISector() {return 1;}
237c933d 94 // calculate sector from x-y coordinates
a2f7eaf6 95 virtual Int_t Sector(Int_t ix, Int_t iy) {return 1;}
237c933d 96 //
97 // Signal Generation Condition during Stepping
98 virtual Int_t SigGenCond(Float_t x, Float_t y, Float_t z);
99 // Initialise signal gneration at coord (x,y,z)
100 virtual void SigGenInit(Float_t x, Float_t y, Float_t z);
101 // Current integration limits
102 virtual void IntegrationLimits
103 (Float_t& x1, Float_t& x2, Float_t& y1, Float_t& y2);
104 // Test points for auto calibration
a2f7eaf6 105 virtual void GiveTestPoints(Int_t &n, Float_t *x, Float_t *y) const;
237c933d 106 // Debugging utilities
a2f7eaf6 107 virtual void Draw(const char* = "") const;
237c933d 108 // Function for systematic corrections
109 virtual void SetCorrFunc(Int_t dum, TF1* func) {fCorr=func;}
bf88e9dd 110
111 // Getters for padplane dimensions
112 virtual Float_t GetPadPlaneWidth() {return fPadPlane_Width;}
113 virtual Float_t GetPadPlaneLength() {return fPadPlane_Length;}
237c933d 114
a2f7eaf6 115 virtual TF1* CorrFunc(Int_t) const {return fCorr;}
237c933d 116 ClassDef(AliRICHSegmentationV0,1)
117 protected:
118 //
119 // Implementation of the segmentation data
120 // Version 0 models rectangular pads with the same dimensions all
121 // over the cathode plane
122 //
123 // geometry
124 //
125 Float_t fDpx; // x pad width per sector
126 Float_t fDpy; // y pad base width
127 Int_t fNpx; // Number of pads in x
128 Int_t fNpy; // Number of pads in y
129 Int_t fSector; // Current padplane
130 Float_t fWireD; // wire pitch
131
bf88e9dd 132 Float_t fPadPlane_Width; //width of CsI padplanes
133 Float_t fPadPlane_Length; //length of CsI padplanes
237c933d 134
135
136 // Chamber region consideres during disintegration (lower left and upper right corner)
137 //
72e468a5 138 Int_t fIxmin; // lower left x
139 Int_t fIxmax; // lower left y
140 Int_t fIymin; // upper right x
141 Int_t fIymax; // upper right y
237c933d 142 //
143 // Current pad during integration (cursor for disintegration)
72e468a5 144 Int_t fIx; // pad coord. x
145 Int_t fIy; // pad coord. y
146 Float_t fX; // x
147 Float_t fY; // y
237c933d 148 //
149 // Current pad and wire during tracking (cursor at hit centre)
72e468a5 150 Float_t fXhit; //x position
151 Float_t fYhit; //y position
237c933d 152 // Reference point to define signal generation condition
72e468a5 153 Int_t fIxt; // pad coord. x
154 Int_t fIyt; // pad coord. y
155 Int_t fIwt; // wire number
156 Float_t fXt; // x
157 Float_t fYt; // y
237c933d 158 TF1* fCorr; // correction function
159};
160#endif
72e468a5 161
162