00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef MYBLFIELDMAP_HH
00020 #define MYBLFIELDMAP_HH
00021
00022 #include "myglobals.hh"
00023
00196 class MyBLFieldMap {
00197 public:
00199 MyBLFieldMap();
00200
00202 virtual ~MyBLFieldMap();
00203
00206 bool readFile(G4String filename);
00207
00210 bool writeFile(G4String filename, G4String comment="");
00211
00216 void getFieldValue(const G4double local[4], G4double field[6],
00217 G4double current=1.0, G4double gradient=1.0);
00218
00220 void getBoundingPoint(int i, G4double point[4]);
00221
00223 bool hasB();
00224
00226 bool hasE();
00227
00230 bool createGridMap(G4double X0, G4double Y0, G4double Z0, G4double dX,
00231 G4double dY, G4double dZ, int nX, int nY, int nZ,
00232 class G4ElectroMagneticField *field);
00233
00238 bool createCylinderMap(G4double Z0, G4double dR, G4double dZ, int nR,
00239 int nZ, class G4ElectroMagneticField *field);
00240
00245 bool createTimeDependence(int n, G4double t[], G4double b[],
00246 G4double e[]=0, G4double period=-1.0);
00247
00250 bool getTimeFactor(G4double t, G4double *b, G4double *e);
00251 private:
00252 G4int maxline;
00253 G4double current;
00254 G4double gradient;
00255 G4double normB;
00256 G4double normE;
00257 class FieldMapImpl *impl;
00258 class TimeImpl *time;
00259 friend class FieldMapPlacement;
00260 };
00261 #endif // MYBLFIELDMAP_HH