a897a37a |
1 | #ifndef MUONSegResV01_H |
2 | #define MUONSegResV01_H |
3da30618 |
3 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * |
4 | * See cxx source for full Copyright notice */ |
5 | |
a897a37a |
6 | ///////////////////////////////////////////////////// |
7 | // Segmentation and Response classes version 01 // |
8 | ///////////////////////////////////////////////////// |
9 | |
10 | #include "AliMUON.h" |
11 | #include "AliMUONSegResV0.h" |
12 | #include "TArrayF.h" |
13 | #include "TArrayI.h" |
14 | #include "TObjArray.h" |
15 | |
a9e2aefa |
16 | class AliMUONSegmentationV01 : |
17 | public AliMUONSegmentationV0 { |
a897a37a |
18 | public: |
a9e2aefa |
19 | AliMUONSegmentationV01(); |
20 | virtual ~AliMUONSegmentationV01(){} |
a897a37a |
21 | // |
22 | // Set Chamber Segmentation Parameters |
23 | // |
24 | virtual void SetPadDivision(Int_t ndiv[4]); |
25 | // Radii |
26 | virtual void SetSegRadii(Float_t r[4]); |
27 | // |
28 | // Transform from pad (wire) to real coordinates and vice versa |
29 | // |
30 | // Transform from pad to real coordinates |
31 | virtual void GetPadIxy(Float_t x ,Float_t y ,Int_t &ix,Int_t &iy); |
32 | // Transform from real to pad coordinates |
33 | virtual void GetPadCxy(Int_t ix,Int_t iy,Float_t &x ,Float_t &y ); |
34 | // |
35 | // Initialisation |
a9e2aefa |
36 | virtual void Init(AliMUONChamber*); |
a897a37a |
37 | // |
38 | // Get member data |
39 | // |
40 | // Pad size in x by Sector |
41 | virtual Float_t Dpx(Int_t isec); |
42 | // Pad size in y by Sector |
43 | virtual Float_t Dpy(Int_t isec); |
44 | // Max number of Pads in x |
45 | virtual Int_t Npx(){return fNpxS[fNsec-1][1]+1;} |
46 | // |
47 | virtual void SetPad(Int_t,Int_t); |
48 | // |
49 | // Iterate over pads |
50 | // Initialiser |
51 | virtual void FirstPad(Float_t xhit, Float_t yhit, Float_t dx, Float_t dy); |
52 | // Stepper |
53 | virtual void NextPad(); |
54 | // Condition |
55 | virtual Int_t MorePads(); |
56 | // Get next neighbours |
57 | virtual void Neighbours |
58 | (Int_t iX, Int_t iY, Int_t* Nlist, Int_t Xlist[10], Int_t Ylist[10]); |
a9e2aefa |
59 | // |
a897a37a |
60 | // Current Pad during Integration |
61 | // current sector |
62 | virtual Int_t ISector() {return fSector;} |
63 | // calculate sector from pad coordinates |
64 | virtual Int_t Sector(Int_t ix, Int_t iy); |
65 | // |
66 | // Integration |
67 | // Current integration limits |
68 | virtual void IntegrationLimits |
69 | (Float_t& x1, Float_t& x2, Float_t& y1, Float_t& y2); |
a9e2aefa |
70 | // Test points for auto calibration |
a897a37a |
71 | void GiveTestPoints(Int_t &n, Float_t *x, Float_t *y); |
72 | // |
a9e2aefa |
73 | // Draw segmentation zones |
74 | virtual void Draw(); |
a897a37a |
75 | // Function for systematic corrections |
a9e2aefa |
76 | // Set the correction function |
a897a37a |
77 | virtual void SetCorrFunc(Int_t dum, TF1* func); |
a9e2aefa |
78 | // Get the correction function |
a897a37a |
79 | virtual TF1* CorrFunc(Int_t); |
a9e2aefa |
80 | ClassDef(AliMUONSegmentationV01,1) // Segmentation approximating circular zones with different pad size |
a897a37a |
81 | protected: |
a9e2aefa |
82 | // Geometry |
a897a37a |
83 | // |
84 | Int_t fNsec; // Number of sectors |
a9e2aefa |
85 | TArrayF fRSec; // Sector outer radia |
86 | TArrayI fNDiv; // Pad size division |
a897a37a |
87 | TArrayF fDpxD; // y pad width per sector |
a9e2aefa |
88 | // Segmentation map |
a897a37a |
89 | Int_t fNpxS[10][1000]; // Number of pads per sector in x |
90 | Float_t fCx[10][1000]; // pad-sector contour x vs y |
91 | // Chamber region consideres during disintegration |
92 | // (lower left and upper right corner) |
93 | // |
a9e2aefa |
94 | Float_t fxmin; // lower left x |
95 | Float_t fxmax; // lower left y |
96 | Float_t fymin; // upper right x |
97 | Float_t fymax; // upper right y |
a897a37a |
98 | |
99 | // |
100 | // Current pad during integration (cursor for disintegration) |
a9e2aefa |
101 | Int_t fSector; // Current sector |
102 | // |
103 | TObjArray *fCorr; // Correction functions |
a897a37a |
104 | }; |
105 | #endif |
106 | |
107 | |
108 | |
109 | |
110 | |
111 | |