]> git.uio.no Git - u/mrichter/AliRoot.git/blame - STEER/AliMagFCM.h
first prototype of interface to storage of run dependent objects, implementation...
[u/mrichter/AliRoot.git] / STEER / AliMagFCM.h
CommitLineData
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
0742d588 8//-----------------------------------------------------------------------
9// Class for Alice magnetic field with constant mesh
10// Used in the configuration macros (macros/Config.C, etc.)
11// Author:
12//-----------------------------------------------------------------------
13
57754f18 14#include "AliMagFC.h"
1cdd2303 15#include <TVector.h>
aee8290b 16
57754f18 17class AliMagFCM : public AliMagFC
aee8290b 18{
5d8718b8 19 //Alice Magnetic Field with constant mesh
aee8290b 20
21public:
e2afb3b6 22 AliMagFCM();
d0f1ee3b 23 AliMagFCM(const char *name, const char *title, Int_t integ,
24 Float_t factor, Float_t fmax);
aee8290b 25 AliMagFCM(const AliMagFCM &mag);
26 virtual ~AliMagFCM() {delete fB;}
6f3038e9 27 virtual void Field(Float_t *x, Float_t *b) const;
aee8290b 28 virtual void ReadField();
c3d65c8c 29 virtual void SetSolenoidField(Float_t field = 2.) {fSolenoid = field;}
05086aa8 30 virtual Float_t SolenoidField() const {return fSolenoid;}
4cc8933f 31
6c4904c2 32 void Copy(TObject &magf) const;
e2afb3b6 33 virtual AliMagFCM & operator=(const AliMagFCM &magf)
34 {magf.Copy(*this); return *this;}
aee8290b 35
d0f1ee3b 36 Float_t Bx(Int_t ix, Int_t iy, Int_t iz) const {
aee8290b 37 return (*fB)(3*(iz*(fXn*fYn)+iy*fXn+ix));
38 }
d0f1ee3b 39 Float_t By(Int_t ix, Int_t iy, Int_t iz) const {
aee8290b 40 return (*fB)(3*(iz*(fXn*fYn)+iy*fXn+ix)+1);
41 }
d0f1ee3b 42 Float_t Bz(Int_t ix, Int_t iy, Int_t iz) const {
aee8290b 43 return (*fB)(3*(iz*(fXn*fYn)+iy*fXn+ix)+2);
44 }
45
46protected:
47
4cc8933f 48 Float_t fXbeg; // Start of mesh in x
49 Float_t fYbeg; // Start of mesh in y
50 Float_t fZbeg; // Start of mesh in z
51 Float_t fXdel; // Mesh step in x
52 Float_t fYdel; // Mesh step in y
53 Float_t fZdel; // Mesh step in z
54 Float_t fSolenoid; // Solenoid Field Strength
55 Double_t fXdeli; // Inverse of Mesh step in x
56 Double_t fYdeli; // Inverse of Mesh step in y
57 Double_t fZdeli; // Inverse of Mesh step in z
58 Int_t fXn; // Number of mesh points in x
59 Int_t fYn; // Number of mesh points in y
60 Int_t fZn; // Number of mesh points in z
61 TVector *fB; // Field map
aee8290b 62
63 ClassDef(AliMagFCM,1) //Class for all Alice MagField with Constant Mesh
64};
65
66#endif