Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DigitizationData.hpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file DigitizationData.hpp
1 // This file is part of the Acts project.
2 //
3 // Copyright (C) 2020 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 
13 
14 #include <unordered_set>
15 #include <utility>
16 
17 namespace ActsFatras {
18 
20 using Cell = std::pair<unsigned int, Acts::ActsScalar>;
21 
26 template <typename signal_t, size_t kSize>
27 struct Channel {
29  std::array<Cell, kSize> cellId;
32  signal_t value = 0;
34  std::unordered_set<unsigned int> links = {};
35 
41  Channel(std::array<Cell, kSize> cellId_, signal_t value_,
42  std::unordered_set<unsigned int> links_ = {})
43  : cellId(cellId_), value(value_), links(std::move(links_)) {}
44 
45  Channel() = delete;
46 };
47 
52 template <typename signal_t, size_t kSize>
53 struct Cluster {
57 
59  ParametersVector parameters = ParametersVector::Zero();
61  CovarianceMatrix covariance = CovarianceMatrix::Zero();
63  std::array<unsigned int, kSize> clusterSize;
65  std::vector<Channel<signal_t, kSize>> channels;
66 
73  template <typename parameters_t, typename covariance_t>
74  Cluster(const Eigen::MatrixBase<parameters_t>& p,
75  const Eigen::MatrixBase<covariance_t>& c,
76  std::array<unsigned int, kSize> cSize,
77  std::vector<Channel<signal_t, kSize>> cChannels)
78  : parameters(p), covariance(c), clusterSize(cSize), channels(cChannels) {}
79 
80  Cluster() = delete;
81 };
82 
83 } // namespace ActsFatras