[1197] | 1 | // |
---|
| 2 | // ******************************************************************** |
---|
| 3 | // * License and Disclaimer * |
---|
| 4 | // * * |
---|
| 5 | // * The Geant4 software is copyright of the Copyright Holders of * |
---|
| 6 | // * the Geant4 Collaboration. It is provided under the terms and * |
---|
| 7 | // * conditions of the Geant4 Software License, included in the file * |
---|
| 8 | // * LICENSE and available at http://cern.ch/geant4/license . These * |
---|
| 9 | // * include a list of copyright holders. * |
---|
| 10 | // * * |
---|
| 11 | // * Neither the authors of this software system, nor their employing * |
---|
| 12 | // * institutes,nor the agencies providing financial support for this * |
---|
| 13 | // * work make any representation or warranty, express or implied, * |
---|
| 14 | // * regarding this software system or assume any liability for its * |
---|
| 15 | // * use. Please see the license in the file LICENSE and URL above * |
---|
| 16 | // * for the full disclaimer and the limitation of liability. * |
---|
| 17 | // * * |
---|
| 18 | // * This code implementation is the result of the scientific and * |
---|
| 19 | // * technical work of the GEANT4 collaboration. * |
---|
| 20 | // * By using, copying, modifying or distributing the software (or * |
---|
| 21 | // * any work based on the software) you agree to acknowledge its * |
---|
| 22 | // * use in resulting scientific publications, and indicate your * |
---|
| 23 | // * acceptance of all terms of the Geant4 Software license. * |
---|
| 24 | // ******************************************************************** |
---|
| 25 | // |
---|
| 26 | // $Id: G4AdjointSimMessenger.hh,v 1.2 2009/11/18 18:02:06 gcosmo Exp $ |
---|
[1337] | 27 | // GEANT4 tag $Name: geant4-09-04-beta-01 $ |
---|
[1197] | 28 | // |
---|
| 29 | ///////////////////////////////////////////////////////////////////////////////// |
---|
| 30 | // Class Name: G4AdjointSimMessenger.hh |
---|
| 31 | // Author: L. Desorgher |
---|
| 32 | // Organisation: SpaceIT GmbH |
---|
| 33 | // Contract: ESA contract 21435/08/NL/AT |
---|
| 34 | // Customer: ESA/ESTEC |
---|
| 35 | ///////////////////////////////////////////////////////////////////////////////// |
---|
| 36 | // |
---|
| 37 | // CHANGE HISTORY |
---|
| 38 | // -------------- |
---|
| 39 | // ChangeHistory: |
---|
| 40 | // -1st January 2007 creation by L. Desorgher |
---|
| 41 | // -November-December 2009 Some cleaning and adaptation for the first Release in the Geant4 toolkit, L. Desorgher |
---|
| 42 | // |
---|
| 43 | // |
---|
| 44 | //------------------------------------------------------------- |
---|
| 45 | // Documentation: |
---|
| 46 | // This class represents the Messenger that defined the G4UI macro comands allowing the |
---|
| 47 | // user contreol an adjoint/reverse MC simulation. It calls methods of G4AdjointSimManager |
---|
| 48 | // List of commands |
---|
| 49 | // ----------------- |
---|
| 50 | // 1)Start an adjoint simulation |
---|
| 51 | // -------------------------------------------- |
---|
| 52 | // Command: |
---|
| 53 | // -/adjoint/start_run nb: Start an adjoint simulation with a number of events given by nb. |
---|
| 54 | // 2)Definition of the external source |
---|
| 55 | // --------------------------------------------------- |
---|
| 56 | // The external source represents the real external source of particles till which adjoint particles are tracked in the reverse tracking mode |
---|
| 57 | // of the simulation (see G4AdjointSimManager.hh and G4Application Developer guide for more infos). |
---|
| 58 | // 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 |
---|
| 59 | // 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. |
---|
| 60 | // Commands: |
---|
| 61 | // -/adjoint/DefineSphericalExtSource R X Y Z unit_length: |
---|
| 62 | // The external source is set on a sphere with radius R and centered on position (X,Y,Z) |
---|
| 63 | // |
---|
| 64 | // -/adjoint/DefineSphericalExtSourceCenteredOnAVolume phys_vol_name R unit_length |
---|
| 65 | // The external source is set on a sphere with radius R and with its center position located at the center of the |
---|
| 66 | // the physical volume specified by the name phys_vol_name. |
---|
| 67 | // -/adjoint/DefineExtSourceOnExtSurfaceOfAVolume phys_vol_name |
---|
| 68 | // The external surface is set as the external boundary of a the physical volume with name phys_vol_name |
---|
| 69 | // -/adjoint/SetExtSourceEmax Emax energy_unit |
---|
| 70 | // Set the maximum energy of the external source |
---|
| 71 | // |
---|
| 72 | // |
---|
| 73 | // 3)Definition of the adjoint source |
---|
| 74 | // --------------------------------------------------- |
---|
| 75 | // The adjoint source represents the source from which adjoint primary particles are generated.(see G4AdjointSimManager.hh and G4Application Developer guide for more infos) |
---|
| 76 | // 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 |
---|
| 77 | // source and define which type of adjoint primary particles should be considered. |
---|
| 78 | // Commands: |
---|
| 79 | // -/adjoint/DefineSphericalAdjSource R X Y Z unit_length: |
---|
| 80 | // The adjoint source is set on a sphere with radius R and centered on position (X,Y,Z) |
---|
| 81 | // |
---|
| 82 | // -/adjoint/DefineSphericalAdjSourceCenteredOnAVolume phys_vol_name R unit_length |
---|
| 83 | // The external source is set on a sphere with radius R and with its center position located at the center of the |
---|
| 84 | // the physical volume specified by the name phys_vol_name. |
---|
| 85 | // -/adjoint/DefineAdjSourceOnExtSurfaceOfAVolume phys_vol_name |
---|
| 86 | // The external surface is set as the external boundary of a the physical volume with name phys_vol_name |
---|
| 87 | // |
---|
| 88 | // -/adjoint/SetAdjSourceEmin Emin energy_unit |
---|
| 89 | // Set the minimum energy of the external source |
---|
| 90 | // |
---|
| 91 | // -/adjoint/SetAdjSourceEmax Emax energy_unit |
---|
| 92 | // Set the maximum energy of the external source |
---|
| 93 | // |
---|
| 94 | // -/adjoint/ConsiderAsPrimary particle_name |
---|
| 95 | // The type of particle specified by "particle_name" will be added in the list of primary adjoint particles. |
---|
| 96 | // The list of candidates depends on the reverse physics processes considered in the simulation. At the most the |
---|
| 97 | // potential candidates are (e-, gamma, proton , ion) |
---|
| 98 | // |
---|
| 99 | // -/adjoint/NeglectAsPrimary particle_name |
---|
| 100 | // The type of particle specified by "particle_name" will be removed from the list of primary adjoint particles. |
---|
| 101 | // The list of candidates depends on the reverse physics processes considered in the simulation. At the most the |
---|
| 102 | // potential candidates are (e-, gamma, proton , ion) |
---|
| 103 | // |
---|
| 104 | // |
---|
| 105 | |
---|
| 106 | #ifndef G4AdjointSimMessenger_h |
---|
| 107 | #define G4AdjointSimMessenger_h 1 |
---|
| 108 | |
---|
| 109 | #include "globals.hh" |
---|
| 110 | #include "G4UImessenger.hh" |
---|
| 111 | |
---|
| 112 | class G4AdjointSimManager; |
---|
| 113 | class G4UIdirectory; |
---|
| 114 | class G4UIcmdWithAString; |
---|
| 115 | class G4UIcmdWithAnInteger; |
---|
| 116 | class G4UIcmdWith3VectorAndUnit; |
---|
| 117 | class G4UIcmdWithABool; |
---|
| 118 | class G4UIcmdWithADoubleAndUnit; |
---|
| 119 | class G4UIcmdWithoutParameter; |
---|
| 120 | class G4UIcmdWithADouble; |
---|
| 121 | |
---|
| 122 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... |
---|
| 123 | |
---|
| 124 | class G4AdjointSimMessenger: public G4UImessenger |
---|
| 125 | { |
---|
| 126 | public: |
---|
| 127 | G4AdjointSimMessenger(G4AdjointSimManager* ); |
---|
| 128 | ~G4AdjointSimMessenger(); |
---|
| 129 | |
---|
| 130 | void SetNewValue(G4UIcommand*, G4String); |
---|
| 131 | |
---|
| 132 | private: |
---|
| 133 | G4AdjointSimManager* theAdjointRunManager; |
---|
| 134 | |
---|
| 135 | G4UIdirectory* AdjointSimDir; |
---|
| 136 | G4UIdirectory* PhysicsDir; |
---|
| 137 | |
---|
| 138 | G4UIcommand * beamOnCmd; |
---|
| 139 | G4UIcommand * testSourceCmd; |
---|
| 140 | |
---|
| 141 | G4UIcommand * DefineSpherExtSourceCmd; |
---|
| 142 | G4UIcommand * DefineSpherExtSourceCenteredOnAVolumeCmd; |
---|
| 143 | G4UIcmdWithAString * DefineExtSourceOnAVolumeExtSurfaceCmd; |
---|
| 144 | G4UIcmdWithADoubleAndUnit* setExtSourceEMaxCmd; |
---|
| 145 | |
---|
| 146 | G4UIcommand * DefineSpherAdjSourceCmd; |
---|
| 147 | G4UIcommand * DefineSpherAdjSourceCenteredOnAVolumeCmd; |
---|
| 148 | G4UIcmdWithAString * DefineAdjSourceOnAVolumeExtSurfaceCmd; |
---|
| 149 | |
---|
| 150 | G4UIcmdWithADoubleAndUnit* setAdjSourceEminCmd; |
---|
| 151 | G4UIcmdWithADoubleAndUnit* setAdjSourceEmaxCmd; |
---|
| 152 | |
---|
| 153 | |
---|
| 154 | G4UIcmdWithAString* ConsiderParticleAsPrimaryCmd; |
---|
| 155 | G4UIcmdWithAString* NeglectParticleAsPrimaryCmd; |
---|
| 156 | |
---|
| 157 | }; |
---|
| 158 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... |
---|
| 159 | |
---|
| 160 | #endif |
---|
| 161 | |
---|