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
TrackJetInput.cc
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file TrackJetInput.cc
1
#include "
TrackJetInput.h
"
2
3
#include "
Jet.h
"
4
#include "
Jetv2.h
"
5
6
#include <
trackbase_historic/SvtxTrack.h
>
7
#include <
trackbase_historic/SvtxTrackMap.h
>
8
9
#include <
phool/getClass.h
>
10
11
// standard includes
12
#include <iostream>
13
#include <map>
// for _Rb_tree_const_iterator
14
#include <utility>
// for pair
15
#include <vector>
16
17
TrackJetInput::TrackJetInput
(
Jet::SRC
input
,
const
std::string
&nodename)
18
: m_NodeName(nodename)
19
, _input(input)
20
{
21
}
22
23
void
TrackJetInput::identify
(std::ostream &
os
)
24
{
25
os <<
" TrackJetInput: SvtxTrackMap to Jet::TRACK"
<< std::endl;
26
}
27
28
std::vector<Jet *>
TrackJetInput::get_input
(
PHCompositeNode
*topNode)
29
{
30
if
(
Verbosity
() > 0) std::cout <<
"TrackJetInput::process_event -- entered"
<< std::endl;
31
32
// Pull the reconstructed track information off the node tree...
33
34
SvtxTrackMap
*trackmap = findNode::getClass<SvtxTrackMap>(topNode,
m_NodeName
);
35
if
(!trackmap)
36
{
37
return
std::vector<Jet *>();
38
}
39
40
std::vector<Jet *> pseudojets;
41
for
(
SvtxTrackMap::ConstIter
iter = trackmap->
begin
();
42
iter != trackmap->
end
();
43
++iter)
44
{
45
const
SvtxTrack
*track = iter->second;
46
47
Jet
*jet =
new
Jetv2
();
48
jet->
set_px
(track->
get_px
());
49
jet->
set_py
(track->
get_py
());
50
jet->
set_pz
(track->
get_pz
());
51
jet->
set_e
(track->
get_p
());
52
jet->
insert_comp
(
Jet::TRACK
, track->
get_id
());
53
pseudojets.push_back(jet);
54
}
55
56
if
(
Verbosity
() > 0) std::cout <<
"TrackJetInput::process_event -- exited"
<< std::endl;
57
58
return
pseudojets;
59
}
coresoftware
blob
master
offline
packages
jetbase
TrackJetInput.cc
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:18:06
using
1.8.2 with
sPHENIX GitHub integration