FairRoot
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
FairConstPar.cxx
Go to the documentation of this file.
1 /********************************************************************************
2  * Copyright (C) 2014 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
3  * *
4  * This software is distributed under the terms of the *
5  * GNU Lesser General Public Licence (LGPL) version 3, *
6  * copied verbatim in the file "LICENSE" *
7  ********************************************************************************/
8 #include "FairConstPar.h"
9 
10 #include "FairConstField.h" // for FairConstField
11 #include "FairParamList.h" // for FairParamList
12 
13 #include <TString.h> // for TString
14 
15 class FairField;
16 
17 FairConstPar::FairConstPar(const char* name, const char* title, const char* context)
18  : FairMapPar(name, title, context)
19  , fBx(0)
20  , fBy(0)
21  , fBz(0)
22 {
23  fType = 0;
24 }
25 
27  : FairMapPar()
28  , fBx(0)
29  , fBy(0)
30  , fBz(0)
31 {
32  fType = 0;
33 }
34 
36 
38 {
39  if (!list) {
40  return;
41  }
42 
43  list->add("Field Type", fType);
44 
45  list->add("Field min x", fXmin);
46  list->add("Field max x", fXmax);
47  list->add("Field min y", fYmin);
48  list->add("Field max y", fYmax);
49  list->add("Field min z", fZmin);
50  list->add("Field max z", fZmax);
51  list->add("Field Bx", fBx);
52  list->add("Field By", fBy);
53  list->add("Field Bz", fBz);
54 }
55 
57 {
58  if (!list) {
59  return kFALSE;
60  }
61  if (!list->fill("Field Type", &fType)) {
62  return kFALSE;
63  }
64  if (!list->fill("Field min x", &fXmin)) {
65  return kFALSE;
66  }
67  if (!list->fill("Field max x", &fXmax)) {
68  return kFALSE;
69  }
70  if (!list->fill("Field min y", &fYmin)) {
71  return kFALSE;
72  }
73  if (!list->fill("Field max y", &fYmax)) {
74  return kFALSE;
75  }
76  if (!list->fill("Field min z", &fZmin)) {
77  return kFALSE;
78  }
79  if (!list->fill("Field max z", &fZmax)) {
80  return kFALSE;
81  }
82  if (!list->fill("Field Bx", &fBx)) {
83  return kFALSE;
84  }
85  if (!list->fill("Field By", &fBy)) {
86  return kFALSE;
87  }
88  if (!list->fill("Field Bz", &fBz)) {
89  return kFALSE;
90  }
91  return kTRUE;
92 }
93 
95 {
96  FairConstField* fieldConst = static_cast<FairConstField*>(field);
97  fBx = fieldConst->GetBx();
98  fBy = fieldConst->GetBy();
99  fBz = fieldConst->GetBz();
100  fXmin = fieldConst->GetXmin();
101  fXmax = fieldConst->GetXmax();
102  fYmin = fieldConst->GetYmin();
103  fYmax = fieldConst->GetYmax();
104  fZmin = fieldConst->GetZmin();
105  fZmax = fieldConst->GetZmax();
106  fMapName = "";
107  fPosX = fPosY = fPosZ = fScale = 0.;
108  fType = fieldConst->GetType();
109 }
110 
Double_t fZmin
Definition: FairMapPar.h:63
Double_t fYmin
Definition: FairMapPar.h:62
Bool_t getParams(FairParamList *list)
virtual Double_t GetBz(Double_t x, Double_t y, Double_t z)
virtual Double_t GetBy(Double_t x, Double_t y, Double_t z)
Double_t GetZmin() const
Double_t fXmin
Definition: FairMapPar.h:61
Int_t GetType() const
Definition: FairField.h:62
Double_t fPosY
Definition: FairMapPar.h:69
Double_t fYmax
Definition: FairMapPar.h:62
TString fMapName
Definition: FairMapPar.h:66
Double_t fZmax
Definition: FairMapPar.h:63
ClassImp(FairEventBuilder)
Double_t fXmax
Definition: FairMapPar.h:61
Double_t GetXmax() const
Double_t fBy
Definition: FairConstPar.h:53
void SetParameters(FairField *field)
Int_t fType
Definition: FairMapPar.h:58
Double_t fPosZ
Definition: FairMapPar.h:69
Double_t GetYmin() const
Double_t fBz
Definition: FairConstPar.h:53
Double_t GetXmin() const
Double_t fPosX
Definition: FairMapPar.h:69
Bool_t fill(const Text_t *, Text_t *, const Int_t)
Double_t fBx
Definition: FairConstPar.h:53
void putParams(FairParamList *list)
virtual Double_t GetBx(Double_t x, Double_t y, Double_t z)
Double_t GetYmax() const
Double_t fScale
Definition: FairMapPar.h:72
void add(FairParamObj &)
Double_t GetZmax() const