ECCE @ EIC Software
Reference for
ECCE @ EIC
simulation and reconstruction software on GitHub
Home page
Related Pages
Modules
Namespaces
Classes
Files
External Links
File List
File Members
ECCE @ EIC Software
Deprecated List
Modules
Namespaces
Classes
Files
File List
acts
analysis
coresoftware
blob
master
calibrations
generators
offline
database
framework
packages
CaloBase
CaloReco
centrality
ClusterIso
compressor
Half
HelixHough
intt
jetbackground
KFParticle_sPHENIX
micromegas
mvtx
NodeDump
particleflow
PHField
PHGenFitPkg
PHGeometry
PHTpcTracker
tpc
tpccalib
tpcdaq
trackbase
ActsSurfaceMaps.cc
ActsSurfaceMaps.h
ActsTrackingGeometry.h
CMFlashCluster.h
CMFlashClusterContainer.h
CMFlashClusterContainerLinkDef.h
CMFlashClusterContainerv1.cc
CMFlashClusterContainerv1.h
CMFlashClusterContainerv1LinkDef.h
CMFlashClusterLinkDef.h
CMFlashClusterv1.cc
CMFlashClusterv1.h
CMFlashClusterv1LinkDef.h
TpcSeedTrackMap.cc
TpcSeedTrackMap.h
TpcSeedTrackMapLinkDef.h
TpcSeedTrackMapv1.cc
TpcSeedTrackMapv1.h
TpcSeedTrackMapv1LinkDef.h
TrkrCluster.h
TrkrClusterContainer.cc
TrkrClusterContainer.h
TrkrClusterContainerLinkDef.h
TrkrClusterContainerv1.cc
TrkrClusterContainerv1.h
TrkrClusterContainerv1LinkDef.h
TrkrClusterContainerv2.cc
TrkrClusterContainerv2.h
TrkrClusterContainerv2LinkDef.h
TrkrClusterContainerv3.cc
TrkrClusterContainerv3.h
TrkrClusterContainerv3LinkDef.h
TrkrClusterHitAssoc.cc
TrkrClusterHitAssoc.h
TrkrClusterHitAssocLinkDef.h
TrkrClusterHitAssocv1.cc
TrkrClusterHitAssocv1.h
TrkrClusterHitAssocv1LinkDef.h
TrkrClusterHitAssocv2.cc
TrkrClusterHitAssocv2.h
TrkrClusterHitAssocv2LinkDef.h
TrkrClusterHitAssocv3.cc
TrkrClusterHitAssocv3.h
TrkrClusterHitAssocv3LinkDef.h
TrkrClusterIterationMap.cc
TrkrClusterIterationMap.h
TrkrClusterIterationMapLinkDef.h
TrkrClusterIterationMapv1.cc
TrkrClusterIterationMapv1.h
TrkrClusterIterationMapv1LinkDef.h
TrkrClusterLinkDef.h
TrkrClusterv1.cc
TrkrClusterv1.h
TrkrClusterv1LinkDef.h
TrkrClusterv2.cc
TrkrClusterv2.h
TrkrClusterv2LinkDef.h
TrkrClusterv3.cc
TrkrClusterv3.h
TrkrClusterv3LinkDef.h
TrkrDefs.cc
TrkrDefs.h
TrkrHit.h
TrkrHitLinkDef.h
TrkrHitSet.cc
TrkrHitSet.h
TrkrHitSetContainer.cc
TrkrHitSetContainer.h
TrkrHitSetContainerLinkDef.h
TrkrHitSetContainerv1.cc
TrkrHitSetContainerv1.h
TrkrHitSetContainerv1LinkDef.h
TrkrHitSetLinkDef.h
TrkrHitSetv1.cc
TrkrHitSetv1.h
TrkrHitSetv1LinkDef.h
TrkrHitTruthAssoc.h
TrkrHitTruthAssocLinkDef.h
TrkrHitTruthAssocv1.cc
TrkrHitTruthAssocv1.h
TrkrHitTruthAssocv1LinkDef.h
TrkrHitv1.cc
TrkrHitv1.h
TrkrHitv1LinkDef.h
TrkrHitv2.cc
TrkrHitv2.h
TrkrHitv2LinkDef.h
trackbase_historic
trackreco
trigger
vararray
QA
simulation
Doxygen_Assist
ecce-detectors
fun4all_eicdetectors
geant4
macros
online_distribution
tutorials
doxygen_mainpage.h
File Members
External Links
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
TrkrHitSetv1.cc
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file TrkrHitSetv1.cc
1
7
#include "
TrkrHitSetv1.h
"
8
#include "
TrkrHit.h
"
9
10
#include <cstdlib>
// for exit
11
#include <iostream>
12
#include <type_traits>
// for __decay_and_strip<>::__type
13
14
void
TrkrHitSetv1::Reset
()
15
{
16
m_hitSetKey
= TrkrDefs::HITSETKEYMAX;
17
for
(
const
auto
& pair:
m_hits
)
18
{
delete
pair.second; }
19
20
m_hits.clear();
21
return
;
22
}
23
24
void
TrkrHitSetv1::identify
(std::ostream& os)
const
25
{
26
const
unsigned
int
layer
=
TrkrDefs::getLayer
(
m_hitSetKey
);
27
const
unsigned
int
trkrid =
TrkrDefs::getTrkrId
(
m_hitSetKey
);
28
os
29
<<
"TrkrHitSetv1: "
30
<<
" hitsetkey "
<<
getHitSetKey
()
31
<<
" TrkrId "
<< trkrid
32
<<
" layer "
<< layer
33
<<
" nhits: "
<<
m_hits
.size()
34
<< std::endl;
35
36
for
(
const
auto
& entry :
m_hits
)
37
{
38
std::cout <<
" hitkey "
<< entry.first << std::endl;
39
(entry.second)->
identify
(os);
40
}
41
}
42
43
void
TrkrHitSetv1::removeHit
(
TrkrDefs::hitkey
key)
44
{
45
const
auto
it
=
m_hits
.find(key);
46
if
(
it
!=
m_hits
.end())
47
{
48
delete
it
->second;
49
m_hits
.erase(
it
);
50
}
else
{
51
identify
();
52
std::cout <<
"TrkrHitSetv1::removeHit: deleting a nonexist key: "
<< key <<
" exiting now"
<< std::endl;
53
exit
(1);
54
}
55
}
56
57
TrkrHitSetv1::ConstIterator
58
TrkrHitSetv1::addHitSpecificKey
(
const
TrkrDefs::hitkey
key,
TrkrHit
* hit)
59
{
60
const
auto
ret =
m_hits
.insert(std::make_pair(key, hit));
61
if
( !ret.second )
62
{
63
std::cout <<
"TrkrHitSetv1::AddHitSpecificKey: duplicate key: "
<< key <<
" exiting now"
<< std::endl;
64
exit
(1);
65
}
else
{
66
return
ret.first;
67
}
68
}
69
70
TrkrHit
*
71
TrkrHitSetv1::getHit
(
const
TrkrDefs::hitkey
key)
const
72
{
73
TrkrHitSetv1::ConstIterator
it
=
m_hits
.find(key);
74
75
if
(it !=
m_hits
.end())
return
it->second;
76
else
return
nullptr
;
77
}
78
79
TrkrHitSetv1::ConstRange
80
TrkrHitSetv1::getHits
()
const
81
{
82
return
std::make_pair(
m_hits
.cbegin(),
m_hits
.cend());
83
}
coresoftware
blob
master
offline
packages
trackbase
TrkrHitSetv1.cc
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:24:37
using
1.8.2 with
ECCE GitHub integration