EIC Software
Reference for
EIC
simulation and reconstruction software on GitHub
Home page
Related Pages
Modules
Namespaces
Classes
Files
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
PHActsTrkFitter.h
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file PHActsTrkFitter.h
1
8
#ifndef TRACKRECO_ACTSTRKFITTER_H
9
#define TRACKRECO_ACTSTRKFITTER_H
10
11
#include <
fun4all/SubsysReco.h
>
12
13
#include <
trackbase/ActsTrackingGeometry.h
>
14
#include <
trackbase/TrkrDefs.h
>
15
#include <
trackbase/ActsSurfaceMaps.h
>
16
17
#include <
Acts/Utilities/BinnedArray.hpp
>
18
#include <
Acts/Utilities/Definitions.hpp
>
19
#include <
Acts/Utilities/Logger.hpp
>
20
21
#include <
Acts/EventData/MeasurementHelpers.hpp
>
22
#include <
Acts/Geometry/TrackingGeometry.hpp
>
23
#include <
Acts/MagneticField/MagneticFieldContext.hpp
>
24
#include <
Acts/Utilities/CalibrationContext.hpp
>
25
26
#include <
ActsExamples/Fitting/TrkrClusterFittingAlgorithm.hpp
>
27
#include <
ActsExamples/EventData/TrkrClusterMultiTrajectory.hpp
>
28
29
#include <boost/bimap.hpp>
30
31
#include <memory>
32
#include <string>
33
#include <TFile.h>
34
#include <TH1.h>
35
#include <TH2.h>
36
37
namespace
ActsExamples
38
{
39
class
TrkrClusterSourceLink;
40
}
41
42
class
MakeActsGeometry
;
43
class
SvtxTrack
;
44
class
SvtxTrackMap
;
45
class
TrkrClusterContainer
;
46
class
TrkrClusterIterationMapv1
;
47
48
using
SourceLink
=
ActsExamples::TrkrClusterSourceLink
;
49
using
FitResult
=
Acts::KalmanFitterResult<SourceLink>
;
50
using
Trajectory
=
ActsExamples::TrkrClusterMultiTrajectory
;
51
using
Measurement
=
Acts::Measurement
<
ActsExamples::TrkrClusterSourceLink
,
52
Acts::BoundIndices
,
53
Acts::eBoundLoc0
,
54
Acts::eBoundLoc1
>;
55
using
SurfacePtrVec
= std::vector<const Acts::Surface*>;
56
using
SourceLinkVec
= std::vector<SourceLink>;
57
58
class
PHActsTrkFitter
:
public
SubsysReco
59
{
60
public
:
62
PHActsTrkFitter
(
const
std::string&
name
=
"PHActsTrkFitter"
);
63
65
~PHActsTrkFitter
()
override
=
default
;
66
68
int
End
(
PHCompositeNode
*topNode)
override
;
69
71
int
InitRun
(
PHCompositeNode
* topNode)
override
;
72
74
int
process_event
(
PHCompositeNode
*topNode)
override
;
75
76
int
ResetEvent
(
PHCompositeNode
*topNode)
override
;
77
79
void
doTimeAnalysis
(
bool
timeAnalysis){
m_timeAnalysis
= timeAnalysis;}
80
82
void
fitSiliconMMs
(
bool
fitSiliconMMs
)
83
{
m_fitSiliconMMs
=
fitSiliconMMs
;}
84
86
void
setUseMicromegas
(
bool
value
)
87
{
m_useMicromegas
=
value
; }
88
89
void
setUpdateSvtxTrackStates
(
bool
fillSvtxTrackStates)
90
{
m_fillSvtxTrackStates
= fillSvtxTrackStates; }
91
92
void
useActsEvaluator
(
bool
actsEvaluator)
93
{
m_actsEvaluator
= actsEvaluator; }
94
95
void
setFieldMap
(std::string& fieldMap)
96
{
m_fieldMap
= fieldMap; }
97
98
void
setAbsPdgHypothesis
(
unsigned
int
pHypothesis)
99
{
m_pHypothesis
= pHypothesis; }
100
101
void
SetIteration
(
int
iter){
_n_iteration
= iter;}
102
void
set_track_map_name
(
const
std::string &map_name) {
_track_map_name
= map_name; }
103
void
set_seed_track_map_name
(
const
std::string &map_name) {
_seed_track_map_name
= map_name; }
104
105
private
:
106
108
int
getNodes
(
PHCompositeNode
*topNode);
109
111
int
createNodes
(
PHCompositeNode
*topNode);
112
113
void
loopTracks
(
Acts::Logging::Level
logLevel);
114
SourceLinkVec
getSourceLinks
(
SvtxTrack
*track);
115
117
void
updateSvtxTrack
(
Trajectory
traj,
SvtxTrack
* track);
118
121
ActsExamples::TrkrClusterFittingAlgorithm::FitterResult
fitTrack
(
122
const
SourceLinkVec
& sourceLinks,
123
const
ActsExamples::TrackParameters
& seed,
124
const
Acts::KalmanFitterOptions<Acts::VoidOutlierFinder>
&
125
kfOptions,
126
const
SurfacePtrVec
& surfSequence);
127
130
SourceLinkVec
getSurfaceVector
(
const
SourceLinkVec
& sourceLinks,
131
SurfacePtrVec
& surfaces)
const
;
132
void
checkSurfaceVec
(
SurfacePtrVec
& surfaces)
const
;
133
void
getTrackFitResult
(
const
FitResult
& fitOutput,
134
SvtxTrack
* track);
135
136
Surface
getSurface
(
TrkrDefs::cluskey
cluskey
,
TrkrDefs::subsurfkey
surfkey)
const
;
137
Surface
getSiliconSurface
(
TrkrDefs::hitsetkey
hitsetkey
)
const
;
138
Surface
getTpcSurface
(
TrkrDefs::hitsetkey
hitsetkey
,
TrkrDefs::subsurfkey
surfkey)
const
;
139
Surface
getMMSurface
(
TrkrDefs::hitsetkey
hitsetkey
)
const
;
140
141
Acts::BoundSymMatrix
setDefaultCovariance
()
const
;
142
void
printTrackSeed
(
const
SvtxTrack
* seed)
const
;
143
145
int
m_event
= 0;
146
148
ActsTrackingGeometry
*
m_tGeometry
=
nullptr
;
149
151
ActsExamples::TrkrClusterFittingAlgorithm::Config
m_fitCfg
;
152
154
SvtxTrackMap
*
m_trackMap
=
nullptr
;
155
SvtxTrackMap
*
m_directedTrackMap
=
nullptr
;
156
TrkrClusterContainer
*
m_clusterContainer
=
nullptr
;
157
ActsSurfaceMaps
*
m_surfMaps
=
nullptr
;
158
160
int
m_nBadFits
= 0;
161
164
bool
m_fitSiliconMMs
=
false
;
165
167
bool
m_useMicromegas
=
true
;
168
170
bool
m_fillSvtxTrackStates
=
true
;
171
172
bool
m_actsEvaluator
=
false
;
173
std::map<const unsigned int, Trajectory> *
m_trajectories
=
nullptr
;
174
SvtxTrackMap
*
m_seedTracks
=
nullptr
;
175
176
std::string
m_fieldMap
=
""
;
177
TrkrClusterIterationMapv1
*
_iteration_map
=
nullptr
;
178
int
_n_iteration
= 0;
179
std::string
_track_map_name
=
"SvtxTrackMap"
;
180
std::string
_seed_track_map_name
=
"SeedTrackMap"
;
181
183
unsigned
int
m_pHypothesis
= 211;
184
186
bool
m_timeAnalysis
=
false
;
187
TFile *
m_timeFile
=
nullptr
;
188
TH1 *
h_eventTime
=
nullptr
;
189
TH2 *
h_fitTime
=
nullptr
;
190
TH1 *
h_updateTime
=
nullptr
;
191
TH1 *
h_stateTime
=
nullptr
;
192
TH1 *
h_rotTime
=
nullptr
;
193
};
194
195
#endif
fun4all_coresoftware
blob
master
offline
packages
trackreco
PHActsTrkFitter.h
Built by
Jin Huang
. updated:
Mon Jan 22 2024 12:43:46
using
1.8.2 with
EIC GitHub integration