Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4AdjointSimMessenger.hh
Go to the documentation of this file.
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$
27//
28/////////////////////////////////////////////////////////////////////////////////
29// Class Name: G4AdjointSimMessenger.hh
30// Author: L. Desorgher
31// Organisation: SpaceIT GmbH
32// Contract: ESA contract 21435/08/NL/AT
33// Customer: ESA/ESTEC
34/////////////////////////////////////////////////////////////////////////////////
35//
36// CHANGE HISTORY
37// --------------
38// ChangeHistory:
39// -1st January 2007 creation by L. Desorgher
40// -November-December 2009 Some cleaning and adaptation for the first Release in the Geant4 toolkit, L. Desorgher
41//
42//
43//-------------------------------------------------------------
44// Documentation:
45// This class represents the Messenger that defined the G4UI macro comands allowing the
46// user contreol an adjoint/reverse MC simulation. It calls methods of G4AdjointSimManager
47// List of commands
48// -----------------
49// 1)Start an adjoint simulation
50// --------------------------------------------
51// Command:
52// -/adjoint/start_run nb: Start an adjoint simulation with a number of events given by nb.
53// 2)Definition of the external source
54// ---------------------------------------------------
55// The external source represents the real external source of particles till which adjoint particles are tracked in the reverse tracking mode
56// of the simulation (see G4AdjointSimManager.hh and G4Application Developer guide for more infos).
57// 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
58// 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.
59// Commands:
60// -/adjoint/DefineSphericalExtSource R X Y Z unit_length:
61// The external source is set on a sphere with radius R and centered on position (X,Y,Z)
62//
63// -/adjoint/DefineSphericalExtSourceCenteredOnAVolume phys_vol_name R unit_length
64// The external source is set on a sphere with radius R and with its center position located at the center of the
65// the physical volume specified by the name phys_vol_name.
66// -/adjoint/DefineExtSourceOnExtSurfaceOfAVolume phys_vol_name
67// The external surface is set as the external boundary of a the physical volume with name phys_vol_name
68// -/adjoint/SetExtSourceEmax Emax energy_unit
69// Set the maximum energy of the external source
70//
71//
72// 3)Definition of the adjoint source
73// ---------------------------------------------------
74// The adjoint source represents the source from which adjoint primary particles are generated.(see G4AdjointSimManager.hh and G4Application Developer guide for more infos)
75// 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
76// source and define which type of adjoint primary particles should be considered.
77// Commands:
78// -/adjoint/DefineSphericalAdjSource R X Y Z unit_length:
79// The adjoint source is set on a sphere with radius R and centered on position (X,Y,Z)
80//
81// -/adjoint/DefineSphericalAdjSourceCenteredOnAVolume phys_vol_name R unit_length
82// The external source is set on a sphere with radius R and with its center position located at the center of the
83// the physical volume specified by the name phys_vol_name.
84// -/adjoint/DefineAdjSourceOnExtSurfaceOfAVolume phys_vol_name
85// The external surface is set as the external boundary of a the physical volume with name phys_vol_name
86//
87// -/adjoint/SetAdjSourceEmin Emin energy_unit
88// Set the minimum energy of the external source
89//
90// -/adjoint/SetAdjSourceEmax Emax energy_unit
91// Set the maximum energy of the external source
92//
93// -/adjoint/ConsiderAsPrimary particle_name
94// The type of particle specified by "particle_name" will be added in the list of primary adjoint particles.
95// The list of candidates depends on the reverse physics processes considered in the simulation. At the most the
96// potential candidates are (e-, gamma, proton , ion)
97//
98// -/adjoint/NeglectAsPrimary particle_name
99// The type of particle specified by "particle_name" will be removed from the list of primary adjoint particles.
100// The list of candidates depends on the reverse physics processes considered in the simulation. At the most the
101// potential candidates are (e-, gamma, proton , ion)
102//
103//
104
105#ifndef G4AdjointSimMessenger_h
106#define G4AdjointSimMessenger_h 1
107
108#include "globals.hh"
109#include "G4UImessenger.hh"
110
112class G4UIdirectory;
116class G4UIcmdWithABool;
120
121//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
122
124{
125 public:
128
130
131 private:
132 G4AdjointSimManager* theAdjointRunManager;
133
134 G4UIdirectory* AdjointSimDir;
135 G4UIdirectory* PhysicsDir;
136
137 G4UIcommand * beamOnCmd;
138 G4UIcommand * testSourceCmd;
139
140 G4UIcommand * DefineSpherExtSourceCmd;
141 G4UIcommand * DefineSpherExtSourceCenteredOnAVolumeCmd;
142 G4UIcmdWithAString * DefineExtSourceOnAVolumeExtSurfaceCmd;
143 G4UIcmdWithADoubleAndUnit* setExtSourceEMaxCmd;
144
145 G4UIcommand * DefineSpherAdjSourceCmd;
146 G4UIcommand * DefineSpherAdjSourceCenteredOnAVolumeCmd;
147 G4UIcmdWithAString * DefineAdjSourceOnAVolumeExtSurfaceCmd;
148
149 G4UIcmdWithADoubleAndUnit* setAdjSourceEminCmd;
150 G4UIcmdWithADoubleAndUnit* setAdjSourceEmaxCmd;
151
152
153 G4UIcmdWithAString* ConsiderParticleAsPrimaryCmd;
154 G4UIcmdWithAString* NeglectParticleAsPrimaryCmd;
155
156};
157//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
158
159#endif
160
void SetNewValue(G4UIcommand *, G4String)