Main Page | Class Hierarchy | Class List | File List | Class Members | File Members | Related Pages

GLG4DetectorConstruction.hh

Go to the documentation of this file.
00001 /**@file
00002    DetectorConstruction main class for GenericLAND simulation
00003 
00004    Original by Glenn Horton-Smith, December 2004.
00005    (Based on earlier work first written Dec 1999.)
00006    Some more materials and their classification by Dario Motta, Jan 2005.
00007    
00008    This file is part of the GenericLAND software library.
00009    $Id: GLG4DetectorConstruction.hh,v 1.3 2005/03/13 05:11:01 GLG4sim Exp $
00010 
00011    @author Glenn Horton-Smith
00012    @author Dario Motta
00013 */
00014 
00015 #ifndef GLG4DetectorConstruction_HH
00016 #define GLG4DetectorConstruction_HH 1
00017 
00018 #include "map"
00019 
00020 #include "globals.hh"
00021 #include "local_g4compat.hh"
00022 
00023 #include "G4VUserDetectorConstruction.hh"
00024 #include "G4ThreeVector.hh"
00025 
00026 #include "GLG4_PMT_LogicalVolume.hh"   // for ePmtStyle
00027 
00028 class G4Element;
00029 class G4Material;
00030 class G4VPhysicalVolume;
00031 class G4OpticalSurface;
00032 
00033 class GLG4DetectorConstruction : public G4VUserDetectorConstruction
00034 {
00035   public:
00036     typedef enum
00037       { kDetector_CylindricalLAND, kDetector_SphericalLAND,
00038         kDetector_TestBench, kDetector_OnePMT,
00039         kNumGenericDetectors } eDetector;
00040 
00041     GLG4DetectorConstruction();          // constructor
00042     virtual ~GLG4DetectorConstruction(); // destructor
00043 
00044     virtual G4VPhysicalVolume* Construct();    // make the volumes, return ptr to world
00045 
00046     static G4VPhysicalVolume *
00047       GetPhysicalVolumeByName(const G4String &name);
00048 
00049     G4VPhysicalVolume*  GetWorld() const { return world_phys; }
00050     
00051     virtual int GetNumDetectorTypes() { return kNumGenericDetectors; }
00052     virtual G4String GetDetectorTypeName(int i);
00053   
00054     int GetWhichDetector(void) { return whichDetector; }
00055     ePmtStyle GetWhichPmtStyle(void) { return whichPmtStyle; }
00056     G4String GetWhichCalibrationDevice(void) { return calDeviceName; }
00057     G4ThreeVector GetCalibrationPosition(void) { return calPosition; }
00058 
00059     virtual void SetWhichDetector(int w) { whichDetector= w; }
00060     void SetWhichPmtStyle(ePmtStyle w) { whichPmtStyle= w; }
00061     virtual void SetWhichCalibrationDevice(G4String newDevice)
00062       { calDeviceName=newDevice; }
00063     virtual void SetCalibrationPosition(G4ThreeVector newPos)
00064       { calPosition= newPos; }
00065   
00066   protected: 
00067     void ConstructMaterials();  // make all needed materials
00068     void ConstructSphericalLAND();    // make the spherical GenericLAND detector
00069     void ConstructSphericalLAND_ID(); // flesh out the spherical GenericLAND inner detector
00070     void ConstructCylindricalLAND();    // make the cylindrical GenericLAND detector
00071     void ConstructCylindricalLAND_ID(); // flesh out the cylindrical GenericLAND inner detector
00072     void ConstructGenericLAND_OD(); // flesh out the GenericLAND outer detector
00073     void ConstructGenericLAND_CalDevice(); // add selected calibration device
00074     void ConstructTestBench();  // make the GenericLAND TestBench
00075     void ConstructOnePmt();     // make one pmt, for testing
00076 
00077     // the following pointers are kept for convenience; they don't have to be!
00078     // [but if we didn't have them, would have to rewrite ConstructGenericLAND to
00079     //  lookup materials by name using G4Material::GetMaterial(G4String name)]
00080     G4Element* _elementH  ;
00081     G4Element* _elementC  ;
00082     G4Element* _elementN  ;
00083     G4Element* _elementO  ;
00084     G4Element* _elementAl ;
00085     G4Element* _elementK  ;
00086     G4Element* _elementSi ;
00087     G4Element* _elementCr;
00088     G4Element* _elementFe;
00089     G4Element* _elementNi;
00090     G4Material* _air;
00091     G4Material* PMT_Vac;
00092     G4Material* _rock;
00093     G4Material* _glass;
00094     G4Material* _steel;
00095     G4Material* _water;
00096     G4Material* _stainless;
00097     G4Material* Pb;
00098     G4Material* _mineralOil;
00099     G4Material* Dodecane;
00100     G4Material* Pseudocumene;
00101     G4Material* PXE;
00102     G4Material* PPO;
00103     G4Material* BPO;
00104     G4Material* BisMSB;
00105     G4Material* Scintillator;
00106     G4Material* _nylon;
00107     G4Material* _acrylic;
00108     G4Material* _blackAcryl;
00109     G4Material* Photocathode_mat;
00110     G4Material* _polyethylene;
00111     G4Material* _tyvek;
00112     G4Material* _kevlar;
00113     G4OpticalSurface* Photocathode_opsurf;
00114     G4OpticalSurface* Stainless_opsurf;
00115     G4OpticalSurface* Polyethylene_opsurf;
00116     G4OpticalSurface* Tyvek_opsurf;
00117     G4OpticalSurface* BlackSheet_opsurf;
00118     
00119     G4VPhysicalVolume* world_phys;
00120 
00121     int whichDetector;
00122     ePmtStyle whichPmtStyle;
00123 
00124     G4String calDeviceName;
00125     G4ThreeVector calPosition;
00126 
00127     G4bool materials_built;
00128 
00129     class GLG4DetectorMessenger *myMessenger;
00130 };
00131 
00132 
00133 #endif

Generated on Fri Jul 6 13:31:46 2007 for GLG4sim by  doxygen 1.3.9.1