Geant4 VMC
Version 6.8
Toggle main menu visibility
Loading...
Searching...
No Matches
source
event
src
TG4SpecialStackingActionMessenger.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 "
TG4SpecialStackingActionMessenger.h
"
16
#include "
TG4Globals.h
"
17
#include "
TG4SpecialStackingAction.h
"
18
19
#include <G4UIcmdWithABool.hh>
20
#include <G4UIcmdWithAnInteger.hh>
21
22
//_____________________________________________________________________________
23
TG4SpecialStackingActionMessenger::TG4SpecialStackingActionMessenger
(
24
TG4SpecialStackingAction
* stackingAction)
25
:
G4UImessenger
(),
26
fStackingAction
(stackingAction),
27
fSkipNeutrinoCmd
(0),
28
fWaitPrimaryCmd
(0)
29
30
{
32
33
fSkipNeutrinoCmd
=
new
G4UIcmdWithABool(
"/mcTracking/skipNeutrino"
,
this
);
34
fSkipNeutrinoCmd
->SetGuidance(
"Option to skip neutrinos."
);
35
fSkipNeutrinoCmd
->SetGuidance(
"By default this option is false."
);
36
fSkipNeutrinoCmd
->SetParameterName(
"SkipNeutrino"
,
false
);
37
fSkipNeutrinoCmd
->AvailableForStates(
38
G4State_PreInit, G4State_Init, G4State_Idle);
39
40
fWaitPrimaryCmd
=
new
G4UIcmdWithABool(
"/mcTracking/waitPrimary"
,
this
);
41
fWaitPrimaryCmd
->SetGuidance(
42
"Option to track all secondaries before starting the next primary."
);
43
fWaitPrimaryCmd
->SetGuidance(
"By default this option is true."
);
44
fWaitPrimaryCmd
->SetParameterName(
"WaitPrimary"
,
true
);
45
fWaitPrimaryCmd
->AvailableForStates(
46
G4State_PreInit, G4State_Init, G4State_Idle);
47
}
48
49
//_____________________________________________________________________________
50
TG4SpecialStackingActionMessenger::~TG4SpecialStackingActionMessenger
()
51
{
53
54
delete
fSkipNeutrinoCmd
;
55
delete
fWaitPrimaryCmd
;
56
}
57
58
//
59
// public methods
60
//
61
62
//_____________________________________________________________________________
63
void
TG4SpecialStackingActionMessenger::SetNewValue
(
64
G4UIcommand
* command, G4String newValue)
65
{
67
68
if
(command ==
fSkipNeutrinoCmd
) {
69
fStackingAction
->SetSkipNeutrino(
70
fSkipNeutrinoCmd
->GetNewBoolValue(newValue));
71
}
72
else
if
(command ==
fWaitPrimaryCmd
) {
73
fStackingAction
->SetWaitPrimary(
fWaitPrimaryCmd
->GetNewBoolValue(newValue));
74
}
75
}
TG4Globals.h
Definition of the TG4Globals class and basic container types.
TG4SpecialStackingActionMessenger.h
Definition of the TG4SpecialStackingActionMessenger class.
TG4SpecialStackingAction.h
Definition of the TG4SpecialStackingAction class.
G4UIcommand
G4UImessenger
TG4SpecialStackingActionMessenger::fSkipNeutrinoCmd
G4UIcmdWithABool * fSkipNeutrinoCmd
command: skipNeutrino
Definition
TG4SpecialStackingActionMessenger.h:57
TG4SpecialStackingActionMessenger::TG4SpecialStackingActionMessenger
TG4SpecialStackingActionMessenger()
Not implemented.
TG4SpecialStackingActionMessenger::~TG4SpecialStackingActionMessenger
virtual ~TG4SpecialStackingActionMessenger()
Definition
TG4SpecialStackingActionMessenger.cxx:50
TG4SpecialStackingActionMessenger::fStackingAction
TG4SpecialStackingAction * fStackingAction
associated class
Definition
TG4SpecialStackingActionMessenger.h:56
TG4SpecialStackingActionMessenger::fWaitPrimaryCmd
G4UIcmdWithABool * fWaitPrimaryCmd
command: waitPrimary
Definition
TG4SpecialStackingActionMessenger.h:58
TG4SpecialStackingActionMessenger::SetNewValue
virtual void SetNewValue(G4UIcommand *command, G4String string)
Definition
TG4SpecialStackingActionMessenger.cxx:63
TG4SpecialStackingAction
Defines a special stacking mechanism.
Definition
TG4SpecialStackingAction.h:41
Generated on
for Geant4 VMC by
1.17.0