00001 // 00002 // ******************************************************************** 00003 // * License and Disclaimer * 00004 // * * 00005 // * The Geant4 software is copyright of the Copyright Holders of * 00006 // * the Geant4 Collaboration. It is provided under the terms and * 00007 // * conditions of the Geant4 Software License, included in the file * 00008 // * LICENSE and available at http://cern.ch/geant4/license . These * 00009 // * include a list of copyright holders. * 00010 // * * 00011 // * Neither the authors of this software system, nor their employing * 00012 // * institutes,nor the agencies providing financial support for this * 00013 // * work make any representation or warranty, express or implied, * 00014 // * regarding this software system or assume any liability for its * 00015 // * use. Please see the license in the file LICENSE and URL above * 00016 // * for the full disclaimer and the limitation of liability. * 00017 // * * 00018 // * This code implementation is the result of the scientific and * 00019 // * technical work of the GEANT4 collaboration. * 00020 // * By using, copying, modifying or distributing the software (or * 00021 // * any work based on the software) you agree to acknowledge its * 00022 // * use in resulting scientific publications, and indicate your * 00023 // * acceptance of all terms of the Geant4 Software license. * 00024 // ******************************************************************** 00025 // 00026 // $Id$ 00027 // 00029 // Class Name: G4AdjointSimMessenger.hh 00030 // Author: L. Desorgher 00031 // Organisation: SpaceIT GmbH 00032 // Contract: ESA contract 21435/08/NL/AT 00033 // Customer: ESA/ESTEC 00035 // 00036 // CHANGE HISTORY 00037 // -------------- 00038 // ChangeHistory: 00039 // -1st January 2007 creation by L. Desorgher 00040 // -November-December 2009 Some cleaning and adaptation for the first Release in the Geant4 toolkit, L. Desorgher 00041 // 00042 // 00043 //------------------------------------------------------------- 00044 // Documentation: 00045 // This class represents the Messenger that defined the G4UI macro comands allowing the 00046 // user contreol an adjoint/reverse MC simulation. It calls methods of G4AdjointSimManager 00047 // List of commands 00048 // ----------------- 00049 // 1)Start an adjoint simulation 00050 // -------------------------------------------- 00051 // Command: 00052 // -/adjoint/start_run nb: Start an adjoint simulation with a number of events given by nb. 00053 // 2)Definition of the external source 00054 // --------------------------------------------------- 00055 // The external source represents the real external source of particles till which adjoint particles are tracked in the reverse tracking mode 00056 // of the simulation (see G4AdjointSimManager.hh and G4Application Developer guide for more infos). 00057 // The user can define the source as the external surface of a sphere or of G4 volume of the geometry. He can also set the maximum energy of the 00058 // source. If an adjoint particle get an energy higher than this maximum energy before reaching the external surface source it is killed without being registered. 00059 // Commands: 00060 // -/adjoint/DefineSphericalExtSource R X Y Z unit_length: 00061 // The external source is set on a sphere with radius R and centered on position (X,Y,Z) 00062 // 00063 // -/adjoint/DefineSphericalExtSourceCenteredOnAVolume phys_vol_name R unit_length 00064 // The external source is set on a sphere with radius R and with its center position located at the center of the 00065 // the physical volume specified by the name phys_vol_name. 00066 // -/adjoint/DefineExtSourceOnExtSurfaceOfAVolume phys_vol_name 00067 // The external surface is set as the external boundary of a the physical volume with name phys_vol_name 00068 // -/adjoint/SetExtSourceEmax Emax energy_unit 00069 // Set the maximum energy of the external source 00070 // 00071 // 00072 // 3)Definition of the adjoint source 00073 // --------------------------------------------------- 00074 // The adjoint source represents the source from which adjoint primary particles are generated.(see G4AdjointSimManager.hh and G4Application Developer guide for more infos) 00075 // The user can define the source as the external surface of a sphere or of G4 volume of the geometry. He set the minimum maximum energy of the 00076 // source and define which type of adjoint primary particles should be considered. 00077 // Commands: 00078 // -/adjoint/DefineSphericalAdjSource R X Y Z unit_length: 00079 // The adjoint source is set on a sphere with radius R and centered on position (X,Y,Z) 00080 // 00081 // -/adjoint/DefineSphericalAdjSourceCenteredOnAVolume phys_vol_name R unit_length 00082 // The external source is set on a sphere with radius R and with its center position located at the center of the 00083 // the physical volume specified by the name phys_vol_name. 00084 // -/adjoint/DefineAdjSourceOnExtSurfaceOfAVolume phys_vol_name 00085 // The external surface is set as the external boundary of a the physical volume with name phys_vol_name 00086 // 00087 // -/adjoint/SetAdjSourceEmin Emin energy_unit 00088 // Set the minimum energy of the external source 00089 // 00090 // -/adjoint/SetAdjSourceEmax Emax energy_unit 00091 // Set the maximum energy of the external source 00092 // 00093 // -/adjoint/ConsiderAsPrimary particle_name 00094 // The type of particle specified by "particle_name" will be added in the list of primary adjoint particles. 00095 // The list of candidates depends on the reverse physics processes considered in the simulation. At the most the 00096 // potential candidates are (e-, gamma, proton , ion) 00097 // 00098 // -/adjoint/NeglectAsPrimary particle_name 00099 // The type of particle specified by "particle_name" will be removed from the list of primary adjoint particles. 00100 // The list of candidates depends on the reverse physics processes considered in the simulation. At the most the 00101 // potential candidates are (e-, gamma, proton , ion) 00102 // 00103 // 00104 00105 #ifndef G4AdjointSimMessenger_h 00106 #define G4AdjointSimMessenger_h 1 00107 00108 #include "globals.hh" 00109 #include "G4UImessenger.hh" 00110 00111 class G4AdjointSimManager; 00112 class G4UIdirectory; 00113 class G4UIcmdWithAString; 00114 class G4UIcmdWithAnInteger; 00115 class G4UIcmdWith3VectorAndUnit; 00116 class G4UIcmdWithABool; 00117 class G4UIcmdWithADoubleAndUnit; 00118 class G4UIcmdWithoutParameter; 00119 class G4UIcmdWithADouble; 00120 00121 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 00122 00123 class G4AdjointSimMessenger: public G4UImessenger 00124 { 00125 public: 00126 G4AdjointSimMessenger(G4AdjointSimManager* ); 00127 ~G4AdjointSimMessenger(); 00128 00129 void SetNewValue(G4UIcommand*, G4String); 00130 00131 private: 00132 G4AdjointSimManager* theAdjointRunManager; 00133 00134 G4UIdirectory* AdjointSimDir; 00135 G4UIdirectory* PhysicsDir; 00136 00137 G4UIcommand * beamOnCmd; 00138 G4UIcommand * testSourceCmd; 00139 00140 G4UIcommand * DefineSpherExtSourceCmd; 00141 G4UIcommand * DefineSpherExtSourceCenteredOnAVolumeCmd; 00142 G4UIcmdWithAString * DefineExtSourceOnAVolumeExtSurfaceCmd; 00143 G4UIcmdWithADoubleAndUnit* setExtSourceEMaxCmd; 00144 00145 G4UIcommand * DefineSpherAdjSourceCmd; 00146 G4UIcommand * DefineSpherAdjSourceCenteredOnAVolumeCmd; 00147 G4UIcmdWithAString * DefineAdjSourceOnAVolumeExtSurfaceCmd; 00148 00149 G4UIcmdWithADoubleAndUnit* setAdjSourceEminCmd; 00150 G4UIcmdWithADoubleAndUnit* setAdjSourceEmaxCmd; 00151 00152 00153 G4UIcmdWithAString* ConsiderParticleAsPrimaryCmd; 00154 G4UIcmdWithAString* NeglectParticleAsPrimaryCmd; 00155 00156 }; 00157 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 00158 00159 #endif 00160