/home/cern/BDSIM_new/include/BDSMagFieldSQL.hh

00001 /* BDSIM code.    Version 1.0
00002    Author: Grahame A. Blair, Royal Holloway, Univ. of London.
00003    Last modified 24.7.2002
00004    Copyright (c) 2002 by G.A.Blair.  ALL RIGHTS RESERVED. 
00005 */
00006 
00007 #ifndef BDSMagFieldSQL_h
00008 #define BDSMagFieldSQL_h 
00009 
00010 #include "G4Types.hh"
00011 #include "G4MagneticField.hh"
00012 
00013 #include "G4VPhysicalVolume.hh"
00014 #include "BDSField.hh"
00015 #include <string>
00016 #include <vector>
00017 
00018 //using namespace std;
00019 
00020 class BDSMagFieldSQL : public BDSField
00021 {
00022 public:  // with description
00023 
00024   BDSMagFieldSQL(const G4String& FieldFile, G4double aMarkerLength,
00025                  std::vector<G4String> Quadvol, std::vector<G4double> QuadBgrad,
00026                  std::vector<G4String> Sextvol, std::vector<G4double> SextBgrad,
00027                  std::vector<G4String> Octvol, std::vector<G4double> OctBgrad,
00028                  std::vector<G4String> Fieldvol, std::vector<G4ThreeVector> UniformField);
00029   virtual ~BDSMagFieldSQL();
00030   // Constructor and destructor. No actions.
00031 
00032 
00033   void  GetFieldValue( const G4double Point[4],G4double *Bfield ) const;
00034 
00035   void Prepare(G4VPhysicalVolume *referenceVolume);
00036 
00037 private:
00038   ofstream ofs;
00039   ifstream ifs;
00040 
00041   G4double itsMarkerLength;
00042   G4String FieldFile;
00043 
00044   // For Quad/Sext/Oct Fields
00045   std::vector<G4double> itsQuadBgrad;
00046   std::vector<G4String> itsQuadVol; 
00047   std::vector<G4double> itsSextBgrad;
00048   std::vector<G4String> itsSextVol; 
00049   std::vector<G4double> itsOctBgrad;
00050   std::vector<G4String> itsOctVol; 
00051 
00052   // For Uniform Fields
00053   std::vector<G4ThreeVector> itsUniformField;
00054   std::vector<G4String> itsFieldVol; 
00055 
00056   // For Solenoid FieldMaps
00057   std::vector<G4double> itsBz;
00058   std::vector<G4double> itsZ;
00059   std::vector<G4double> itsBr_over_r;
00060   std::vector<G4double> itsdBz_by_dz;
00061   double itsdz;
00062 };
00063 
00064 #endif

Generated on Wed Mar 5 17:25:22 2008 for BDSIM by  doxygen 1.5.3