Added methods for finding a given module in the DDL map (F. Prino)
[u/mrichter/AliRoot.git] / STEER / AliMagF.h
CommitLineData
aee8290b 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
0742d588 8//----------------------------------------------------------------------
9// Basic magnetic field class
10// Used in all the detectors, and also in the traking classes
11// Author:
12//----------------------------------------------------------------------
13
fe4da5cc 14#include "TNamed.h"
fe4da5cc 15
aee8290b 16enum Field_t {kUndef=1, kConst=1, kConMesh=2, kDipoMap=3};
fe4da5cc 17
18class AliMagF : public TNamed {
19
fe4da5cc 20public:
e2afb3b6 21 AliMagF();
d0f1ee3b 22 AliMagF(const char *name, const char *title, Int_t integ,
23 Float_t factor = 1., Float_t fmax = 10.);
fe4da5cc 24 virtual ~AliMagF() {}
6f3038e9 25 virtual void Field(Float_t *x, Float_t *b) const;
94de3818 26 virtual Int_t Type() const {return fType;}
fe4da5cc 27 virtual Float_t Max() const {return fMax;}
28 virtual Int_t Map() const {return fMap;}
29 virtual Int_t Integ() const {return fInteg;}
604e0531 30 virtual Int_t PrecInteg() const {return fPrecInteg;}
fe4da5cc 31 virtual Float_t Factor() const {return fFactor;}
32 virtual void ReadField() {}
694456b6 33 virtual Float_t SolenoidField() const {return 2.;}
604e0531 34 virtual void SetPrecInteg(Int_t integ) {fPrecInteg = integ;}
972ca52f 35 virtual void SetReadField(Bool_t flag = kTRUE) {fReadField = flag;}
a0201063 36 protected:
37 Int_t fMap; // Field Map identifier
38 Int_t fType; // Mag Field type
604e0531 39 Int_t fInteg; // Default integration method as indicated in Geant
40 Int_t fPrecInteg; // Alternative integration method, e.g. for higher precision
a0201063 41 Float_t fFactor; // Multiplicative factor
42 Float_t fMax; // Max Field as indicated in Geant
972ca52f 43 Bool_t fReadField; // Flag for reading the field from file (if available)
44 ClassDef(AliMagF,5) //Base class for all Alice MagField
fe4da5cc 45};
7a15f6b8 46
fe4da5cc 47#endif