Geant4 Cross Reference |
1 // 1 2 // ******************************************* 3 // * License and Disclaimer 4 // * 5 // * The Geant4 software is copyright of th 6 // * the Geant4 Collaboration. It is provided 7 // * conditions of the Geant4 Software License 8 // * LICENSE and available at http://cern.ch/ 9 // * include a list of copyright holders. 10 // * 11 // * Neither the authors of this software syst 12 // * institutes,nor the agencies providing fin 13 // * work make any representation or warran 14 // * regarding this software system or assum 15 // * use. Please see the license in the file 16 // * for the full disclaimer and the limitatio 17 // * 18 // * This code implementation is the result 19 // * technical work of the GEANT4 collaboratio 20 // * By using, copying, modifying or distri 21 // * any work based on the software) you ag 22 // * use in resulting scientific publicati 23 // * acceptance of all terms of the Geant4 Sof 24 // ******************************************* 25 // 26 // G4AdjointSimMessenger 27 // 28 // Class description: 29 // 30 // This class represents the Messenger that de 31 // allowing the user controlling an adjoint/re 32 // methods of G4AdjointSimManager. 33 // 34 // 1) Start an adjoint simulation 35 // ------------------------------------------- 36 // Command: 37 // -/adjoint/start_run nb: Start an adjoint s 38 // events given by nb 39 // 2) Definition of the external source 40 // ------------------------------------------- 41 // The external source represents the real ext 42 // which adjoint particles are tracked in the 43 // simulation (see G4AdjointSimManager.hh and 44 // more infos). The user can define the source 45 // sphere or of G4 volume of the geometry. He 46 // of the source. If an adjoint particle get a 47 // energy before reaching the external surface 48 // being registered. 49 // Commands: 50 // -/adjoint/DefineSphericalExtSource R X Y Z 51 // The external source is set on a sphere wi 52 // position (X,Y,Z) 53 // -/adjoint/DefineSphericalExtSourceCentered 54 // The external source is set on a sphere wi 55 // position located at the center of the phy 56 // name pvol_name. 57 // -/adjoint/DefineExtSourceOnExtSurfaceOfAVo 58 // The external surface is set as the extern 59 // volume with name pvol_name. 60 // -/adjoint/SetExtSourceEmax Emax energy_uni 61 // Set the maximum energy of the external so 62 // 63 // 3) Definition of the adjoint source 64 // ------------------------------------------- 65 // The adjoint source represents the source fr 66 // particles are generated (see G4AdjointSimMa 67 // Developer guide for more infos). 68 // The user can define the source as the exter 69 // G4 volume of the geometry. He sets the mini 70 // source and defines which type of adjoint pr 71 // considered. 72 // Commands: 73 // -/adjoint/DefineSphericalAdjSource R X Y Z 74 // The adjoint source is set on a sphere with 75 // position (X,Y,Z) 76 // -/adjoint/DefineSphericalAdjSourceCenteredO 77 // The external source is set on a sphere wit 78 // position located at the center of the phys 79 // name pvol_name. 80 // -/adjoint/DefineAdjSourceOnExtSurfaceOfAVol 81 // The external surface is set as the externa 82 // physical volume with name pvol_name 83 // -/adjoint/SetAdjSourceEmin Emin energy_unit 84 // Set the minimum energy of the external sou 85 // -/adjoint/SetAdjSourceEmax Emax energy_unit 86 // Set the maximum energy of the external so 87 // -/adjoint/ConsiderAsPrimary particle_name 88 // The type of particle specified by "partic 89 // the list of primary adjoint particles. The 90 // reverse physics processes considered in th 91 // candidates are (e-, gamma, proton, ion). 92 // -/adjoint/NeglectAsPrimary particle_name 93 // The type of particle specified by "parti 94 // from the list of primary adjoint particles. 95 // on the reverse physics processes considered 96 // the potential candidates are (e-, gamma, pr 97 98 // ------------------------------------------- 99 // Class Name: G4AdjointSimMessenger 100 // Author: L. Desorgher, 2007-2009 101 // Organisation: SpaceIT GmbH 102 // Contract: ESA contract 21435/08/NL/AT 103 // Customer: ESA/ESTEC 104 // ------------------------------------------- 105 #ifndef G4AdjointSimMessenger_hh 106 #define G4AdjointSimMessenger_hh 1 107 108 #include "G4UImessenger.hh" 109 #include "globals.hh" 110 111 class G4AdjointSimManager; 112 class G4UIdirectory; 113 class G4UIcmdWithAString; 114 class G4UIcmdWithAnInteger; 115 class G4UIcmdWith3VectorAndUnit; 116 class G4UIcmdWithABool; 117 class G4UIcmdWithADoubleAndUnit; 118 class G4UIcmdWithoutParameter; 119 class G4UIcmdWithADouble; 120 121 // ------------------------------------------- 122 123 class G4AdjointSimMessenger : public G4UImesse 124 { 125 public: 126 G4AdjointSimMessenger(G4AdjointSimManager* 127 ~G4AdjointSimMessenger() override; 128 129 void SetNewValue(G4UIcommand*, G4String) o 130 131 private: 132 G4AdjointSimManager* theAdjointRunManager; 133 134 G4UIdirectory* AdjointSimDir = nullptr; 135 G4UIcommand* beamOnCmd = nullptr; 136 137 G4UIcommand* DefineSpherExtSourceCmd = nul 138 G4UIcommand* DefineSpherExtSourceCenteredO 139 G4UIcmdWithAString* DefineExtSourceOnAVolu 140 G4UIcmdWithADoubleAndUnit* setExtSourceEMa 141 142 G4UIcommand* DefineSpherAdjSourceCmd = nul 143 G4UIcommand* DefineSpherAdjSourceCenteredO 144 G4UIcmdWithAString* DefineAdjSourceOnAVolu 145 146 G4UIcmdWithADoubleAndUnit* setAdjSourceEmi 147 G4UIcmdWithADoubleAndUnit* setAdjSourceEma 148 149 G4UIcmdWithAString* ConsiderParticleAsPrim 150 G4UIcmdWithAString* NeglectParticleAsPrima 151 152 G4UIcmdWithAnInteger* setNbOfPrimaryFwdGam 153 G4UIcmdWithAnInteger* setNbOfPrimaryAdjGam 154 G4UIcmdWithAnInteger* setNbOfPrimaryAdjEle 155 }; 156 157 #endif 158