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
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
using namespace
std;
23
24
PHG4GDMLSubsystem::PHG4GDMLSubsystem
(
const
std::string &
name
)
25
:
PHG4DetectorSubsystem
(name, 0)
26
, m_Detector(nullptr)
27
{
28
InitializeParameters
();
29
}
30
31
PHG4GDMLSubsystem::~PHG4GDMLSubsystem
()
32
{
33
}
34
35
//_______________________________________________________________________
36
int
PHG4GDMLSubsystem::InitRunSubsystem
(
PHCompositeNode
*
topNode
)
37
{
38
// PHNodeIterator iter(topNode);
39
// PHCompositeNode *dstNode = dynamic_cast<PHCompositeNode *>(iter.findFirst("PHCompositeNode", "DST"));
40
41
// create detector
42
m_Detector
=
new
PHG4GDMLDetector
(
this
, topNode,
Name
(),
GetParams
());
43
m_Detector
->
OverlapCheck
(
CheckOverlap
());
44
45
// set<string> nodes;
46
// if (GetParams()->get_int_param("active"))
47
// {
48
// PHNodeIterator dstIter(dstNode);
49
// PHCompositeNode *DetNode = dynamic_cast<PHCompositeNode *>(dstIter.findFirst("PHCompositeNode", SuperDetector()));
50
// if (!DetNode)
51
// {
52
// DetNode = new PHCompositeNode(SuperDetector());
53
// dstNode->addNode(DetNode);
54
// }
55
//
56
// ostringstream nodename;
57
// if (SuperDetector() != "NONE")
58
// {
59
// nodename << "G4HIT_" << SuperDetector();
60
// }
61
// else
62
// {
63
// nodename << "G4HIT_" << Name();
64
// }
65
// nodes.insert(nodename.str());
66
// if (GetParams()->get_int_param("absorberactive"))
67
// {
68
// nodename.str("");
69
// if (SuperDetector() != "NONE")
70
// {
71
// nodename << "G4HIT_ABSORBER_" << SuperDetector();
72
// }
73
// else
74
// {
75
// nodename << "G4HIT_ABSORBER_" << Name();
76
// }
77
// nodes.insert(nodename.str());
78
// }
79
// BOOST_FOREACH (string node, nodes)
80
// {
81
// PHG4HitContainer *g4_hits = findNode::getClass<PHG4HitContainer>(topNode, node.c_str());
82
// if (!g4_hits)
83
// {
84
// g4_hits = new PHG4HitContainer(node);
85
// DetNode->addNode(new PHIODataNode<PHObject>(g4_hits, node.c_str(), "PHObject"));
86
// }
87
// }
88
//
89
// // create stepping action
90
// m_SteppingAction = new PHG4InnerHcalSteppingAction(m_Detector, GetParams());
91
// }
92
// else
93
// {
94
// // if this is a black hole it does not have to be active
95
// if (GetParams()->get_int_param("blackhole"))
96
// {
97
// m_SteppingAction = new PHG4InnerHcalSteppingAction(m_Detector, GetParams());
98
// }
99
// }
100
return
0;
101
}
102
103
//_______________________________________________________________________
104
int
PHG4GDMLSubsystem::process_event
(
PHCompositeNode
*
/*topNode*/
)
105
{
106
return
0;
107
}
108
109
void
PHG4GDMLSubsystem::Print
(
const
string
&what)
const
110
{
111
cout <<
Name
() <<
" Parameters: "
<< endl;
112
GetParams
()->
Print
();
113
if
(
m_Detector
)
114
{
115
m_Detector
->
Print
(what);
116
}
117
118
return
;
119
}
120
121
//_______________________________________________________________________
122
PHG4Detector
*
PHG4GDMLSubsystem::GetDetector
(
void
)
const
123
{
124
return
m_Detector
;
125
}
126
127
void
PHG4GDMLSubsystem::SetDefaultParameters
()
128
{
129
set_default_double_param
(
"place_x"
, 0.);
130
set_default_double_param
(
"place_y"
, 0.);
131
set_default_double_param
(
"place_z"
, 0.);
132
set_default_double_param
(
"rot_x"
, 0.);
133
set_default_double_param
(
"rot_y"
, 0.);
134
set_default_double_param
(
"rot_z"
, 0.);
135
136
set_default_string_param
(
"GDMPath"
,
"DefaultParameters-InvadPath"
);
137
set_default_string_param
(
"TopVolName"
,
"DefaultParameters-InvadVol"
);
138
139
set_default_int_param
(
"skip_DST_geometry_export"
, 0.);
140
}
coresoftware
blob
master
simulation
g4simulation
g4detectors
PHG4GDMLSubsystem.cc
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:24:41
using
1.8.2 with
ECCE GitHub integration