forked from acts-project/acts
-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathSeeding.cpp
More file actions
53 lines (45 loc) · 1.85 KB
/
Seeding.cpp
File metadata and controls
53 lines (45 loc) · 1.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
// This file is part of the ACTS project.
//
// Copyright (C) 2016 CERN for the benefit of the ACTS project
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
#include "Acts/Definitions/Algebra.hpp"
#include "Acts/Seeding/EstimateTrackParamsFromSeed.hpp"
#include "Acts/Seeding/SeedConfirmationRangeConfig.hpp"
#include "ActsPython/Utilities/Helpers.hpp"
#include "ActsPython/Utilities/Macros.hpp"
#include <pybind11/pybind11.h>
#include <pybind11/stl.h>
namespace py = pybind11;
using namespace Acts;
namespace ActsPython {
/// Add the track finding related bindings to the module
/// @param m The module to add the bindings to
void addSeeding(py::module_& m) {
{
auto c = py::class_<Acts::SeedConfirmationRangeConfig>(
m, "SeedConfirmationRangeConfig")
.def(py::init<>());
ACTS_PYTHON_STRUCT(c, zMinSeedConf, zMaxSeedConf, rMaxSeedConf,
nTopForLargeR, nTopForSmallR, seedConfMinBottomRadius,
seedConfMaxZOrigin, minImpactSeedConf);
patchKwargsConstructor(c);
}
m.def(
"estimateTrackParamsFromSeed",
[](const Vector3& sp0, double t0, const Vector3& sp1, const Vector3& sp2,
const Vector3& bField)
-> std::pair<FreeVector, std::array<Vector3, 3>> {
Vector3 tangent0 = Vector3::Zero();
Vector3 tangent1 = Vector3::Zero();
Vector3 tangent2 = Vector3::Zero();
const FreeVector params = estimateTrackParamsFromSeed(
sp0, t0, sp1, sp2, bField, &tangent0, &tangent1, &tangent2);
return {params, {tangent0, tangent1, tangent2}};
},
py::arg("sp0"), py::arg("t0"), py::arg("sp1"), py::arg("sp2"),
py::arg("bField"));
}
} // namespace ActsPython