Analysis Software
Documentation for sPHENIX simulation software
 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 
10 
14 
15 #include <stdexcept>
16 #include <string>
17 #include <utility>
18 
20  const DigitizedParameters& dParams, const IndexSourceLink& isl) {
21  Acts::SourceLink sl{isl};
22  switch (dParams.indices.size()) {
23  case 1u: {
24  auto [indices, par, cov] = measurementConstituents<1>(dParams);
26  par, cov);
27  }
28  case 2u: {
29  auto [indices, par, cov] = measurementConstituents<2>(dParams);
31  par, cov);
32  };
33  case 3u: {
34  auto [indices, par, cov] = measurementConstituents<3>(dParams);
36  par, cov);
37  };
38  case 4u: {
39  auto [indices, par, cov] = measurementConstituents<4>(dParams);
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 }