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
blob
master
calibrations
generators
offline
simulation
g4simulation
EICPhysicsList
g4bbc
g4calo
g4centrality
g4decayer
g4detectors
g4epd
g4eval
g4gdml
g4histos
g4intt
g4jets
g4main
g4micromegas
PHG4MicromegasDetector.cc
PHG4MicromegasDetector.h
PHG4MicromegasDigitizer.cc
PHG4MicromegasDigitizer.h
PHG4MicromegasHitReco.cc
PHG4MicromegasHitReco.h
PHG4MicromegasSteppingAction.cc
PHG4MicromegasSteppingAction.h
PHG4MicromegasSubsystem.cc
PHG4MicromegasSubsystem.h
g4mvtx
g4tpc
g4trackfastsim
g4vertex
tpcresponse
Doxygen_Assist
ecce-detectors
fun4all_eicdetectors
geant4
macros
online_distribution
tutorials
doxygen_mainpage.h
File Members
External Links
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
PHG4MicromegasSubsystem.cc
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file PHG4MicromegasSubsystem.cc
1
6
#include "
PHG4MicromegasSubsystem.h
"
7
8
#include "
PHG4MicromegasDetector.h
"
9
#include "
PHG4MicromegasSteppingAction.h
"
10
11
#include <phparameter/PHParameters.h>
12
13
#include <
g4main/PHG4HitContainer.h
>
14
#include <
g4main/PHG4SteppingAction.h
>
15
16
#include <
phool/PHCompositeNode.h
>
17
#include <
phool/PHIODataNode.h
>
18
#include <
phool/PHNode.h
>
19
#include <
phool/PHNodeIterator.h
>
20
#include <
phool/PHObject.h
>
21
#include <
phool/getClass.h
>
22
23
//_______________________________________________________________________
24
PHG4MicromegasSubsystem::PHG4MicromegasSubsystem
(
const
std::string &
name
,
int
layer
)
25
:
PHG4DetectorSubsystem
(name, layer)
26
{
27
// call base class method which will set up parameter infrastructure
28
// and call our SetDefaultParameters() method
29
InitializeParameters
();
30
31
SuperDetector
(name);
32
}
33
34
//_______________________________________________________________________
35
int
PHG4MicromegasSubsystem::InitRunSubsystem
(
PHCompositeNode
*topNode)
36
{
37
PHNodeIterator
iter(topNode);
38
auto
dstNode =
dynamic_cast<
PHCompositeNode
*
>
(iter.
findFirst
(
"PHCompositeNode"
,
"DST"
));
39
PHNodeIterator
dstIter(dstNode);
40
41
if
(
GetParams
()->
get_int_param
(
"active"
))
42
{
43
auto
detNode =
dynamic_cast<
PHCompositeNode
*
>
(dstIter.
findFirst
(
"PHCompositeNode"
,
SuperDetector
()));
44
if
(!detNode)
45
{
46
detNode =
new
PHCompositeNode
(
SuperDetector
());
47
dstNode->addNode(detNode);
48
}
49
50
const
std::string g4hitnodename =
"G4HIT_"
+
SuperDetector
();
51
auto
g4_hits = findNode::getClass<PHG4HitContainer>(detNode, g4hitnodename);
52
if
(!g4_hits)
53
{
54
g4_hits =
new
PHG4HitContainer
(g4hitnodename);
55
detNode->addNode(
new
PHIODataNode<PHObject>
(g4_hits, g4hitnodename,
"PHObject"
));
56
}
57
}
58
59
// create detector
60
m_Detector
=
new
PHG4MicromegasDetector
(
this
, topNode,
GetParams
(),
Name
());
61
m_Detector
->
set_first_layer
(
GetLayer
() );
62
63
m_Detector
->
Verbosity
(
Verbosity
());
64
m_Detector
->
SuperDetector
(
SuperDetector
());
65
m_Detector
->
OverlapCheck
(
CheckOverlap
());
66
67
// create stepping action if detector is active
68
if
(
GetParams
()->
get_int_param
(
"active"
))
69
{
m_SteppingAction
=
new
PHG4MicromegasSteppingAction
(
m_Detector
,
GetParams
()); }
70
return
0;
71
}
72
73
//_______________________________________________________________________
74
int
PHG4MicromegasSubsystem::process_event
(
PHCompositeNode
*topNode)
75
{
76
// pass top node to stepping action so that it gets
77
// relevant nodes needed internally
78
if
(
m_SteppingAction
)
79
{
m_SteppingAction
->
SetInterfacePointers
(topNode); }
80
return
0;
81
}
82
83
//_______________________________________________________________________
84
void
PHG4MicromegasSubsystem::Print
(
const
std::string &what)
const
85
{
86
if
(
m_Detector
)
m_Detector
->
Print
(what);
87
return
;
88
}
89
90
//_______________________________________________________________________
91
PHG4Detector
*
PHG4MicromegasSubsystem::GetDetector
(
void
)
const
92
{
return
m_Detector
; }
93
94
//_______________________________________________________________________
95
PHG4SteppingAction
*
PHG4MicromegasSubsystem::GetSteppingAction
()
const
96
{
return
m_SteppingAction
; }
97
98
//_______________________________________________________________________
99
void
PHG4MicromegasSubsystem::SetDefaultParameters
()
100
{
101
set_default_double_param
(
"mm_length"
, 220);
102
set_default_double_param
(
"mm_radius"
, 82);
103
}
coresoftware
blob
master
simulation
g4simulation
g4micromegas
PHG4MicromegasSubsystem.cc
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:24:44
using
1.8.2 with
ECCE GitHub integration