Analysis Software
Documentation for
sPHENIX
simulation software
Home page
Related Pages
Modules
Namespaces
Classes
Files
Examples
External Links
File List
File Members
Analysis Software
Deprecated List
Modules
Namespaces
Classes
Files
File List
acts
acts-fatras
analysis
analysis_tpc_prototype
coresoftware
blob
master
calibrations
generators
offline
database
framework
packages
CaloBase
CaloEmbedding
CaloReco
centrality
ClusterIso
compressor
decayfinder
epd
eventplaneinfo
globalvertex
Half
HFTrackEfficiency
intt
jetbackground
jetbase
KFParticle_sPHENIX
mbd
micromegas
mvtx
NodeDump
particleflow
PHField
PHGenFitPkg
PHGeometry
QAUtils
rawtodst
ResonanceJetTagging
tpc
tpccalib
tpcdaq
TPCHitTrackDisplay
trackbase
trackbase_historic
TrackerMillepedeAlignment
TrackingDiagnostics
trackreco
ActsAlignmentStates.cc
ActsAlignmentStates.h
ActsEvaluator.cc
ActsEvaluator.h
ActsPropagator.cc
ActsPropagator.h
ALICEKF.cc
ALICEKF.h
AssocInfoContainer.cc
AssocInfoContainer.h
AssocInfoContainerLinkDef.h
AssocInfoContainerv1.cc
AssocInfoContainerv1.h
AssocInfoContainerv1LinkDef.h
GPUTPCBaseTrackParam.h
GPUTPCTrackLinearisation.h
GPUTPCTrackParam.cxx
GPUTPCTrackParam.h
MakeActsGeometry.cc
MakeActsGeometry.h
MakeSourceLinks.cc
MakeSourceLinks.h
nanoflann.hpp
PH3DVertexing.cc
PH3DVertexing.h
PHActsGSF.cc
PHActsGSF.h
PHActsInitialVertexFinder.cc
PHActsInitialVertexFinder.h
PHActsKDTreeSeeding.cc
PHActsKDTreeSeeding.h
PHActsSiliconSeeding.cc
PHActsSiliconSeeding.h
PHActsToSvtxTracks.cc
PHActsToSvtxTracks.h
PHActsTrackProjection.cc
PHActsTrackProjection.h
PHActsTrackPropagator.cc
PHActsTrackPropagator.h
PHActsTrkFitter.cc
PHActsTrkFitter.h
PHActsVertexFinder.cc
PHActsVertexFinder.h
PHActsVertexFitter.cc
PHActsVertexFitter.h
PHActsVertexPropagator.cc
PHActsVertexPropagator.h
PHCASeeding.cc
PHCASeeding.h
PHCosmicSeedCombiner.cc
PHCosmicSeedCombiner.h
PHCosmicSeeder.cc
PHCosmicSeeder.h
PHCosmicSiliconPropagator.cc
PHCosmicSiliconPropagator.h
PHCosmicsTrkFitter.cc
PHCosmicsTrkFitter.h
PHCosmicTrackMerger.cc
PHCosmicTrackMerger.h
PHGenFitTrackProjection.cc
PHGenFitTrackProjection.h
PHGenFitTrkFitter.cc
PHGenFitTrkFitter.h
PHGhostRejection.cc
PHGhostRejection.h
PHHybridSeeding.cc
PHHybridSeeding.h
PHInitVertexing.cc
PHInitVertexing.h
PHMicromegasTpcTrackMatching.cc
PHMicromegasTpcTrackMatching.h
PHRaveVertexing.cc
PHRaveVertexing.h
PHSiliconHelicalPropagator.cc
PHSiliconHelicalPropagator.h
PHSiliconSeedMerger.cc
PHSiliconSeedMerger.h
PHSiliconTpcTrackMatching.cc
PHSiliconTpcTrackMatching.h
PHSiliconTruthTrackSeeding.cc
PHSiliconTruthTrackSeeding.h
PHSimpleKFProp.cc
PHSimpleKFProp.h
PHSimpleVertexFinder.cc
PHSimpleVertexFinder.h
PHTpcClusterMover.cc
PHTpcClusterMover.h
PHTpcDeltaZCorrection.cc
PHTpcDeltaZCorrection.h
PHTpcTrackSeedCircleFit.cc
PHTpcTrackSeedCircleFit.h
PHTrackCleaner.cc
PHTrackCleaner.h
PHTrackClusterAssociator.cc
PHTrackClusterAssociator.h
PHTrackFitting.cc
PHTrackFitting.h
PHTrackPropagating.cc
PHTrackPropagating.h
PHTrackSeeding.cc
PHTrackSeeding.h
PHTrackSelector.cc
PHTrackSelector.h
PHTrackSetCopyMerging.cc
PHTrackSetCopyMerging.h
PHTrackSetMerging.cc
PHTrackSetMerging.h
PHTruthClustering.cc
PHTruthClustering.h
PHTruthSiliconAssociation.cc
PHTruthSiliconAssociation.h
PHTruthTrackSeeding.cc
PHTruthTrackSeeding.h
PHTruthVertexing.cc
PHTruthVertexing.h
SecondaryVertexFinder.cc
SecondaryVertexFinder.h
SvtxTrackStateRemoval.cc
SvtxTrackStateRemoval.h
TrackingIterationCounter.cc
TrackingIterationCounter.h
trigger
vararray
QA
simulation
validation
Doxygen_Assist
g4exampledetector
GenFit
JETSCAPE
KFParticle
macros
online_distribution
OnlMon
prototype
pythia6
rcdaq
RDBC
tutorials
doxygen_mainpage.h
File Members
Examples
External Links
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
TrackingIterationCounter.cc
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file TrackingIterationCounter.cc
1
#include "
TrackingIterationCounter.h
"
2
3
#include <
trackbase/TrkrClusterIterationMapv1.h
>
4
#include <
trackbase/TrkrDefs.h
>
5
6
#include <
trackbase_historic/SvtxTrack.h
>
7
#include <
trackbase_historic/SvtxTrackMap.h
>
8
#include <
trackbase_historic/TrackSeed.h
>
9
10
#include <
fun4all/Fun4AllReturnCodes.h
>
11
#include <
phool/PHCompositeNode.h
>
12
#include <
phool/PHDataNode.h
>
13
#include <
phool/PHNode.h
>
14
#include <
phool/PHNodeIterator.h
>
15
#include <
phool/PHObject.h
>
16
#include <
phool/PHTimer.h
>
17
#include <
phool/getClass.h
>
18
#include <
phool/phool.h
>
19
//____________________________________________________________________________..
20
TrackingIterationCounter::TrackingIterationCounter
(
const
std::string
&
name
)
21
:
SubsysReco
(name)
22
{
23
}
24
25
//____________________________________________________________________________..
26
TrackingIterationCounter::~TrackingIterationCounter
()
27
{
28
}
29
30
//____________________________________________________________________________..
31
int
TrackingIterationCounter::Init
(
PHCompositeNode
*)
32
{
33
return
Fun4AllReturnCodes::EVENT_OK
;
34
}
35
36
//____________________________________________________________________________..
37
int
TrackingIterationCounter::InitRun
(
PHCompositeNode
*topNode)
38
{
39
int
val =
getNodes
(topNode);
40
if
(val !=
Fun4AllReturnCodes::EVENT_OK
)
41
{
42
return
Fun4AllReturnCodes::ABORTEVENT
;
43
}
44
45
val =
createNodes
(topNode);
46
return
val;
47
}
48
49
//____________________________________________________________________________..
50
int
TrackingIterationCounter::process_event
(
PHCompositeNode
*)
51
{
52
for
(
const
auto
&[key, track] : *
m_trackMap
)
53
{
54
auto
silseed = track->get_silicon_seed();
55
auto
tpcseed = track->get_tpc_seed();
56
if
(silseed)
57
{
58
addClustersToIterationMap
(silseed);
59
}
60
if
(tpcseed)
61
{
62
addClustersToIterationMap
(tpcseed);
63
}
64
}
65
66
return
Fun4AllReturnCodes::EVENT_OK
;
67
}
68
69
void
TrackingIterationCounter::addClustersToIterationMap
(
TrackSeed
*
seed
)
70
{
71
for
(
auto
clusIter = seed->
begin_cluster_keys
();
72
clusIter != seed->
end_cluster_keys
();
73
++clusIter)
74
{
75
TrkrDefs::cluskey
key = *clusIter;
76
m_iterMap
->
addIteration
(key,
m_iteration
);
77
}
78
}
79
80
//____________________________________________________________________________..
81
int
TrackingIterationCounter::End
(
PHCompositeNode
*)
82
{
83
return
Fun4AllReturnCodes::EVENT_OK
;
84
}
85
int
TrackingIterationCounter::createNodes
(
PHCompositeNode
*topNode)
86
{
87
PHNodeIterator
iter(topNode);
88
89
PHCompositeNode
*dstNode =
dynamic_cast<
PHCompositeNode
*
>
(iter.
findFirst
(
"PHCompositeNode"
,
"DST"
));
90
91
if
(!dstNode)
92
{
93
std::cerr <<
"DST node is missing, quitting"
<< std::endl;
94
throw
std::runtime_error(
"Failed to find DST node in PHActsTrkFitter::createNodes"
);
95
}
96
97
PHNodeIterator
dstIter(topNode);
98
PHCompositeNode
*svtxNode =
dynamic_cast<
PHCompositeNode
*
>
(dstIter.
findFirst
(
"PHCompositeNode"
,
"SVTX"
));
99
100
if
(!svtxNode)
101
{
102
svtxNode =
new
PHCompositeNode
(
"SVTX"
);
103
dstNode->
addNode
(svtxNode);
104
}
105
106
m_iterMap
= findNode::getClass<TrkrClusterIterationMap>(topNode,
"TrkrClusterIterationMap"
);
107
if
(!
m_iterMap
)
108
{
109
m_iterMap
=
new
TrkrClusterIterationMapv1
;
110
auto
node
=
111
new
PHIODataNode<PHObject>
(
m_iterMap
,
"TrkrClusterIterationMap"
,
"PHObject"
);
112
svtxNode->
addNode
(
node
);
113
}
114
115
return
Fun4AllReturnCodes::EVENT_OK
;
116
}
117
int
TrackingIterationCounter::getNodes
(
PHCompositeNode
*topNode)
118
{
119
m_trackMap
= findNode::getClass<SvtxTrackMap>(topNode,
"SvtxTrackMap"
);
120
if
(!
m_trackMap
)
121
{
122
std::cout <<
PHWHERE
<<
"No track map, bailing. "
<< std::endl;
123
return
Fun4AllReturnCodes::ABORTEVENT
;
124
}
125
126
return
Fun4AllReturnCodes::EVENT_OK
;
127
}
coresoftware
blob
master
offline
packages
trackreco
TrackingIterationCounter.cc
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:18:11
using
1.8.2 with
sPHENIX GitHub integration