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
TrkrClusterCrossingAssocv1.cc
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file TrkrClusterCrossingAssocv1.cc
1
8
#include "
TrkrClusterCrossingAssocv1.h
"
9
#include "
TrkrDefs.h
"
10
11
#include <ostream>
// for operator<<, endl, basic_ostream, ostream, basic_o...
12
13
namespace
14
{
15
TrkrClusterCrossingAssocv1::Map
dummy_map;
16
}
17
18
//_________________________________________________________________________
19
void
TrkrClusterCrossingAssocv1::Reset
()
20
{
21
22
23
// delete all entries
24
Map
empty_map;
25
empty_map.swap(
m_map
);
26
empty_map.clear();
27
28
m_map
.clear();
29
}
30
31
//_________________________________________________________________________
32
void
TrkrClusterCrossingAssocv1::identify
(std::ostream &
os
)
const
33
{
34
std::multimap<TrkrDefs::cluskey, TrkrDefs::hitkey>::const_iterator iter;
35
os <<
"-----TrkrClusterCrossingAssocv1-----"
<< std::endl;
36
os <<
"Number of associations: "
<<
size
() << std::endl;
37
for
(
const
auto
& map_pair:
m_map
)
38
{
39
os <<
"clus key "
<< map_pair.first << std::dec
40
<<
" layer "
<< (
unsigned
int)
TrkrDefs::getLayer
(map_pair.first)
41
<<
" crossing number: "
<< map_pair.second << std::endl;
42
}
43
os <<
"------------------------------"
<< std::endl;
44
45
return
;
46
47
}
48
49
//_________________________________________________________________________
50
void
TrkrClusterCrossingAssocv1::addAssoc
(
TrkrDefs::cluskey
ckey,
short
int
hidx)
51
{
52
// insert association
53
m_map
.insert(std::make_pair(ckey, hidx));
54
}
55
56
//_________________________________________________________________________
57
TrkrClusterCrossingAssocv1::ConstRange
TrkrClusterCrossingAssocv1::getCrossings
(
TrkrDefs::cluskey
ckey)
const
58
{
59
const
auto
range =
m_map
.equal_range(ckey);
60
return
range;
61
}
62
63
//_________________________________________________________________________
64
unsigned
int
TrkrClusterCrossingAssocv1::size
(
void
)
const
65
{
66
unsigned
int
size
= 0;
67
size =
m_map
.size();
68
69
return
size
;
70
}
71
72
TrkrClusterCrossingAssocv1::ConstRange
TrkrClusterCrossingAssocv1::getAll
()
const
73
{
74
return
std::make_pair(
m_map
.begin(),
m_map
.end());
75
}
coresoftware
blob
master
offline
packages
trackbase
TrkrClusterCrossingAssocv1.cc
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:18:09
using
1.8.2 with
sPHENIX GitHub integration