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
blob
master
analysis
reconstruction
simulation
g4simulation
g4b0
g4b0ecal
g4barrelmmg
g4beastmagnet
g4bwd
g4drcalo
g4drich
g4eiccalos
g4eicdirc
g4etof
g4jleic
g4lblvtx
AllSi_Al_support_Detector.cc
AllSi_Al_support_Detector.h
AllSi_Al_support_DisplayAction.cc
AllSi_Al_support_DisplayAction.h
AllSi_Al_support_SteppingAction.cc
AllSi_Al_support_SteppingAction.h
AllSi_Al_support_Subsystem.cc
AllSi_Al_support_Subsystem.h
AllSiliconTrackerDetector.cc
AllSiliconTrackerDetector.h
AllSiliconTrackerDisplayAction.cc
AllSiliconTrackerDisplayAction.h
AllSiliconTrackerSteppingAction.cc
AllSiliconTrackerSteppingAction.h
AllSiliconTrackerSubsystem.cc
AllSiliconTrackerSubsystem.h
EicFRichDetector.cc
EicFRichDetector.h
EicFRichSteppingAction.cc
EicFRichSteppingAction.h
EicFRichSubsystem.cc
EicFRichSubsystem.h
G4LBLVtxDetector.cc
G4LBLVtxDetector.h
G4LBLVtxDisplayAction.cc
G4LBLVtxDisplayAction.h
G4LBLVtxSteppingAction.cc
G4LBLVtxSteppingAction.h
G4LBLVtxSubsystem.cc
G4LBLVtxSubsystem.h
PHG4ParticleGenerator_flat_pT.cc
PHG4ParticleGenerator_flat_pT.h
SimpleNtuple.cc
SimpleNtuple.h
TrackFastSimEval.cc
TrackFastSimEval.h
g4lumi
g4mrich
g4rich
g4rp
g4trd
g4ttl
g4zdc
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
AllSi_Al_support_Subsystem.cc
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file AllSi_Al_support_Subsystem.cc
1
//____________________________________________________________________________..
2
//
3
// This is the interface to the framework. You only need to define the parameters
4
// you use for your detector in the SetDefaultParameters() method here
5
// The place to do this is marked by //implement your own here//
6
// The parameters have no units, they need to be converted in the
7
// AllSi_Al_support_Detector::ConstructMe() method
8
// but the convention is as mentioned cm and deg
9
//____________________________________________________________________________..
10
//
11
#include "
AllSi_Al_support_Subsystem.h
"
12
13
#include "
AllSi_Al_support_Detector.h
"
14
#include "
AllSi_Al_support_SteppingAction.h
"
15
16
#include <phparameter/PHParameters.h>
17
18
#include <
g4main/PHG4HitContainer.h
>
19
#include <
g4main/PHG4SteppingAction.h
>
20
21
#include <
phool/PHCompositeNode.h
>
22
#include <
phool/PHIODataNode.h
>
23
#include <
phool/PHNode.h
>
24
#include <
phool/PHNodeIterator.h
>
25
#include <
phool/PHObject.h
>
26
#include <
phool/getClass.h
>
27
28
using namespace
std;
29
30
//_______________________________________________________________________
31
AllSi_Al_support_Subsystem::AllSi_Al_support_Subsystem
(
const
std::string &
name
)
32
:
PHG4DetectorSubsystem
(name)
33
, m_Detector(nullptr)
34
, m_SteppingAction(nullptr)
35
{
36
// call base class method which will set up parameter infrastructure
37
// and call our SetDefaultParameters() method
38
InitializeParameters
();
39
}
40
//_______________________________________________________________________
41
int
AllSi_Al_support_Subsystem::InitRunSubsystem
(
PHCompositeNode
*topNode)
42
{
43
PHNodeIterator
iter(topNode);
44
PHCompositeNode
*dstNode =
dynamic_cast<
PHCompositeNode
*
>
(iter.
findFirst
(
"PHCompositeNode"
,
"DST"
));
45
PHNodeIterator
dstIter(dstNode);
46
if
(
GetParams
()->
get_int_param
(
"active"
))
47
{
48
PHCompositeNode
*DetNode =
dynamic_cast<
PHCompositeNode
*
>
(dstIter.
findFirst
(
"PHCompositeNode"
,
Name
()));
49
if
(!DetNode)
50
{
51
DetNode =
new
PHCompositeNode
(
Name
());
52
dstNode->
addNode
(DetNode);
53
}
54
string
g4hitnodename =
"G4HIT_"
+
Name
();
55
PHG4HitContainer
*g4_hits = findNode::getClass<PHG4HitContainer>(DetNode, g4hitnodename);
56
if
(!g4_hits)
57
{
58
g4_hits =
new
PHG4HitContainer
(g4hitnodename);
59
DetNode->addNode(
new
PHIODataNode<PHObject>
(g4_hits, g4hitnodename,
"PHObject"
));
60
}
61
}
62
// create detector
63
m_Detector
=
new
AllSi_Al_support_Detector
(
this
, topNode,
GetParams
(),
Name
());
64
m_Detector
->
OverlapCheck
(
CheckOverlap
());
65
// create stepping action if detector is active
66
if
(
GetParams
()->
get_int_param
(
"active"
))
67
{
68
m_SteppingAction
=
new
AllSi_Al_support_SteppingAction
(
m_Detector
,
GetParams
());
69
}
70
return
0;
71
}
72
//_______________________________________________________________________
73
int
AllSi_Al_support_Subsystem::process_event
(
PHCompositeNode
*topNode)
74
{
75
// pass top node to stepping action so that it gets
76
// relevant nodes needed internally
77
if
(
m_SteppingAction
)
78
{
79
m_SteppingAction
->
SetInterfacePointers
(topNode);
80
}
81
return
0;
82
}
83
//_______________________________________________________________________
84
void
AllSi_Al_support_Subsystem::Print
(
const
string
&what)
const
85
{
86
if
(
m_Detector
)
87
{
88
m_Detector
->
Print
(what);
89
}
90
return
;
91
}
92
93
//_______________________________________________________________________
94
PHG4Detector
*
AllSi_Al_support_Subsystem::GetDetector
(
void
)
const
95
{
96
return
m_Detector
;
97
}
98
99
//_______________________________________________________________________
100
void
AllSi_Al_support_Subsystem::SetDefaultParameters
()
101
{
102
// sizes are in cm
103
// angles are in deg
104
// units should be converted to G4 units when used
105
//implement your own here//
106
set_default_double_param
(
"place_x"
, 0.);
107
set_default_double_param
(
"place_y"
, 0.);
108
set_default_double_param
(
"place_z"
, 0.);
109
set_default_double_param
(
"rot_x"
, 0.);
110
set_default_double_param
(
"rot_y"
, 0.);
111
set_default_double_param
(
"rot_z"
, 0.);
112
set_default_double_param
(
"size_x"
, 20.);
113
set_default_double_param
(
"size_y"
, 20.);
114
set_default_double_param
(
"size_z"
, 20.);
115
116
set_default_string_param
(
"material"
,
"G4_Cu"
);
117
}
fun4all_eicdetectors
blob
master
simulation
g4simulation
g4lblvtx
AllSi_Al_support_Subsystem.cc
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:24:47
using
1.8.2 with
ECCE GitHub integration