]>
Commit | Line | Data |
---|---|---|
fe4da5cc | 1 | #ifndef AliMagF_H |
2 | #define AliMagF_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$ */ | |
fe4da5cc | 7 | |
8 | #include "TNamed.h" | |
9 | #include "TVector.h" | |
10 | ||
7a15f6b8 | 11 | enum Field_t {Undef=1, Const=1, ConMesh=2, DipoMap=3}; |
fe4da5cc | 12 | |
13 | class AliMagF : public TNamed { | |
14 | ||
15 | protected: | |
16 | Int_t fMap; // Field Map identifier | |
17 | Int_t fType; // Mag Field type | |
18 | Int_t fInteg; // Integration method as indicated in Geant | |
19 | Float_t fFactor; // Multiplicative factor | |
20 | Float_t fMax; // Max Field as indicated in Geant | |
21 | ||
22 | public: | |
23 | AliMagF(){} | |
24 | AliMagF(const char *name, const char *title, const Int_t integ, const Int_t map, | |
25 | const Float_t factor, const Float_t fmax); | |
26 | virtual ~AliMagF() {} | |
27 | virtual void Field(Float_t *x, Float_t *b); | |
28 | virtual Int_t Type() {return fType;} | |
29 | virtual Float_t Max() const {return fMax;} | |
30 | virtual Int_t Map() const {return fMap;} | |
31 | virtual Int_t Integ() const {return fInteg;} | |
32 | virtual Float_t Factor() const {return fFactor;} | |
33 | virtual void ReadField() {} | |
34 | ||
35 | ClassDef(AliMagF,1) //Base class for all Alice MagField | |
36 | }; | |
37 | ||
38 | class AliMagFC : public AliMagF | |
39 | { | |
40 | //Alice Constant Magnetic Field | |
41 | private: | |
42 | ||
43 | public: | |
44 | AliMagFC(){} | |
45 | AliMagFC(const char *name, const char *title, const Int_t integ, const Int_t map, | |
46 | const Float_t factor, const Float_t fmax); | |
47 | virtual ~AliMagFC() {} | |
48 | virtual void Field(Float_t *x, Float_t *b); | |
49 | virtual void ReadField() {} | |
50 | ||
51 | ClassDef(AliMagFC,1) //Class for all Alice Constant MagField | |
52 | }; | |
53 | ||
54 | class AliMagFCM : public AliMagF | |
55 | { | |
56 | //Alice Magnetic Field with constan mesh | |
57 | protected: | |
58 | ||
59 | Float_t fXbeg; // Start of mesh in x | |
60 | Float_t fYbeg; // Start of mesh in y | |
61 | Float_t fZbeg; // Start of mesh in z | |
62 | Float_t fXdel; // Mesh step in x | |
63 | Float_t fYdel; // Mesh step in y | |
64 | Float_t fZdel; // Mesh step in z | |
65 | Double_t fXdeli; // Inverse of Mesh step in x | |
66 | Double_t fYdeli; // Inverse of Mesh step in y | |
67 | Double_t fZdeli; // Inverse of Mesh step in z | |
68 | Int_t fXn; // Number of mesh points in x | |
69 | Int_t fYn; // Number of mesh points in y | |
70 | Int_t fZn; // Number of mesh points in z | |
71 | TVector *fB; // Field map | |
72 | public: | |
73 | AliMagFCM(){} | |
74 | AliMagFCM(const char *name, const char *title, const Int_t integ, const Int_t map, | |
75 | const Float_t factor, const Float_t fmax); | |
76 | virtual ~AliMagFCM() {delete fB;} | |
77 | virtual void Field(Float_t *x, Float_t *b); | |
78 | virtual void ReadField(); | |
79 | ||
80 | inline Float_t Bx(const Int_t ix, const Int_t iy, const Int_t iz) { | |
81 | return (*fB)(3*(iz*(fXn*fYn)+iy*fXn+ix)); | |
82 | } | |
83 | inline Float_t By(const Int_t ix, const Int_t iy, const Int_t iz) { | |
84 | return (*fB)(3*(iz*(fXn*fYn)+iy*fXn+ix)+1); | |
85 | } | |
86 | inline Float_t Bz(const Int_t ix, const Int_t iy, const Int_t iz) { | |
87 | return (*fB)(3*(iz*(fXn*fYn)+iy*fXn+ix)+2); | |
88 | } | |
89 | ||
90 | ClassDef(AliMagFCM,1) //Class for all Alice MagField with Constant Mesh | |
91 | }; | |
7a15f6b8 | 92 | //************************************ |
93 | // | |
94 | class AliMagFDM : public AliMagF | |
95 | { | |
96 | //Alice Magnetic Field:Magnetic field map from IP to muon filter for Muon arm | |
97 | ||
98 | protected: | |
99 | ||
100 | // | |
101 | ||
102 | Int_t fdInd; // Character number of validity Map region | |
103 | ||
104 | Float_t fdZmin; // Start of the cartesian part of MAP in z | |
105 | Float_t fdZmax; // End of Map in z | |
106 | Float_t fdYmax; // Start of the cartesian part of MAP in y | |
107 | Float_t fdYmin; // End of the cartesian part of MAP in y | |
108 | Float_t fdZpmx; // End of the polar part of MAP in z | |
109 | Float_t fdZpmn; // Start of the polar part of MAP in z | |
110 | Float_t fdRmax; // Maximal radius of the polar part of MAP | |
111 | Float_t fdRmin; // Minimal radius of the polar part of MAP | |
112 | ||
113 | ||
114 | Float_t fdXdel; // step in x - cartesian part of MAP | |
115 | Float_t fdYdel; // step in y - cartesian part of MAP | |
116 | Float_t fdZdel; // step in z - cartesian part of MAP | |
117 | ||
118 | Float_t fdRdel; // step in r - polar part of MAP | |
119 | Float_t fdPhid; // step in Phi - polar part of MAP | |
120 | Float_t fdZpdl; // step in z - polar part of MAP | |
121 | ||
122 | Float_t fdCx1, fdCx2; | |
123 | Float_t fdAx1, fdAx2; | |
124 | ||
125 | Float_t fdZc[81]; // z coordinates in cartesian part | |
126 | Float_t fdY[81]; // y coordinates in cartesian part | |
127 | Float_t fdBcx[81][81][44]; // Bx array for cartesian part | |
128 | Float_t fdBcy[81][81][44]; // By array for cartesian part | |
129 | Float_t fdBcz[81][81][44]; // Bz array for cartesian part | |
130 | ||
131 | Float_t fdZp[51]; // z coordinates in polar part | |
132 | Float_t fdR[10]; // r coordinates in polar part | |
133 | Float_t fdPhi[33]; // Phi coordinates in polar part | |
134 | ||
135 | Float_t fdBpx[51][10][33]; // Bx array for polar part | |
136 | Float_t fdBpy[51][10][33]; // By array for polar part | |
137 | Float_t fdBpz[51][10][33]; // Bx array for polar part | |
138 | Float_t fdB[2][2][32]; | |
139 | ||
140 | Int_t fdXl; // Number steps in x for cartesian part | |
141 | Int_t fdYl; // Number steps in y for cartesian par | |
142 | Int_t fdZl; // Number steps in z for cartesian part | |
143 | ||
144 | Int_t fdRn; // Number steps in r for polar part | |
145 | Int_t fdPhin; // Number steps in Phi for polar part | |
146 | Int_t fdZpl; // Number steps in z for polar part | |
147 | ||
148 | Float_t rrtes; | |
149 | ||
150 | public: | |
151 | AliMagFDM(){} | |
152 | AliMagFDM(const char *name, const char *title, const Int_t integ, const Int_t | |
153 | map, const Float_t factor, const Float_t fmax); | |
154 | virtual ~AliMagFDM(){} | |
155 | virtual void Field(Float_t *x, Float_t *b); | |
156 | virtual void ReadField(); | |
157 | ||
158 | ||
159 | void FZ(Double_t *u, Float_t *Ar, Float_t *du, Int_t *ki, Int_t *kf, Double_t *a1, Double_t *a2 , Int_t *nu); | |
160 | void FRfuncBi(Int_t *kai, Double_t *za1, Double_t *za2, Double_t *al1, Double_t *al2, Double_t *al3, Int_t *ka, Int_t *ma,Double_t *ba); | |
161 | void FGfuncBi(Double_t *z1, Double_t *z2, Double_t *y1, Double_t *y2, Double_t *x1, Double_t *x2, Int_t *kvr, Int_t *k, Int_t *l, Int_t *m, Double_t *bb); | |
162 | //_________________________________________ | |
163 | ||
164 | ClassDef(AliMagFDM,1) //Class Magnetic field map from IP till muon filter | |
165 | }; | |
166 | ||
fe4da5cc | 167 | |
168 | #endif |