Geant4 11.2.2
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// G4AdjointSimMessenger
27//
28// Class description:
29//
30// This class represents the Messenger that defines the G4UI macro commands
31// allowing the user controlling an adjoint/reverse MC simulation. It calls
32// methods of G4AdjointSimManager.
33//
34// 1) Start an adjoint simulation
35// ---------------------------------------------------
36// Command:
37// -/adjoint/start_run nb: Start an adjoint simulation with a number of
38// events given by nb.
39// 2) Definition of the external source
40// ---------------------------------------------------
41// The external source represents the real external source of particles till
42// which adjoint particles are tracked in the reverse tracking mode of the
43// simulation (see G4AdjointSimManager.hh and G4Application Developer guide for
44// more infos). The user can define the source as the external surface of a
45// sphere or of G4 volume of the geometry. He can also set the maximum energy
46// of the source. If an adjoint particle get an energy higher than this maximum
47// energy before reaching the external surface source it is killed without
48// being registered.
49// Commands:
50// -/adjoint/DefineSphericalExtSource R X Y Z unit_length
51// The external source is set on a sphere with radius R and centered on
52// position (X,Y,Z)
53// -/adjoint/DefineSphericalExtSourceCenteredOnAVolume pvol_name R unit_length
54// The external source is set on a sphere with radius R and with its center
55// position located at the center of the physical volume specified by the
56// name pvol_name.
57// -/adjoint/DefineExtSourceOnExtSurfaceOfAVolume pvol_name
58// The external surface is set as the external boundary of a the physical
59// volume with name pvol_name.
60// -/adjoint/SetExtSourceEmax Emax energy_unit
61// Set the maximum energy of the external source.
62//
63// 3) Definition of the adjoint source
64// ---------------------------------------------------
65// The adjoint source represents the source from which adjoint primary
66// particles are generated (see G4AdjointSimManager.hh and G4Application
67// Developer guide for more infos).
68// The user can define the source as the external surface of a sphere or of
69// G4 volume of the geometry. He sets the minimum maximum energy of the
70// source and defines which type of adjoint primary particles should be
71// considered.
72// Commands:
73// -/adjoint/DefineSphericalAdjSource R X Y Z unit_length
74// The adjoint source is set on a sphere with radius R and centered on
75// position (X,Y,Z)
76// -/adjoint/DefineSphericalAdjSourceCenteredOnAVolume pvol_name R unit_length
77// The external source is set on a sphere with radius R and with its center
78// position located at the center of the physical volume specified by the
79// name pvol_name.
80// -/adjoint/DefineAdjSourceOnExtSurfaceOfAVolume pvol_name
81// The external surface is set as the external boundary of a the
82// physical volume with name pvol_name
83// -/adjoint/SetAdjSourceEmin Emin energy_unit
84// Set the minimum energy of the external source
85// -/adjoint/SetAdjSourceEmax Emax energy_unit
86// Set the maximum energy of the external source
87// -/adjoint/ConsiderAsPrimary particle_name
88// The type of particle specified by "particle_name" will be added in
89// the list of primary adjoint particles. The list of candidates depends on the
90// reverse physics processes considered in the simulation. At the most the potential
91// candidates are (e-, gamma, proton, ion).
92// -/adjoint/NeglectAsPrimary particle_name
93// The type of particle specified by "particle_name" will be removed
94// from the list of primary adjoint particles. The list of candidates depends
95// on the reverse physics processes considered in the simulation. At the most
96// the potential candidates are (e-, gamma, proton, ion).
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
112class G4UIdirectory;
116class G4UIcmdWithABool;
120
121// --------------------------------------------------------------------
122
124{
125 public:
127 ~G4AdjointSimMessenger() override;
128
129 void SetNewValue(G4UIcommand*, G4String) override;
130
131 private:
132 G4AdjointSimManager* theAdjointRunManager;
133
134 G4UIdirectory* AdjointSimDir = nullptr;
135 G4UIcommand* beamOnCmd = nullptr;
136
137 G4UIcommand* DefineSpherExtSourceCmd = nullptr;
138 G4UIcommand* DefineSpherExtSourceCenteredOnAVolumeCmd = nullptr;
139 G4UIcmdWithAString* DefineExtSourceOnAVolumeExtSurfaceCmd = nullptr;
140 G4UIcmdWithADoubleAndUnit* setExtSourceEMaxCmd = nullptr;
141
142 G4UIcommand* DefineSpherAdjSourceCmd = nullptr;
143 G4UIcommand* DefineSpherAdjSourceCenteredOnAVolumeCmd = nullptr;
144 G4UIcmdWithAString* DefineAdjSourceOnAVolumeExtSurfaceCmd = nullptr;
145
146 G4UIcmdWithADoubleAndUnit* setAdjSourceEminCmd = nullptr;
147 G4UIcmdWithADoubleAndUnit* setAdjSourceEmaxCmd = nullptr;
148
149 G4UIcmdWithAString* ConsiderParticleAsPrimaryCmd = nullptr;
150 G4UIcmdWithAString* NeglectParticleAsPrimaryCmd = nullptr;
151
152 G4UIcmdWithAnInteger* setNbOfPrimaryFwdGammasPerEventCmd = nullptr;
153 G4UIcmdWithAnInteger* setNbOfPrimaryAdjGammasPerEventCmd = nullptr;
154 G4UIcmdWithAnInteger* setNbOfPrimaryAdjElectronsPerEventCmd = nullptr;
155};
156
157#endif
void SetNewValue(G4UIcommand *, G4String) override
G4AdjointSimMessenger(G4AdjointSimManager *)