5 #include "ERFieldPar.h" 6 #include "ERFieldConst.h" 8 #include "FairParamList.h" 13 const int kMaxLen = 2048;
17 : FairParGenericSet(name, title, context),
33 fDistortionFilename(
""),
40 : FairParGenericSet(),
68 list->add(
"Field Type",
fType);
70 list->add(
"Field min x",
fXmin);
71 list->add(
"Field max x", fXmax);
72 list->add(
"Field min y", fYmin);
73 list->add(
"Field max y", fYmax);
74 list->add(
"Field min z", fZmin);
75 list->add(
"Field max z", fZmax);
76 list->add(
"Field Bx",
fBx);
77 list->add(
"Field By", fBy);
78 list->add(
"Field Bz", fBz);
80 else if (
fType >=1 &&
fType <= kMaxFieldMapType) {
81 list->add(
"Field map name",
fMapName);
82 list->add(
"Field x position",
fPosX);
83 list->add(
"Field y position", fPosY);
84 list->add(
"Field z position", fPosZ);
85 list->add(
"Field scaling factor",
fScale);
86 if (
fType==kTypeDistorted) {
88 list->add(
"Field name of parent field",
fParentName.Data());
96 if ( ! list )
return kFALSE;
97 if ( ! list->fill(
"Field Type", &
fType) )
return kFALSE;
99 if ( ! list->fill(
"Field min x", &
fXmin) )
return kFALSE;
100 if ( ! list->fill(
"Field max x", &fXmax) )
return kFALSE;
101 if ( ! list->fill(
"Field min y", &fYmin) )
return kFALSE;
102 if ( ! list->fill(
"Field max y", &fYmax) )
return kFALSE;
103 if ( ! list->fill(
"Field min z", &fZmin) )
return kFALSE;
104 if ( ! list->fill(
"Field max z", &fZmax) )
return kFALSE;
105 if ( ! list->fill(
"Field Bx", &
fBx) )
return kFALSE;
106 if ( ! list->fill(
"Field By", &fBy) )
return kFALSE;
107 if ( ! list->fill(
"Field Bz", &fBz) )
return kFALSE;
109 else if (
fType >=1 &&
fType <= kMaxFieldMapType) {
111 if ( ! list->fill(
"Field map name", mapName, 80) )
return kFALSE;
113 if ( ! list->fill(
"Field x position", &
fPosX) )
return kFALSE;
114 if ( ! list->fill(
"Field y position", &fPosY) )
return kFALSE;
115 if ( ! list->fill(
"Field z position", &fPosZ) )
return kFALSE;
116 if ( ! list->fill(
"Field scaling factor", &
fScale) )
return kFALSE;
117 if (
fType==kTypeDistorted) {
120 if ( ! list->fill(
"Field map distortion filename", tmp,kMaxLen) )
return kFALSE;
123 if ( ! list->fill(
"Field name of parent field", tmp,kMaxLen) )
return kFALSE;
125 if ( ! list->fill(
"Field type of parent field", &
fTypeOfParent) )
return kFALSE;
134 cerr <<
"-W- ERFieldPar::SetParameters: Empty field pointer!" << endl;
137 fType = field->GetType();
142 fBy = fieldConst->GetBy();
143 fBz = fieldConst->GetBz();
145 fXmax = fieldConst->GetXmax();
146 fYmin = fieldConst->GetYmin();
147 fYmax = fieldConst->GetYmax();
148 fZmin = fieldConst->GetZmin();
149 fZmax = fieldConst->GetZmax();
173 cerr <<
"-W- ERFieldPar::SetParameters: Unknown field type " 174 <<
fType <<
"!" << endl;
175 fBx = fBy = fBz = 0.;
176 fXmin = fXmax = fYmin = fYmax = fZmin = fZmax = 0.;
virtual void putParams(FairParamList *list)
virtual Double_t GetBx(Double_t x, Double_t y, Double_t z)
void SetParameters(FairField *field)
TString fDistortionFilename
virtual Bool_t getParams(FairParamList *list)