ECCE @ EIC Software
Reference for
ECCE @ EIC
simulation and reconstruction software on GitHub
Home page
Related Pages
Modules
Namespaces
Classes
Files
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
G4NuclideTableMessenger.cc
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file G4NuclideTableMessenger.cc
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
//---------------------------------------------------------------
27
//
28
// G4NuclideTableMessenger.cc
29
//
30
// Description:
31
// This is a messenger class to interface to exchange information
32
// between ParticleDefinition and UI.
33
//
34
// History:
35
// 11 November 2015, T. Koi : The 1st version created.
36
//---------------------------------------------------------------
37
38
#include "
G4NuclideTableMessenger.hh
"
39
#include "
G4UImanager.hh
"
40
#include "
G4UIdirectory.hh
"
41
#include "
G4UIcmdWithoutParameter.hh
"
42
#include "
G4UIcmdWithAnInteger.hh
"
43
#include "
G4UIcmdWithADoubleAndUnit.hh
"
44
#include "
G4UIcmdWithABool.hh
"
45
46
#include "
G4NuclideTable.hh
"
47
#include "
G4ios.hh
"
// Include from 'system'
48
#include <iomanip>
// Include from 'system'
49
50
G4NuclideTableMessenger::G4NuclideTableMessenger
(
G4NuclideTable
* nuclideTable)
51
:theNuclideTable(nuclideTable)
52
{
53
//Commnad /particle/manage/nuclide
54
thisDirectory
=
new
G4UIdirectory
(
"/particle/nuclideTable/"
);
55
thisDirectory
->
SetGuidance
(
"Nuclide table control commands."
);
56
58
lifetimeCmd
=
new
G4UIcmdWithADoubleAndUnit
(
"/particle/nuclideTable/min_halflife"
,
this
);
59
lifetimeCmd
->
SetGuidance
(
"Set threshold of half-life."
);
60
lifetimeCmd
->
SetGuidance
(
"Unit of the time can be :"
);
61
lifetimeCmd
->
SetGuidance
(
" s, ms, ns (default)"
);
62
lifetimeCmd
->
SetParameterName
(
"life"
,
false
);
63
lifetimeCmd
->
SetDefaultValue
( 1000.0 );
64
lifetimeCmd
->
SetRange
(
"life >0.0"
);
65
lifetimeCmd
->
SetDefaultUnit
(
"ns"
);
66
lifetimeCmd
->
AvailableForStates
(
G4State_PreInit
,
G4State_Idle
);
67
69
lToleranceCmd
=
new
G4UIcmdWithADoubleAndUnit
(
"/particle/nuclideTable/level_tolerance"
,
this
);
70
lToleranceCmd
->
SetGuidance
(
"Set tolerance in level searching."
);
71
lToleranceCmd
->
SetGuidance
(
"Unit of the energy can be :"
);
72
lToleranceCmd
->
SetGuidance
(
" MeV, keV, eV (default)"
);
73
lToleranceCmd
->
SetParameterName
(
"lTolerance"
,
false
);
74
lToleranceCmd
->
SetDefaultValue
( 1.0 );
75
lToleranceCmd
->
SetRange
(
"lTolerance >0.0"
);
76
lToleranceCmd
->
SetDefaultUnit
(
"eV"
);
77
lToleranceCmd
->
AvailableForStates
(
G4State_PreInit
,
G4State_Idle
);
78
79
}
80
81
G4NuclideTableMessenger::~G4NuclideTableMessenger
()
82
{
83
delete
thisDirectory
;
84
delete
lifetimeCmd
;
85
delete
lToleranceCmd
;
86
}
87
88
void
G4NuclideTableMessenger::SetNewValue
(
G4UIcommand
* command,
G4String
newValue)
89
{
90
if
(command ==
lifetimeCmd
) {
91
//Commnad /particle/manage/nuclideTable/min_halflife
92
theNuclideTable
->
SetThresholdOfHalfLife
(
lifetimeCmd
->
GetNewDoubleValue
(newValue));
93
}
else
if
(command ==
lToleranceCmd
) {
94
//Commnad /particle/manage/nuclideTable/level_tolerance
95
theNuclideTable
->
SetLevelTolerance
(
lToleranceCmd
->
GetNewDoubleValue
(newValue));
96
}
97
}
geant4
tree
geant4-10.6-release
source
particles
management
src
G4NuclideTableMessenger.cc
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:25:24
using
1.8.2 with
ECCE GitHub integration