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
TrackContainerCombiner.cc
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file TrackContainerCombiner.cc
1
2
#include "
TrackContainerCombiner.h
"
3
4
#include <
fun4all/Fun4AllReturnCodes.h
>
5
6
#include <
trackbase_historic/SvtxTrackMap.h
>
7
#include <
trackbase_historic/SvtxTrack.h
>
8
#include <
trackbase_historic/TrackSeed.h
>
9
#include <
trackbase_historic/TrackSeedContainer.h
>
10
11
#include <
phool/PHCompositeNode.h
>
12
#include <
phool/PHIODataNode.h
>
13
#include <
phool/PHNode.h
>
// for PHNode
14
#include <
phool/PHNodeIterator.h
>
15
#include <
phool/PHObject.h
>
// for PHObject
16
#include <
phool/getClass.h
>
17
#include <
phool/phool.h
>
18
19
//____________________________________________________________________________..
20
TrackContainerCombiner::TrackContainerCombiner
(
const
std::string
&
name
):
21
SubsysReco
(name)
22
{
23
}
24
25
//____________________________________________________________________________..
26
TrackContainerCombiner::~TrackContainerCombiner
()
27
{
28
29
}
30
31
//____________________________________________________________________________..
32
int
TrackContainerCombiner::InitRun
(
PHCompositeNode
*topNode)
33
{
34
int
ret =
getNodes
(topNode);
35
return
ret;
36
}
37
38
//____________________________________________________________________________..
39
int
TrackContainerCombiner::process_event
(
PHCompositeNode
*)
40
{
41
if
(
m_seedContainer
)
42
{
43
if
(
Verbosity
() > 1)
44
{
45
std::cout <<
"Seed container size to start "
<<
m_newSeedContainer
->
size
()
46
<< std::endl;
47
}
48
mergeSeeds
();
49
if
(
Verbosity
() > 1)
50
{
51
std::cout <<
"Seed container size to finish "
<<
m_newSeedContainer
->
size
()
52
<< std::endl;
53
}
54
}
55
56
return
Fun4AllReturnCodes::EVENT_OK
;
57
}
58
59
void
TrackContainerCombiner::mergeSeeds
()
60
{
61
for
(
const
auto
&
seed
: *
m_oldSeedContainer
)
62
{
63
if
(!
seed
)
64
{
65
continue
;
66
}
67
m_newSeedContainer
->
insert
(
seed
);
68
}
69
}
70
//____________________________________________________________________________..
71
int
TrackContainerCombiner::End
(
PHCompositeNode
*)
72
{
73
return
Fun4AllReturnCodes::EVENT_OK
;
74
}
75
76
int
TrackContainerCombiner::getNodes
(
PHCompositeNode
* topNode)
77
{
78
m_newSeedContainer
= findNode::getClass<TrackSeedContainer>(topNode,
m_newContainerName
);
79
if
(!
m_newSeedContainer
)
80
{
81
std::cout <<
PHWHERE
<<
"No new track seed container, bailing"
<< std::endl;
82
return
Fun4AllReturnCodes::ABORTEVENT
;
83
}
84
m_oldSeedContainer
= findNode::getClass<TrackSeedContainer>(topNode,
m_oldContainerName
);
85
if
(!
m_oldSeedContainer
)
86
{
87
std::cout <<
PHWHERE
<<
"No old track seed container, bailing"
<< std::endl;
88
return
Fun4AllReturnCodes::ABORTEVENT
;
89
}
90
91
return
Fun4AllReturnCodes::EVENT_OK
;
92
}
coresoftware
blob
master
offline
packages
TrackingDiagnostics
TrackContainerCombiner.cc
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:18:09
using
1.8.2 with
sPHENIX GitHub integration