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
TrackFindingAlgorithmFunction.cpp
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file TrackFindingAlgorithmFunction.cpp
1
// This file is part of the Acts project.
2
//
3
// Copyright (C) 2021 CERN for the benefit of the Acts project
4
//
5
// This Source Code Form is subject to the terms of the Mozilla Public
6
// License, v. 2.0. If a copy of the MPL was not distributed with this
7
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
8
9
#include "
Acts/Definitions/Direction.hpp
"
10
#include "
Acts/EventData/MultiTrajectory.hpp
"
11
#include "
Acts/EventData/TrackContainer.hpp
"
12
#include "
Acts/EventData/TrackStatePropMask.hpp
"
13
#include "
Acts/EventData/VectorMultiTrajectory.hpp
"
14
#include "
Acts/EventData/VectorTrackContainer.hpp
"
15
#include "
Acts/Propagator/EigenStepper.hpp
"
16
#include "
Acts/Propagator/Navigator.hpp
"
17
#include "
Acts/Propagator/Propagator.hpp
"
18
#include "
Acts/TrackFinding/CombinatorialKalmanFilter.hpp
"
19
#include "
Acts/TrackFitting/GainMatrixSmoother.hpp
"
20
#include "
Acts/TrackFitting/GainMatrixUpdater.hpp
"
21
#include "
Acts/Utilities/Logger.hpp
"
22
#include "
ActsExamples/EventData/Track.hpp
"
23
#include "
ActsExamples/TrackFinding/TrackFindingAlgorithm.hpp
"
24
25
#include <algorithm>
26
#include <map>
27
#include <memory>
28
#include <utility>
29
#include <vector>
30
31
namespace
Acts {
32
class
MagneticFieldProvider;
33
class
TrackingGeometry
;
34
}
// namespace Acts
35
36
namespace
{
37
38
using
Updater =
Acts::GainMatrixUpdater
;
39
using
Smoother =
Acts::GainMatrixSmoother
;
40
41
using
Stepper
=
Acts::EigenStepper<>
;
42
using
Navigator =
Acts::Navigator
;
43
using
Propagator
=
Acts::Propagator<Stepper, Navigator>
;
44
using
CKF =
45
Acts::CombinatorialKalmanFilter<Propagator, Acts::VectorMultiTrajectory>
;
46
47
using
TrackContainer
=
48
Acts::TrackContainer
<
Acts::VectorTrackContainer
,
49
Acts::VectorMultiTrajectory
, std::shared_ptr>;
50
51
struct
TrackFinderFunctionImpl
52
:
public
ActsExamples::TrackFindingAlgorithm::TrackFinderFunction
{
53
CKF trackFinder;
54
55
TrackFinderFunctionImpl(CKF&&
f
) : trackFinder(std::
move
(
f
)) {}
56
57
ActsExamples::TrackFindingAlgorithm::TrackFinderResult
operator()(
58
const
ActsExamples::TrackParameters
& initialParameters,
59
const
ActsExamples::TrackFindingAlgorithm::TrackFinderOptions
&
options
,
60
TrackContainer
&
tracks
)
const override
{
61
return
trackFinder.findTracks(initialParameters, options, tracks);
62
};
63
};
64
65
}
// namespace
66
67
std::shared_ptr<ActsExamples::TrackFindingAlgorithm::TrackFinderFunction>
68
ActsExamples::TrackFindingAlgorithm::makeTrackFinderFunction
(
69
std::shared_ptr<const Acts::TrackingGeometry>
trackingGeometry
,
70
std::shared_ptr<const Acts::MagneticFieldProvider>
magneticField
,
71
const
Acts::Logger
&
logger
) {
72
Stepper
stepper
(
std::move
(magneticField));
73
Navigator::Config
cfg
{
std::move
(trackingGeometry)};
74
cfg
.resolvePassive =
false
;
75
cfg
.resolveMaterial =
true
;
76
cfg
.resolveSensitive =
true
;
77
Navigator
navigator
(
cfg
, logger.
cloneWithSuffix
(
"Navigator"
));
78
Propagator
propagator(
std::move
(stepper),
std::move
(
navigator
),
79
logger.
cloneWithSuffix
(
"Propagator"
));
80
CKF trackFinder(
std::move
(propagator), logger.
cloneWithSuffix
(
"Finder"
));
81
82
// build the track finder functions. owns the track finder object.
83
return
std::make_shared<TrackFinderFunctionImpl>(
std::move
(trackFinder));
84
}
acts
blob
sPHENIX
Examples
Algorithms
TrackFinding
src
TrackFindingAlgorithmFunction.cpp
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:17:37
using
1.8.2 with
sPHENIX GitHub integration