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
MeasurementCreation.hpp
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file MeasurementCreation.hpp
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
#pragma once
10
11
#include "
Acts/Definitions/Algebra.hpp
"
12
#include "
Acts/Definitions/TrackParametrization.hpp
"
13
#include "
ActsExamples/EventData/Cluster.hpp
"
14
#include "
ActsExamples/EventData/IndexSourceLink.hpp
"
15
#include "
ActsExamples/EventData/Measurement.hpp
"
16
17
#include <array>
18
#include <cstddef>
19
#include <tuple>
20
#include <vector>
21
22
namespace
ActsExamples {
23
class
IndexSourceLink;
24
28
struct
DigitizedParameters
{
29
std::vector<Acts::BoundIndices>
indices
= {};
30
std::vector<Acts::ActsScalar>
values
= {};
31
std::vector<Acts::ActsScalar>
variances
= {};
32
33
Cluster
cluster
;
34
};
35
44
Measurement
createMeasurement
(
const
DigitizedParameters
& dParams,
45
const
IndexSourceLink
& isl) noexcept(
false
);
46
54
template
<
size_t
kMeasDIM>
55
std::tuple<std::array<Acts::BoundIndices, kMeasDIM>,
Acts::ActsVector<kMeasDIM>
,
56
Acts::ActsSquareMatrix<kMeasDIM>
>
57
measurementConstituents
(
const
DigitizedParameters
& dParams) {
58
std::array<Acts::BoundIndices, kMeasDIM> indices{};
59
Acts::ActsVector<kMeasDIM>
par;
60
Acts::ActsSquareMatrix<kMeasDIM>
cov
=
61
Acts::ActsSquareMatrix<kMeasDIM>::Identity
();
62
for
(
Eigen::Index
ei
= 0; ei < static_cast<Eigen::Index>(kMeasDIM); ++
ei
) {
63
indices[
ei
] = dParams.
indices
[
ei
];
64
par[
ei
] = dParams.
values
[
ei
];
65
cov
(
ei
,
ei
) = dParams.
variances
[
ei
];
66
}
67
return
{indices, par, cov};
68
}
69
70
}
// namespace ActsExamples
acts
blob
sPHENIX
Examples
Algorithms
Digitization
include
ActsExamples
Digitization
MeasurementCreation.hpp
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:17:36
using
1.8.2 with
sPHENIX GitHub integration