]>
Commit | Line | Data |
---|---|---|
4c039060 | 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 | ||
acd84897 | 16 | /* $Id$ */ |
4c039060 | 17 | |
5d8718b8 | 18 | //---------------------------------------------------------------------- |
116cbefd | 19 | // Basic magnetic field class |
5d8718b8 | 20 | // Used in all the detectors, and also in the traking classes |
21 | // Author: | |
22 | //---------------------------------------------------------------------- | |
fe4da5cc | 23 | |
594d8990 | 24 | #include "AliLog.h" |
fe4da5cc | 25 | #include "AliMagF.h" |
a0201063 | 26 | Bool_t AliMagF::fgReadField = kTRUE; |
fe4da5cc | 27 | ClassImp(AliMagF) |
28 | ||
e2afb3b6 | 29 | //_______________________________________________________________________ |
30 | AliMagF::AliMagF(): | |
31 | fMap(0), | |
32 | fType(0), | |
33 | fInteg(0), | |
604e0531 | 34 | fPrecInteg(1), |
e2afb3b6 | 35 | fFactor(0), |
594d8990 | 36 | fMax(0) |
e2afb3b6 | 37 | { |
38 | // | |
39 | // Default constructor | |
40 | // | |
41 | } | |
42 | ||
43 | //_______________________________________________________________________ | |
d0f1ee3b | 44 | AliMagF::AliMagF(const char *name, const char *title, Int_t integ, |
45 | Float_t factor, Float_t fmax): | |
e2afb3b6 | 46 | TNamed(name,title), |
47 | fMap(0), | |
48 | fType(0), | |
49 | fInteg(0), | |
604e0531 | 50 | fPrecInteg(1), |
e2afb3b6 | 51 | fFactor(factor), |
594d8990 | 52 | fMax(fmax) |
fe4da5cc | 53 | { |
aee8290b | 54 | // |
55 | // Standard constructor | |
56 | // | |
d8408e76 | 57 | if(integ<0 || integ > 2) { |
594d8990 | 58 | AliWarning(Form( |
59 | "Invalid magnetic field flag: %5d; Helix tracking chosen instead" | |
60 | ,integ)); | |
e2afb3b6 | 61 | fInteg = 2; |
d8408e76 | 62 | } else { |
e2afb3b6 | 63 | fInteg = integ; |
d8408e76 | 64 | } |
65 | fType = kUndef; | |
9e1a0ddb | 66 | // |
fe4da5cc | 67 | } |
68 | ||
e2afb3b6 | 69 | //_______________________________________________________________________ |
6f3038e9 | 70 | void AliMagF::Field(Float_t*, Float_t *b) const |
fe4da5cc | 71 | { |
aee8290b | 72 | // |
73 | // Method to return the field in one point -- dummy in this case | |
74 | // | |
594d8990 | 75 | AliWarning("Undefined MagF Field called, returning 0"); |
fe4da5cc | 76 | b[0]=b[1]=b[2]=0; |
77 | } |