Analysis Software
Documentation for
sPHENIX
simulation software
Home page
Related Pages
Modules
Namespaces
Classes
Files
Examples
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
PHG4GDMLSubsystem.cc
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file PHG4GDMLSubsystem.cc
1
// $Id: $
2
11
#include "
PHG4GDMLSubsystem.h
"
12
13
#include "
PHG4GDMLDetector.h
"
14
15
#include <phparameter/PHParameters.h>
16
17
#include <iostream>
// for operator<<, basic_ostream, endl
18
19
class
PHCompositeNode
;
20
class
PHG4Detector
;
21
22
PHG4GDMLSubsystem::PHG4GDMLSubsystem
(
const
std::string
&
name
)
23
:
PHG4DetectorSubsystem
(name, 0)
24
{
25
InitializeParameters
();
26
}
27
28
PHG4GDMLSubsystem::~PHG4GDMLSubsystem
() =
default
;
29
30
//_______________________________________________________________________
31
int
PHG4GDMLSubsystem::InitRunSubsystem
(
PHCompositeNode
*
topNode
)
32
{
33
// PHNodeIterator iter(topNode);
34
// PHCompositeNode *dstNode = dynamic_cast<PHCompositeNode *>(iter.findFirst("PHCompositeNode", "DST"));
35
36
// create detector
37
m_Detector
=
new
PHG4GDMLDetector
(
this
, topNode,
Name
(),
GetParams
());
38
m_Detector
->
OverlapCheck
(
CheckOverlap
());
39
40
return
0;
41
}
42
43
//_______________________________________________________________________
44
int
PHG4GDMLSubsystem::process_event
(
PHCompositeNode
*
/*topNode*/
)
45
{
46
return
0;
47
}
48
49
void
PHG4GDMLSubsystem::Print
(
const
std::string
&what)
const
50
{
51
std::cout <<
Name
() <<
" Parameters: "
<< std::endl;
52
GetParams
()->
Print
();
53
if
(
m_Detector
)
54
{
55
m_Detector
->
Print
(what);
56
}
57
58
return
;
59
}
60
61
//_______________________________________________________________________
62
PHG4Detector
*
PHG4GDMLSubsystem::GetDetector
()
const
63
{
64
return
m_Detector
;
65
}
66
67
void
PHG4GDMLSubsystem::SetDefaultParameters
()
68
{
69
set_default_double_param
(
"place_x"
, 0.);
70
set_default_double_param
(
"place_y"
, 0.);
71
set_default_double_param
(
"place_z"
, 0.);
72
set_default_double_param
(
"rot_x"
, 0.);
73
set_default_double_param
(
"rot_y"
, 0.);
74
set_default_double_param
(
"rot_z"
, 0.);
75
76
set_default_string_param
(
"GDMPath"
,
"DefaultParameters-InvadPath"
);
77
set_default_string_param
(
"TopVolName"
,
"DefaultParameters-InvadVol"
);
78
79
set_default_int_param
(
"skip_DST_geometry_export"
, 0.);
80
}
coresoftware
blob
master
simulation
g4simulation
g4detectors
PHG4GDMLSubsystem.cc
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:18:13
using
1.8.2 with
sPHENIX GitHub integration