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
TrackPidAssoc.cc
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file TrackPidAssoc.cc
1
8
#include "
TrackPidAssoc.h
"
9
10
#include <ostream>
// for operator<<, endl, basic_ostream, ostream, basic_o...
11
12
TrackPidAssoc::TrackPidAssoc
()
13
: m_map()
14
{
15
}
16
17
18
TrackPidAssoc::~TrackPidAssoc
()
19
{
20
}
21
22
void
23
TrackPidAssoc::Reset
()
24
{
25
m_map
.clear();
26
}
27
28
void
29
TrackPidAssoc::identify
(std::ostream &
os
)
const
30
{
31
os <<
"-----TrackPidAssoc-----"
<< std::endl;
32
os <<
"Number of associations: "
<<
m_map
.size() << std::endl;
33
34
for
(
auto
&
entry
:
m_map
)
35
{
36
// os << " cluster key: 0x" << std::hex << entry.first << std::dec
37
os <<
" particle ID: "
<<
entry
.first << std::dec
38
<<
" track key: "
<<
entry
.second << std::endl;
39
}
40
41
os <<
"------------------------------"
<< std::endl;
42
43
return
;
44
45
}
46
47
void
48
TrackPidAssoc::addAssoc
(
unsigned
int
pid
,
unsigned
int
trid)
49
{
50
m_map
.insert(std::make_pair(pid, trid));
51
}
52
53
TrackPidAssoc::ConstRange
54
TrackPidAssoc::getTracks
(
unsigned
int
pid
)
55
{
56
ConstRange
retpair;
57
retpair.first =
m_map
.lower_bound(pid);
58
retpair.second =
m_map
.upper_bound(pid);
59
return
retpair;
60
}
analysis
blob
master
TrackPid
src
TrackPidAssoc.cc
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:17:58
using
1.8.2 with
sPHENIX GitHub integration