]>
Commit | Line | Data |
---|---|---|
aee8290b | 1 | #ifndef ALIMAGFCM_H |
2 | #define ALIMAGFCM_H | |
3 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
4 | * See cxx source for full Copyright notice */ | |
5 | ||
6 | /* $Id$ */ | |
7 | ||
8 | #include "AliMagF.h" | |
65fb704d | 9 | class TVector; |
aee8290b | 10 | |
11 | class AliMagFCM : public AliMagF | |
12 | { | |
5d8718b8 | 13 | //Alice Magnetic Field with constant mesh |
aee8290b | 14 | |
15 | public: | |
e2afb3b6 | 16 | AliMagFCM(); |
d8408e76 | 17 | AliMagFCM(const char *name, const char *title, const Int_t integ, |
aee8290b | 18 | const Float_t factor, const Float_t fmax); |
19 | AliMagFCM(const AliMagFCM &mag); | |
20 | virtual ~AliMagFCM() {delete fB;} | |
21 | virtual void Field(Float_t *x, Float_t *b); | |
22 | virtual void ReadField(); | |
c3d65c8c | 23 | virtual void SetSolenoidField(Float_t field = 2.) {fSolenoid = field;} |
05086aa8 | 24 | virtual Float_t SolenoidField() const {return fSolenoid;} |
4cc8933f | 25 | |
ef42d733 | 26 | void Copy(AliMagFCM &magf) const; |
e2afb3b6 | 27 | virtual AliMagFCM & operator=(const AliMagFCM &magf) |
28 | {magf.Copy(*this); return *this;} | |
aee8290b | 29 | |
30 | Float_t Bx(const Int_t ix, const Int_t iy, const Int_t iz) { | |
31 | return (*fB)(3*(iz*(fXn*fYn)+iy*fXn+ix)); | |
32 | } | |
33 | Float_t By(const Int_t ix, const Int_t iy, const Int_t iz) { | |
34 | return (*fB)(3*(iz*(fXn*fYn)+iy*fXn+ix)+1); | |
35 | } | |
36 | Float_t Bz(const Int_t ix, const Int_t iy, const Int_t iz) { | |
37 | return (*fB)(3*(iz*(fXn*fYn)+iy*fXn+ix)+2); | |
38 | } | |
39 | ||
40 | protected: | |
41 | ||
4cc8933f | 42 | Float_t fXbeg; // Start of mesh in x |
43 | Float_t fYbeg; // Start of mesh in y | |
44 | Float_t fZbeg; // Start of mesh in z | |
45 | Float_t fXdel; // Mesh step in x | |
46 | Float_t fYdel; // Mesh step in y | |
47 | Float_t fZdel; // Mesh step in z | |
48 | Float_t fSolenoid; // Solenoid Field Strength | |
49 | Double_t fXdeli; // Inverse of Mesh step in x | |
50 | Double_t fYdeli; // Inverse of Mesh step in y | |
51 | Double_t fZdeli; // Inverse of Mesh step in z | |
52 | Int_t fXn; // Number of mesh points in x | |
53 | Int_t fYn; // Number of mesh points in y | |
54 | Int_t fZn; // Number of mesh points in z | |
55 | TVector *fB; // Field map | |
aee8290b | 56 | |
57 | ClassDef(AliMagFCM,1) //Class for all Alice MagField with Constant Mesh | |
58 | }; | |
59 | ||
60 | #endif |