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.cpp
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file MeasurementCreation.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 "
ActsExamples/Digitization/MeasurementCreation.hpp
"
10
11
#include "
Acts/EventData/Measurement.hpp
"
12
#include "
Acts/EventData/SourceLink.hpp
"
13
#include "
ActsExamples/EventData/IndexSourceLink.hpp
"
14
15
#include <stdexcept>
16
#include <string>
17
#include <utility>
18
19
ActsExamples::Measurement
ActsExamples::createMeasurement
(
20
const
DigitizedParameters
& dParams,
const
IndexSourceLink
& isl) {
21
Acts::SourceLink
sl{isl};
22
switch
(dParams.
indices
.size()) {
23
case
1
u
: {
24
auto
[indices, par,
cov
] = measurementConstituents<1>(dParams);
25
return
Acts::Measurement<Acts::BoundIndices, 1>
(
std::move
(sl), indices,
26
par,
cov
);
27
}
28
case
2
u
: {
29
auto
[indices, par,
cov
] = measurementConstituents<2>(dParams);
30
return
Acts::Measurement<Acts::BoundIndices, 2>
(
std::move
(sl), indices,
31
par,
cov
);
32
};
33
case
3
u
: {
34
auto
[indices, par,
cov
] = measurementConstituents<3>(dParams);
35
return
Acts::Measurement<Acts::BoundIndices, 3>
(
std::move
(sl), indices,
36
par,
cov
);
37
};
38
case
4
u
: {
39
auto
[indices, par,
cov
] = measurementConstituents<4>(dParams);
40
return
Acts::Measurement<Acts::BoundIndices, 4>
(
std::move
(sl), indices,
41
par,
cov
);
42
};
43
}
44
std::string
errorMsg =
"Invalid/mismatching measurement dimension: "
+
45
std::to_string
(dParams.
indices
.size());
46
47
throw
std::runtime_error(errorMsg.c_str());
48
}
acts
blob
sPHENIX
Examples
Algorithms
Digitization
src
MeasurementCreation.cpp
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:17:36
using
1.8.2 with
sPHENIX GitHub integration