ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
VertexGenerators.hpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file VertexGenerators.hpp
1 // This file is part of the Acts project.
2 //
3 // Copyright (C) 2019 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 
12 
13 #pragma once
14 
15 #include <array>
16 #include <random>
17 
20 
21 namespace FW {
22 
25  Acts::ActsVector<double, 4> fixed = {0.0, 0.0, 0.0, 0.0};
26 
28  return fixed;
29  }
30 };
31 
33  // standard deviation comes first, since it is more likely to be modified
35  std::array<double, 4> stddev = {0.0, 0.0, 0.0, 0.0};
37  std::array<double, 4> mean = {0.0, 0.0, 0.0, 0.0};
38 
40  auto x = std::normal_distribution<double>(mean[0], stddev[0])(rng);
41  auto y = std::normal_distribution<double>(mean[1], stddev[1])(rng);
42  auto z = std::normal_distribution<double>(mean[2], stddev[2])(rng);
43  auto t = std::normal_distribution<double>(mean[3], stddev[3])(rng);
44  return {x, y, z, t};
45  }
46 };
47 
48 } // namespace FW