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
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 "
ActsAlignmentStates.h
"
12
#include "
ActsEvaluator.h
"
13
14
#include <
fun4all/SubsysReco.h
>
15
16
#include <
trackbase/ActsGeometry.h
>
17
#include <
trackbase/ActsSourceLink.h
>
18
#include <
trackbase/ActsTrackFittingAlgorithm.h
>
19
#include <
trackbase/ClusterErrorPara.h
>
20
#include <
trackbase/alignmentTransformationContainer.h
>
21
22
#include <
tpc/TpcClusterZCrossingCorrection.h
>
23
#include <
tpc/TpcDistortionCorrection.h
>
24
25
#include <
Acts/Definitions/Algebra.hpp
>
26
#include <
Acts/EventData/VectorMultiTrajectory.hpp
>
27
#include <
Acts/Utilities/BinnedArray.hpp
>
28
#include <
Acts/Utilities/Logger.hpp
>
29
30
#include <
ActsExamples/EventData/Trajectories.hpp
>
31
32
#include <TFile.h>
33
#include <TH1.h>
34
#include <TH2.h>
35
#include <memory>
36
#include <string>
37
38
#include <
trackbase/alignmentTransformationContainer.h
>
39
40
class
MakeActsGeometry
;
41
class
SvtxTrack
;
42
class
SvtxTrackMap
;
43
class
TrackSeed
;
44
class
TrackSeedContainer
;
45
class
TrkrClusterContainer
;
46
class
TpcDistortionCorrectionContainer
;
47
class
SvtxAlignmentStateMap
;
48
49
using
SourceLink
=
ActsSourceLink
;
50
using
FitResult
=
ActsTrackFittingAlgorithm::TrackFitterResult
;
51
using
Trajectory
=
ActsExamples::Trajectories
;
52
using
Measurement
=
Acts::Measurement<Acts::BoundIndices, 2>
;
53
using
SurfacePtrVec
= std::vector<const Acts::Surface*>;
54
using
SourceLinkVec
= std::vector<Acts::SourceLink>;
55
56
class
PHActsTrkFitter
:
public
SubsysReco
57
{
58
public
:
60
PHActsTrkFitter
(
const
std::string
&
name
=
"PHActsTrkFitter"
);
61
63
~PHActsTrkFitter
()
override
=
default
;
64
66
int
End
(
PHCompositeNode
* topNode)
override
;
67
69
int
InitRun
(
PHCompositeNode
* topNode)
override
;
70
72
int
process_event
(
PHCompositeNode
* topNode)
override
;
73
74
int
ResetEvent
(
PHCompositeNode
* topNode)
override
;
75
77
void
doTimeAnalysis
(
bool
timeAnalysis) {
m_timeAnalysis
= timeAnalysis; }
78
80
void
fitSiliconMMs
(
bool
fitSiliconMMs
)
81
{
82
m_fitSiliconMMs
=
fitSiliconMMs
;
83
}
84
86
void
setUseMicromegas
(
bool
value
)
87
{
88
m_useMicromegas
=
value
;
89
}
90
91
void
setUpdateSvtxTrackStates
(
bool
fillSvtxTrackStates)
92
{
93
m_fillSvtxTrackStates
= fillSvtxTrackStates;
94
}
95
96
void
useActsEvaluator
(
bool
actsEvaluator)
97
{
98
m_actsEvaluator
= actsEvaluator;
99
}
100
101
void
setEvaluatorName
(
const
std::string
&
name
) {
m_evalname
=
name
; }
102
void
setFieldMap
(
const
std::string
&fieldMap)
103
{
104
m_fieldMap
= fieldMap;
105
}
106
107
void
setAbsPdgHypothesis
(
unsigned
int
pHypothesis)
108
{
109
m_pHypothesis
= pHypothesis;
110
}
111
112
void
commissioning
(
bool
com
) {
m_commissioning
=
com
; }
113
114
void
useOutlierFinder
(
bool
outlier) {
m_useOutlierFinder
= outlier; }
115
116
void
SetIteration
(
int
iter) {
_n_iteration
= iter; }
117
void
set_track_map_name
(
const
std::string
& map_name) {
_track_map_name
= map_name; }
118
void
set_seed_track_map_name
(
const
std::string
& map_name) {
_seed_track_map_name
= map_name; }
119
121
void
set_pp_mode
(
bool
ispp) {
m_pp_mode
= ispp; }
122
123
void
ignoreLayer
(
int
layer
) {
m_ignoreLayer
.insert(layer); }
124
125
private
:
127
int
getNodes
(
PHCompositeNode
* topNode);
128
130
int
createNodes
(
PHCompositeNode
* topNode);
131
132
void
loopTracks
(
Acts::Logging::Level
logLevel
);
133
135
void
updateSvtxTrack
(std::vector<Acts::MultiTrajectoryTraits::IndexType>& tips,
136
Trajectory::IndexedParameters
& paramsMap,
137
ActsTrackFittingAlgorithm::TrackContainer
&
tracks
,
138
SvtxTrack
* track);
139
142
ActsTrackFittingAlgorithm::TrackFitterResult
fitTrack
(
143
const
std::vector<Acts::SourceLink>& sourceLinks,
144
const
ActsTrackFittingAlgorithm::TrackParameters
&
seed
,
145
const
ActsTrackFittingAlgorithm::GeneralFitterOptions
&
146
kfOptions,
147
const
SurfacePtrVec
& surfSequence,
148
const
CalibratorAdapter
& calibrator,
149
ActsTrackFittingAlgorithm::TrackContainer
&
tracks
);
150
153
SourceLinkVec
getSurfaceVector
(
const
SourceLinkVec
& sourceLinks,
154
SurfacePtrVec
& surfaces)
const
;
155
void
checkSurfaceVec
(
SurfacePtrVec
& surfaces)
const
;
156
157
bool
getTrackFitResult
(
FitResult
& fitOutput,
TrackSeed
*
seed
,
158
SvtxTrack
* track,
159
ActsTrackFittingAlgorithm::TrackContainer
&
tracks
,
160
const
ActsTrackFittingAlgorithm::MeasurementContainer
& measurements);
161
162
Acts::BoundSquareMatrix
setDefaultCovariance
()
const
;
163
void
printTrackSeed
(
const
ActsTrackFittingAlgorithm::TrackParameters
&
seed
)
const
;
164
166
int
m_event
= 0;
167
169
ActsGeometry
*
m_tGeometry
=
nullptr
;
170
172
ActsTrackFittingAlgorithm::Config
m_fitCfg
;
173
175
alignmentTransformationContainer
*
m_alignmentTransformationMap
=
nullptr
;
// added for testing purposes
176
alignmentTransformationContainer
*
m_alignmentTransformationMapTransient
=
nullptr
;
177
std::set< Acts::GeometryIdentifier>
m_transient_id_set
;
178
Acts::GeometryContext
m_transient_geocontext
;
179
SvtxTrackMap
*
m_trackMap
=
nullptr
;
180
SvtxTrackMap
*
m_directedTrackMap
=
nullptr
;
181
TrkrClusterContainer
*
m_clusterContainer
=
nullptr
;
182
TrackSeedContainer
*
m_seedMap
=
nullptr
;
183
TrackSeedContainer
*
m_tpcSeeds
=
nullptr
;
184
TrackSeedContainer
*
m_siliconSeeds
=
nullptr
;
185
187
int
m_nBadFits
= 0;
188
191
bool
m_fitSiliconMMs
=
false
;
192
194
bool
m_useMicromegas
=
true
;
195
197
bool
m_fillSvtxTrackStates
=
true
;
198
200
bool
m_useOutlierFinder
=
false
;
201
ResidualOutlierFinder
m_outlierFinder
;
202
204
bool
m_pp_mode
=
false
;
205
206
// max variation of bunch crossing away from crossing_estimate
207
short
int
max_bunch_search
= 2;
208
209
bool
m_actsEvaluator
=
false
;
210
std::unique_ptr<ActsEvaluator>
m_evaluator
=
nullptr
;
211
std::string
m_evalname
=
"ActsEvaluator.root"
;
212
213
std::map<const unsigned int, Trajectory>*
m_trajectories
=
nullptr
;
214
SvtxTrackMap
*
m_seedTracks
=
nullptr
;
215
216
TpcClusterZCrossingCorrection
m_clusterCrossingCorrection
;
217
TpcDistortionCorrectionContainer
*
_dcc_static
{
nullptr
};
218
TpcDistortionCorrectionContainer
*
_dcc_average
{
nullptr
};
219
TpcDistortionCorrectionContainer
*
_dcc_fluctuation
{
nullptr
};
220
222
TpcDistortionCorrection
_distortionCorrection
;
223
224
ClusterErrorPara
_ClusErrPara
;
225
226
std::set<int>
m_ignoreLayer
;
227
228
std::string
m_fieldMap
=
""
;
229
230
int
_n_iteration
= 0;
231
std::string
_track_map_name
=
"SvtxTrackMap"
;
232
std::string
_seed_track_map_name
=
"SeedTrackMap"
;
233
235
unsigned
int
m_pHypothesis
= 211;
236
237
SvtxAlignmentStateMap
*
m_alignmentStateMap
=
nullptr
;
238
ActsAlignmentStates
m_alignStates
;
239
bool
m_commissioning
=
false
;
240
242
bool
m_timeAnalysis
=
false
;
243
TFile*
m_timeFile
=
nullptr
;
244
TH1*
h_eventTime
=
nullptr
;
245
TH2*
h_fitTime
=
nullptr
;
246
TH1*
h_updateTime
=
nullptr
;
247
TH1*
h_stateTime
=
nullptr
;
248
TH1*
h_rotTime
=
nullptr
;
249
};
250
251
#endif
coresoftware
blob
master
offline
packages
trackreco
PHActsTrkFitter.h
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:18:10
using
1.8.2 with
sPHENIX GitHub integration