00001 //---------------------------------------------------------------------------// 00002 //Description: 1. Setup MyVGeometry geometry and manage associated sensitive detectors 00003 // 2. Communicate with associated sensitive detectors 00004 //Author: Wu Chen(wuchen@mail.ihep.ac.cn) 00005 //Created: 17 Oct, 2012 00006 //Comment: about fVerboseLevel: 00007 // You can change it by calling SetVerbose(int) somewhere 00008 // or modifying input card before starting a run. 00009 // Either way would set verbose of selected sensitive detectors to the same level 00010 // 0: Only Warnings and Errors 00011 // 1: Important information 00012 // >= 5: All information 00013 //---------------------------------------------------------------------------// 00014 00015 #ifndef MyVGeometrySvc_h 00016 #define MyVGeometrySvc_h 1 00017 00018 #include "myglobals.hh" 00019 00020 #include "MyConfigure.hh" 00021 00022 class G4VPhysicalVolume; 00023 class G4LogicalVolume; 00024 class MyVGeometryParameter; 00025 00026 class MyVGeometrySvc : public MyConfigure 00027 { 00028 public: 00029 MyVGeometrySvc(G4String name, G4String opt = ""); 00030 virtual ~MyVGeometrySvc(); 00031 00032 //=> Crucial functions 00033 virtual G4VPhysicalVolume* SetGeometry(){return 0;} //Setup geometry. Should be called before the begin of a run 00034 00035 void ReadCard(G4String); 00036 00037 //Special functions 00038 void ConstructVolumes(){}; 00039 00040 G4VPhysicalVolume* PlaceVolumes(){return 0;} 00041 00042 //=> public functions 00043 G4LogicalVolume* get_logicalVolume(G4String name); 00044 00045 //=> Access 00046 MyVGeometryParameter* get_GeometryParameter(){ return m_GeometryParameter; } 00047 00048 int get_VerboseLevel(){ return fVerboseLevel; } 00049 00050 G4String get_Name(){ return m_Name; } 00051 00052 //=> Modify 00053 void set_GeometryParameter(MyVGeometryParameter* val){ m_GeometryParameter = val; } 00054 00055 void set_VerboseLevel(int val){ fVerboseLevel = val; } 00056 00057 void set_Name(G4String val){ m_Name = val; } 00058 00059 private: 00060 00061 MyVGeometryParameter* m_GeometryParameter; 00062 00063 int fVerboseLevel; 00064 00065 G4String m_Name; 00066 }; 00067 00068 #endif 00069