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
PHG4TpcPadPlane.cc
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file PHG4TpcPadPlane.cc
1
#include "
PHG4TpcPadPlane.h
"
2
3
#include <phparameter/PHParameterInterface.h>
// for PHParameterInterface
4
5
#include <
fun4all/Fun4AllReturnCodes.h
>
6
#include <
fun4all/SubsysReco.h
>
// for SubsysReco
7
8
#include <
phool/PHCompositeNode.h
>
9
#include <
phool/PHNode.h
>
// for PHNode
10
#include <
phool/PHNodeIterator.h
>
11
12
#include <string>
13
14
PHG4TpcPadPlane::PHG4TpcPadPlane
(
const
std::string &
name
)
15
:
SubsysReco
(name)
16
,
PHParameterInterface
(name)
17
, detector(
"TPC"
)
18
{
19
}
20
21
int
PHG4TpcPadPlane::InitRun
(
PHCompositeNode
*topNode)
22
{
23
PHNodeIterator
iter(topNode);
24
PHCompositeNode
*runNode =
dynamic_cast<
PHCompositeNode
*
>
(iter.
findFirst
(
"PHCompositeNode"
,
"RUN"
));
25
PHCompositeNode
*parNode =
dynamic_cast<
PHCompositeNode
*
>
(iter.
findFirst
(
"PHCompositeNode"
,
"PAR"
));
26
std::string paramnodename =
"G4TPCPADPLANE"
;
27
std::string geonodename =
"G4TPCPADPLANEPAR"
;
28
UpdateParametersWithMacro
();
29
PHNodeIterator
runIter(runNode);
30
PHCompositeNode
*RunDetNode =
dynamic_cast<
PHCompositeNode
*
>
(runIter.
findFirst
(
"PHCompositeNode"
,
detector
));
31
if
(!RunDetNode)
32
{
33
RunDetNode =
new
PHCompositeNode
(
detector
);
34
runNode->
addNode
(RunDetNode);
35
}
36
SaveToNodeTree
(RunDetNode, paramnodename);
37
38
// save this to the parNode for use
39
PHNodeIterator
parIter(parNode);
40
PHCompositeNode
*ParDetNode =
dynamic_cast<
PHCompositeNode
*
>
(parIter.
findFirst
(
"PHCompositeNode"
,
detector
));
41
if
(!ParDetNode)
42
{
43
ParDetNode =
new
PHCompositeNode
(
detector
);
44
parNode->
addNode
(ParDetNode);
45
}
46
PutOnParNode
(ParDetNode, geonodename);
47
UpdateInternalParameters
();
48
return
Fun4AllReturnCodes::EVENT_OK
;
49
}
coresoftware
blob
master
simulation
g4simulation
g4tpc
PHG4TpcPadPlane.cc
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:24:45
using
1.8.2 with
ECCE GitHub integration