00001 //! \file 00002 //! 00003 //! Header for the Detector class which builds the OLYMPUS detector. 00004 //! 00005 //! Declares the Detector class and the member routines which 00006 //! construct the OLYMPUS detector. 00007 //! 00008 //! \author D.K. Hasell 00009 //! \version 1.0 00010 //! \date 2010-02-27 00011 //! 00012 //! \ingroup detector 00013 00014 // *+****1****+****2****+****3****+****4****+****5****+****6****+****7****+**** 00015 00016 // Ensure header file is included only once. 00017 00018 #ifndef DETECTOR_H 00019 #define DETECTOR_H 00020 00021 // Include the GEANT4 header files referenced in this file. 00022 00023 #include "G4VUserDetectorConstruction.hh" 00024 #include "G4MagneticField.hh" 00025 #include "G4VPhysicalVolume.hh" 00026 #include "G4UImessenger.hh" 00027 00028 // Declare the classes referenced in this file. 00029 00030 class Magnetic_Field; 00031 00032 class Target_Chamber; 00033 class Beam_Pipe; 00034 class Toroid_Magnet; 00035 class Gem_Tracker; 00036 class Wire_Chamber; 00037 class Time_of_Flight; 00038 class Luminosity_Monitor; 00039 class MWPC; 00040 class Symmetric_Moeller; 00041 00042 //! Detector class based on G4UserDetetectorConstruction. 00043 //! 00044 //! Main class for constructing the OLYMPUS detector. This is called 00045 //! from the main() program in the OLYMPUS Monte Carlo. 00046 //! Generates the material database, reads the magnetic field grid and 00047 //! the magnetic field, defines the World volume for the Monte Carlo, 00048 //! and then calls the other routines which produce the individual detector 00049 //! components. 00050 00051 class Detector : public G4VUserDetectorConstruction { 00052 00053 public: 00054 00055 //! Constructor for Detector class. 00056 //! 00057 //! Called in main program to create an instance of the Detector 00058 //! class. 00059 00060 Detector(); 00061 00062 //! Destructor for Detector class. 00063 00064 ~Detector(); 00065 00066 // Member functions. 00067 00068 //! Member function to construct the OLYMPUS detector. 00069 //! 00070 //! Called by GEANT4 kernel to build the detector. 00071 //! The code builds the material database and the magnetic field. 00072 //! It then constructs the world volume and calls the Build member 00073 //! functions for each detector component. 00074 //! 00075 //! \return a pointer of type G4VPhysicalVolume to the world volume. 00076 00077 G4VPhysicalVolume * Construct(); 00078 00079 private: 00080 00081 Magnetic_Field * pMF; //!< Pointer to the Magnetic Field class. 00082 Target_Chamber * pTC; //!< Pointer to Target_Chamber class. 00083 Beam_Pipe * pBP; //!< Pointer to Beam_Pipe class. 00084 Toroid_Magnet * pTM; //!< Pointer to Toroid_Magnet class. 00085 Gem_Tracker * pGT; //!< Pointer to Gem_Tracker class. 00086 Wire_Chamber * pWC; //!< Pointer to Wire_Chamber class. 00087 Time_of_Flight * pTF; //!< Pointer to Time_of_Flight class. 00088 Luminosity_Monitor * pLM; //!< Pointer to Luminosity_Monitor class. 00089 MWPC * pMW; //!< Pointer to MWPC class. 00090 Symmetric_Moeller * pSM; //!< Pointer to Symmetric_Moeller class. 00091 00092 }; 00093 00094 #endif