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
ExN04StackingActionMessenger.cc
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file ExN04StackingActionMessenger.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
#include "ExN04StackingActionMessenger.hh"
32
#include "ExN04StackingAction.hh"
33
#include "
G4UIcmdWithAnInteger.hh
"
34
#include "
G4UIcmdWithADoubleAndUnit.hh
"
35
#include "
G4ios.hh
"
36
37
ExN04StackingActionMessenger::ExN04StackingActionMessenger
(
ExN04StackingAction
* msa)
38
:myAction(msa)
39
{
40
muonCmd
=
new
G4UIcmdWithAnInteger
(
"/mydet/reqmuon"
,
this
);
41
muonCmd
->
SetGuidance
(
"Number of muon for the trigger."
);
42
muonCmd
->
SetParameterName
(
"N"
,
true
);
43
muonCmd
->
SetDefaultValue
(2);
44
muonCmd
->
SetRange
(
"N>=0"
);
45
46
isomuonCmd
=
new
G4UIcmdWithAnInteger
(
"/mydet/isomuon"
,
this
);
47
isomuonCmd
->
SetGuidance
(
"Number of isolated muon for the trigger."
);
48
isomuonCmd
->
SetParameterName
(
"N"
,
true
);
49
isomuonCmd
->
SetDefaultValue
(2);
50
isomuonCmd
->
SetRange
(
"N>=0"
);
51
52
isoCmd
=
new
G4UIcmdWithAnInteger
(
"/mydet/isolation"
,
this
);
53
isoCmd
->
SetGuidance
(
"Maximum allowed number of hits in tracker"
);
54
isoCmd
->
SetGuidance
(
" for an isolated muon track (includes hits by muon)"
);
55
isoCmd
->
SetParameterName
(
"N"
,
true
);
56
isoCmd
->
SetDefaultValue
(10);
57
isoCmd
->
SetRange
(
"N>=0"
);
58
59
roiCmd
=
new
G4UIcmdWithADoubleAndUnit
(
"/mydet/RoIangle"
,
this
);
60
roiCmd
->
SetGuidance
(
"Define RoI angle"
);
61
roiCmd
->
SetParameterName
(
"theta"
,
true
,
true
);
62
roiCmd
->
SetDefaultUnit
(
"deg"
);
63
}
64
65
ExN04StackingActionMessenger::~ExN04StackingActionMessenger
()
66
{
67
delete
muonCmd
;
68
delete
isomuonCmd
;
69
delete
isoCmd
;
70
delete
roiCmd
;
71
}
72
73
void
ExN04StackingActionMessenger::SetNewValue
(
G4UIcommand
* command,
G4String
newValue)
74
{
75
if
( command==
muonCmd
)
76
{
myAction
->
SetNRequestMuon
(
muonCmd
->
GetNewIntValue
(newValue)); }
77
else
if
( command==
isomuonCmd
)
78
{
myAction
->
SetNRequestIsoMuon
(
isomuonCmd
->
GetNewIntValue
(newValue)); }
79
else
if
( command==
isoCmd
)
80
{
myAction
->
SetNIsolation
(
isoCmd
->
GetNewIntValue
(newValue)); }
81
else
if
( command==
roiCmd
)
82
{
myAction
->
SetRoIAngle
(
roiCmd
->
GetNewDoubleValue
(newValue)); }
83
}
84
85
G4String
ExN04StackingActionMessenger::GetCurrentValue
(
G4UIcommand
* command)
86
{
87
G4String
cv;
88
89
if
( command==
muonCmd
)
90
{ cv =
muonCmd
->
ConvertToString
(
myAction
->
GetNRequestMuon
()); }
91
else
if
( command==
isomuonCmd
)
92
{ cv =
isomuonCmd
->
ConvertToString
(
myAction
->
GetNRequestIsoMuon
()); }
93
else
if
( command==
isoCmd
)
94
{ cv =
isoCmd
->
ConvertToString
(
myAction
->
GetNIsolation
()); }
95
else
if
( command==
roiCmd
)
96
{ cv =
roiCmd
->
ConvertToString
(
myAction
->
GetRoIAngle
(),
"deg"
); }
97
98
return
cv;
99
}
100
geant4
tree
geant4-10.6-release
examples
extended
parallel
TopC
ParN04
src
ExN04StackingActionMessenger.cc
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:25:04
using
1.8.2 with
ECCE GitHub integration