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
ECCE @ EIC Software
Deprecated List
Modules
Namespaces
Classes
Files
File List
acts
analysis
coresoftware
Doxygen_Assist
ecce-detectors
fun4all_eicdetectors
geant4
tree
geant4-10.6-release
config
environments
examples
advanced
basic
extended
analysis
biasing
common
electromagnetic
errorpropagation
eventgenerator
exoticphysics
field
g3tog4
geometry
hadronic
medical
optical
parallel
parameterisations
persistency
physicslists
polarisation
radioactivedecay
Activation
rdecay01
include
src
ActionInitialization.cc
DetectorConstruction.cc
EventAction.cc
HistoManager.cc
PhysicsList.cc
PrimaryGeneratorAction.cc
Run.cc
RunAction.cc
SteppingVerbose.cc
TrackingAction.cc
TrackingMessenger.cc
plotHisto.C
rdecay01.cc
rdecay02
runAndEvent
visualization
source
macros
online_distribution
tutorials
doxygen_mainpage.h
File Members
External Links
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
TrackingMessenger.cc
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file TrackingMessenger.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
//
28
//
29
//
30
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
31
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
32
33
#include "
TrackingMessenger.hh
"
34
#include "TrackingAction.hh"
35
36
#include "
G4UIcmdWithABool.hh
"
37
#include "
G4UIcommand.hh
"
38
#include "
G4UIparameter.hh
"
39
40
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
41
42
TrackingMessenger::TrackingMessenger
(
TrackingAction
* trackA)
43
:
G4UImessenger
(),
44
fTrackingAction(trackA),fTrackingCmd(0),fTimeWindowCmd(0)
45
{
46
fTrackingCmd
=
new
G4UIcmdWithABool
(
"/rdecay01/fullChain"
,
this
);
47
fTrackingCmd
->
SetGuidance
(
"allow full decay chain"
);
48
fTrackingCmd
->
SetParameterName
(
"flag"
,
true
);
49
fTrackingCmd
->
SetDefaultValue
(
true
);
50
51
fTimeWindowCmd
=
new
G4UIcommand
(
"/rdecay01/timeWindow"
,
this
);
52
fTimeWindowCmd
->
SetGuidance
(
"set time window to survey activity per nuclide"
);
53
fTimeWindowCmd
->
SetGuidance
(
" t1, delta_t"
);
54
//
55
G4UIparameter
* t1Prm =
new
G4UIparameter
(
"t1"
,
'd'
,
false
);
56
t1Prm->
SetGuidance
(
"time_1"
);
57
t1Prm->
SetParameterRange
(
"t1>=0."
);
58
fTimeWindowCmd
->
SetParameter
(t1Prm);
59
//
60
G4UIparameter
* unit1Prm =
new
G4UIparameter
(
"unit1"
,
's'
,
false
);
61
unit1Prm->
SetGuidance
(
"unit of t1"
);
62
G4String
unitList =
G4UIcommand::UnitsList
(
G4UIcommand::CategoryOf
(
"second"
));
63
unit1Prm->
SetParameterCandidates
(unitList);
64
fTimeWindowCmd
->
SetParameter
(unit1Prm);
65
//
66
G4UIparameter
* dtPrm =
new
G4UIparameter
(
"dt"
,
'd'
,
false
);
67
dtPrm->
SetGuidance
(
"delta_t"
);
68
dtPrm->
SetParameterRange
(
"dt>0."
);
69
fTimeWindowCmd
->
SetParameter
(dtPrm);
70
//
71
G4UIparameter
* unit2Prm =
new
G4UIparameter
(
"unit2"
,
's'
,
false
);
72
unit2Prm->
SetGuidance
(
"unit of dt"
);
73
unit2Prm->
SetParameterCandidates
(unitList);
74
fTimeWindowCmd
->
SetParameter
(unit2Prm);
75
//
76
fTimeWindowCmd
->
AvailableForStates
(
G4State_PreInit
,
G4State_Idle
);
77
}
78
79
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
80
81
TrackingMessenger::~TrackingMessenger
()
82
{
83
delete
fTrackingCmd
;
84
delete
fTimeWindowCmd
;
85
}
86
87
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
88
89
void
TrackingMessenger::SetNewValue
(
G4UIcommand
* command,
G4String
newValue)
90
{
91
if
(command ==
fTrackingCmd
)
92
{
fTrackingAction
->
SetFullChain
(
fTrackingCmd
->
GetNewBoolValue
(newValue));}
93
94
if
(command ==
fTimeWindowCmd
)
95
{
96
G4double
t1
;
G4double
dt;
97
G4String
unt1, unt2;
98
std::istringstream is(newValue);
99
is >> t1 >> unt1 >> dt >> unt2;
100
t1 *=
G4UIcommand::ValueOf
(unt1);
101
dt *=
G4UIcommand::ValueOf
(unt2);
102
fTrackingAction
->
SetTimeWindow
(t1, dt);
103
}
104
}
105
106
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
geant4
tree
geant4-10.6-release
examples
extended
radioactivedecay
rdecay01
src
TrackingMessenger.cc
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:25:10
using
1.8.2 with
ECCE GitHub integration