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
PHTrackFitting.cc
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file PHTrackFitting.cc
1
#include "
PHTrackFitting.h
"
2
3
#include <
trackbase_historic/SvtxTrackMap.h
>
4
#include <
globalvertex/SvtxVertexMap.h
>
5
6
#include <
trackbase/TrkrClusterContainer.h
>
7
#include <
trackbase/TrkrHitSet.h
>
8
#include <
trackbase/TrkrHitSetContainer.h
>
9
#include <
trackbase/TrkrDefs.h
>
10
11
#include <
fun4all/Fun4AllReturnCodes.h
>
12
#include <
fun4all/SubsysReco.h
>
// for SubsysReco
13
14
#include <
phool/getClass.h
>
15
#include <
phool/phool.h
>
// for PHWHERE
16
17
#include <iostream>
// for operator<<, basic_ostream
18
19
using namespace
std;
20
21
PHTrackFitting::PHTrackFitting
(
const
std::string
&
name
)
22
:
SubsysReco
(name)
23
, _cluster_map(nullptr)
24
, _hitsets(nullptr)
25
, _vertex_map(nullptr)
26
, _track_map(nullptr)
27
, _track_map_name(
"SvtxTrackMap"
)
28
{
29
}
30
31
int
PHTrackFitting::Init
(
PHCompositeNode
*
/*topNode*/
)
32
{
33
return
Fun4AllReturnCodes::EVENT_OK
;
34
}
35
36
int
PHTrackFitting::InitRun
(
PHCompositeNode
* topNode)
37
{
38
return
Setup
(topNode);
39
}
40
41
int
PHTrackFitting::process_event
(
PHCompositeNode
*
/*topNode*/
)
42
{
43
return
Process
();
44
}
45
46
int
PHTrackFitting::Setup
(
PHCompositeNode
* topNode)
47
{
48
int
ret =
GetNodes
(topNode);
49
if
(ret !=
Fun4AllReturnCodes::EVENT_OK
)
return
ret;
50
51
return
Fun4AllReturnCodes::EVENT_OK
;
52
}
53
54
int
PHTrackFitting::GetNodes
(
PHCompositeNode
* topNode)
55
{
56
//---------------------------------
57
// Get Objects off of the Node Tree
58
//---------------------------------
59
60
//_cluster_map = findNode::getClass<SvtxClusterMap>(topNode, "SvtxClusterMap");
61
_cluster_map
= findNode::getClass<TrkrClusterContainer>(topNode,
"TRKR_CLUSTER"
);
62
if
(!
_cluster_map
)
63
{
64
cout <<
PHWHERE
<<
" ERROR: Can't find node TRKR_CLUSTER"
<< endl;
65
return
Fun4AllReturnCodes::ABORTEVENT
;
66
}
67
_hitsets
= findNode::getClass<TrkrHitSetContainer>(topNode,
"TRKR_HITSET"
);
68
if
(!
_hitsets
)
69
{
70
std::cout <<
PHWHERE
<<
"No hitset container on node tree. Bailing."
71
<< std::endl;
72
return
Fun4AllReturnCodes::ABORTEVENT
;
73
}
74
75
_vertex_map
= findNode::getClass<SvtxVertexMap>(topNode,
"SvtxVertexMap"
);
76
if
(!
_vertex_map
)
77
{
78
cout <<
PHWHERE
<<
" ERROR: Can't find SvtxVertexMap."
<< endl;
79
return
Fun4AllReturnCodes::ABORTEVENT
;
80
}
81
82
_track_map
= findNode::getClass<SvtxTrackMap>(topNode,
_track_map_name
);
83
if
(!
_track_map
)
84
{
85
cout <<
PHWHERE
<<
" ERROR: Can't find SvtxTrackMap."
<< endl;
86
return
Fun4AllReturnCodes::ABORTEVENT
;
87
}
88
89
return
Fun4AllReturnCodes::EVENT_OK
;
90
}
coresoftware
blob
master
offline
packages
trackreco
PHTrackFitting.cc
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:18:11
using
1.8.2 with
sPHENIX GitHub integration