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
G4Pythia6DecayerMessenger.cc
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file G4Pythia6DecayerMessenger.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
//
29
30
// ----------------------------------------------------------------------------
31
// Messenger class that defines commands for G4Pythia6Decayer.
32
//
33
// Implements command
34
// - /pythia6Decayer/verbose [level]
35
// - /pythia6Decayer/forceDecayType [decayType]
36
// ----------------------------------------------------------------------------
37
38
#include "G4Pythia6DecayerMessenger.hh"
39
#include "G4Pythia6Decayer.hh"
40
#include "EDecayType.hh"
41
42
#include <
G4UIdirectory.hh
>
43
#include <
G4UIcmdWithAnInteger.hh
>
44
45
#include <sstream>
46
47
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
48
49
G4Pythia6DecayerMessenger::G4Pythia6DecayerMessenger
(
50
G4Pythia6Decayer
* pythia6Decayer)
51
:
G4UImessenger
(),
52
fPythia6Decayer(pythia6Decayer),
53
fDirectory(0),
54
fVerboseCmd(0),
55
fDecayTypeCmd(0)
56
{
58
59
fDirectory
=
new
G4UIdirectory
(
"/pythia6Decayer/"
);
60
fDirectory
->
SetGuidance
(
"G4Pythia6Decayer control commands."
);
61
62
fVerboseCmd
63
=
new
G4UIcmdWithAnInteger
(
"/pythia6Decayer/verbose"
,
this
);
64
fVerboseCmd
->
SetGuidance
(
"Set Pythia6Decayer verbose level"
);
65
fVerboseCmd
->
SetParameterName
(
"VerboseLevel"
,
false
);
66
fVerboseCmd
->
SetRange
(
"VerboseLevel >= 0 && VerboseLevel <= 1"
);
67
fVerboseCmd
->
AvailableForStates
(
G4State_Idle
);
68
69
fDecayTypeCmd
70
=
new
G4UIcmdWithAnInteger
(
"/pythia6Decayer/forceDecayType"
,
this
);
71
fDecayTypeCmd
->
SetGuidance
(
"Force the specified decay type"
);
72
fDecayTypeCmd
->
SetParameterName
(
"DecayType"
,
false
);
73
std::ostringstream os;
74
os <<
"DecayType >= "
<<
kSemiElectronic
75
<<
" && DecayType <= "
<<
kMaxDecay
;
76
fDecayTypeCmd
->
SetRange
(os.str().c_str());
77
fDecayTypeCmd
->
AvailableForStates
(
G4State_Idle
);
78
}
79
80
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
81
82
G4Pythia6DecayerMessenger::~G4Pythia6DecayerMessenger
()
83
{
85
86
delete
fDirectory
;
87
delete
fVerboseCmd
;
88
delete
fDecayTypeCmd
;
89
}
90
91
//
92
// public methods
93
//
94
95
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
96
97
void
G4Pythia6DecayerMessenger::SetNewValue
(
G4UIcommand
* command,
98
G4String
newValue)
99
{
101
102
if
(command ==
fVerboseCmd
) {
103
fPythia6Decayer
104
->
SetVerboseLevel
(
fVerboseCmd
->
GetNewIntValue
(newValue));
105
}
106
else
if
(command ==
fDecayTypeCmd
) {
107
fPythia6Decayer
108
->
ForceDecayType
(
EDecayType
(
fDecayTypeCmd
->
GetNewIntValue
(newValue)));
109
}
110
}
111
112
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
geant4
tree
geant4-10.6-release
examples
extended
eventgenerator
pythia
decayer6
src
G4Pythia6DecayerMessenger.cc
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:24:40
using
1.8.2 with
ECCE GitHub integration