Geant4 VMC
Version 6.8
Toggle main menu visibility
Loading...
Searching...
No Matches
source
physics_list
src
TG4ExtDecayerMessenger.cxx
Go to the documentation of this file.
1
//------------------------------------------------
2
// The Geant4 Virtual Monte Carlo package
3
// Copyright (C) 2007 - 2014 Ivana Hrivnacova
4
// All rights reserved.
5
//
6
// For the licensing terms see geant4_vmc/LICENSE.
7
// Contact: root-vmc@cern.ch
8
//-------------------------------------------------
9
14
15
#include "
TG4ExtDecayerMessenger.h
"
16
#include "
TG4ExtDecayerPhysics.h
"
17
18
#include <G4UIcmdWithABool.hh>
19
#include <G4UIcmdWithAString.hh>
20
#include <G4UIdirectory.hh>
21
22
//______________________________________________________________________________
23
TG4ExtDecayerMessenger::TG4ExtDecayerMessenger
(
24
TG4ExtDecayerPhysics
* extDecayerPhysics)
25
:
G4UImessenger
(),
26
fExtDecayerPhysics
(extDecayerPhysics),
27
fSetSelectionCmd
(0),
28
fSkipNeutrinoCmd
(0)
29
{
31
32
fSetSelectionCmd
=
33
new
G4UIcmdWithAString(
"/mcPhysics/setExtDecayerSelection"
,
this
);
34
G4String guidance =
"Select particles for which the external decayer will "
;
35
guidance = guidance +
"have priority over using Geant4 decay table"
;
36
fSetSelectionCmd
->SetGuidance(guidance);
37
fSetSelectionCmd
->SetParameterName(
"ExtDecayerSelection"
,
false
);
38
fSetSelectionCmd
->AvailableForStates(G4State_PreInit);
39
40
fSkipNeutrinoCmd
=
41
new
G4UIcmdWithABool(
"/mcPhysics/skipExtDecayerNeutrino"
,
this
);
42
guidance =
"Skip importing neutrinos (default is false)"
;
43
fSkipNeutrinoCmd
->SetGuidance(guidance);
44
fSkipNeutrinoCmd
->SetParameterName(
"ExtDecayerSkipNeutrino"
,
false
);
45
fSkipNeutrinoCmd
->AvailableForStates(G4State_PreInit);
46
}
47
48
//______________________________________________________________________________
49
TG4ExtDecayerMessenger::~TG4ExtDecayerMessenger
()
50
{
52
53
delete
fSetSelectionCmd
;
54
delete
fSkipNeutrinoCmd
;
55
}
56
57
//
58
// public methods
59
//
60
61
//______________________________________________________________________________
62
void
TG4ExtDecayerMessenger::SetNewValue
(
63
G4UIcommand
* command, G4String newValue)
64
{
66
67
if
(command ==
fSetSelectionCmd
) {
68
fExtDecayerPhysics
->SetSelection(newValue);
69
}
70
else
if
(command ==
fSkipNeutrinoCmd
) {
71
fExtDecayerPhysics
->SetSkipNeutrino(
72
fSkipNeutrinoCmd
->GetNewBoolValue(newValue));
73
}
74
}
TG4ExtDecayerMessenger.h
Definition of the TG4ExtDecayerMessenger class.
TG4ExtDecayerPhysics.h
Definition of the TG4ExtDecayerPhysics class.
G4UIcommand
G4UImessenger
TG4ExtDecayerMessenger::TG4ExtDecayerMessenger
TG4ExtDecayerMessenger()
Not implemented.
TG4ExtDecayerMessenger::fExtDecayerPhysics
TG4ExtDecayerPhysics * fExtDecayerPhysics
associated class
Definition
TG4ExtDecayerMessenger.h:57
TG4ExtDecayerMessenger::fSetSelectionCmd
G4UIcmdWithAString * fSetSelectionCmd
setExtDecayerSelection command
Definition
TG4ExtDecayerMessenger.h:60
TG4ExtDecayerMessenger::~TG4ExtDecayerMessenger
virtual ~TG4ExtDecayerMessenger()
Definition
TG4ExtDecayerMessenger.cxx:49
TG4ExtDecayerMessenger::fSkipNeutrinoCmd
G4UIcmdWithABool * fSkipNeutrinoCmd
skipExtDecayerNeutrino command
Definition
TG4ExtDecayerMessenger.h:63
TG4ExtDecayerMessenger::SetNewValue
virtual void SetNewValue(G4UIcommand *command, G4String string)
Definition
TG4ExtDecayerMessenger.cxx:62
TG4ExtDecayerPhysics
The builder for external decayer.
Definition
TG4ExtDecayerPhysics.h:33
Generated on
for Geant4 VMC by
1.17.0