/home/cern/BDSIM_new/include/BDSGeometrySQL.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    Author of this code: John C. Carter, Royal Holloway, Univ. of London.
00008    Last modified 13.04.2005
00009 */
00010 
00011 
00012 #ifndef BDSGeometrySQL_h
00013 #define BDSGeometrySQL_h 1
00014 
00015 #include "globals.hh"
00016 #include "BDSMaterials.hh"
00017 #include "G4LogicalVolume.hh"
00018 #include "G4Cons.hh"
00019 #include "G4Tubs.hh"
00020 #include "G4UserLimits.hh"
00021 #include "G4VisAttributes.hh"
00022 #include "BDSMySQLTable.hh"
00023 #include "G4VPhysicalVolume.hh"
00024 #include "G4MagIntegratorStepper.hh"
00025 #include "G4Mag_UsualEqRhs.hh"
00026 #include "G4ChordFinder.hh"
00027 #include "G4FieldManager.hh"
00028 #include "BDSSamplerSD.hh"
00029 #include <fstream>
00030 #include <vector>
00031 #include "BDSMagFieldSQL.hh"
00032 
00033 //using namespace std;
00034 
00035 class BDSClassicalRK4;
00036 
00037 class BDSGeometrySQL
00038 {
00039 public:
00040   BDSGeometrySQL(G4String DBfile, G4double markerlength);
00041   ~BDSGeometrySQL();
00042 
00043   void Construct(G4LogicalVolume *marker);
00044 
00045   // For List of uniform fields for volumes
00046   std::vector<G4ThreeVector> UniformField;
00047   std::vector<G4String> Fieldvol; 
00048 
00049   // For List of Quad/Sext/Oct Fields
00050   std::vector<G4double> QuadBgrad;
00051   std::vector<G4String> Quadvol; 
00052   std::vector<G4double> SextBgrad;
00053   std::vector<G4String> Sextvol;
00054   std::vector<G4double> OctBgrad;
00055   std::vector<G4String> Octvol;
00056   G4VPhysicalVolume* align_in_volume;
00057   G4VPhysicalVolume* align_out_volume;
00058   std::vector<G4LogicalVolume*> SensitiveComponents;
00059 
00060   std::vector<G4LogicalVolume*> VOL_LIST;
00061   G4bool HasFields;
00062 
00063 private:
00064 
00065   void BuildSQLObjects(G4String file);
00066   void BuildCone(BDSMySQLTable* aSQLTable);
00067   void BuildEllipticalCone(BDSMySQLTable* aSQLTable);
00068   void BuildPolyCone(BDSMySQLTable* aSQLTable);
00069   void BuildBox(BDSMySQLTable* aSQLTable);
00070   void BuildTrap(BDSMySQLTable* aSQLTable);
00071   void BuildTorus(BDSMySQLTable* aSQLTable);
00072   void BuildSampler(BDSMySQLTable* aSQLTable);
00073   G4RotationMatrix* RotateComponent(G4double psi,
00074                                     G4double phi,
00075                                     G4double theta);
00076   void PlaceComponents(BDSMySQLTable* aSQLTable, std::vector<G4LogicalVolume*> VOL_LIST);
00077 
00078   G4double itsMarkerLength;
00079   ifstream ifs;
00080   G4LogicalVolume* itsMarkerVol;
00081   std::vector<BDSMySQLTable*> itsSQLTable;
00082   BDSMagFieldSQL* itsMagField;
00083   BDSSamplerSD* SensDet;
00084 
00085 protected:
00086 };
00087 
00088 #endif

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