]> git.uio.no Git - u/mrichter/AliRoot.git/blob - STEER/AliMagF.cxx
Adding RICH and updating PHOS part (Yu.Belikov)
[u/mrichter/AliRoot.git] / STEER / AliMagF.cxx
1 /**************************************************************************
2  * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3  *                                                                        *
4  * Author: The ALICE Off-line Project.                                    *
5  * Contributors are mentioned in the code where appropriate.              *
6  *                                                                        *
7  * Permission to use, copy, modify and distribute this software and its   *
8  * documentation strictly for non-commercial purposes is hereby granted   *
9  * without fee, provided that the above copyright notice appears in all   *
10  * copies and that both the copyright notice and this permission notice   *
11  * appear in the supporting documentation. The authors make no claims     *
12  * about the suitability of this software for any purpose. It is          *
13  * provided "as is" without express or implied warranty.                  *
14  **************************************************************************/
15
16 /* $Id$ */
17
18 //----------------------------------------------------------------------
19 // Basic magnetic field class
20 // Used in all the detectors, and also in the traking classes
21 // Author:
22 //----------------------------------------------------------------------
23
24 #include "AliMagF.h"
25
26 ClassImp(AliMagF)
27
28 //_______________________________________________________________________
29 AliMagF::AliMagF():
30   fMap(0),
31   fType(0),
32   fInteg(0),
33   fFactor(0),
34   fMax(0),
35   fDebug(0)
36 {
37   //
38   // Default constructor
39   //
40 }
41
42 //_______________________________________________________________________
43 AliMagF::AliMagF(const char *name, const char *title, Int_t integ, 
44                  Float_t factor, Float_t fmax):
45   TNamed(name,title),
46   fMap(0),
47   fType(0),
48   fInteg(0),
49   fFactor(factor),
50   fMax(fmax),
51   fDebug(0)
52 {
53   //
54   // Standard constructor
55   //
56     if(integ<0 || integ > 2) {
57       Warning("SetField",
58               "Invalid magnetic field flag: %5d; Helix tracking chosen instead\n"
59               ,integ);
60       fInteg = 2;
61     } else {
62       fInteg = integ;
63     }
64     fType = kUndef;
65     //
66     fDebug = 0;
67 }
68
69 //_______________________________________________________________________
70 void AliMagF::Field(Float_t*, Float_t *b)
71 {
72   //
73   // Method to return the field in one point -- dummy in this case
74   //
75   Warning("Field","Undefined MagF Field called, returning 0\n");
76   b[0]=b[1]=b[2]=0;
77 }