Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Dataset.hpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file Dataset.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 
11 #include <boost/test/data/test_case.hpp>
12 
18 
19 #include <cstdint>
20 
21 namespace Dataset {
22 
23 namespace data = boost::unit_test::data;
24 using namespace Acts::UnitLiterals;
25 
26 // particle identity
27 const auto particlePdg = data::make(std::vector<Acts::PdgParticle>{
32 });
33 
34 // kinematic particle parameters
35 const auto momentumPhi = data::xrange(0_degree, 360_degree, 60_degree);
36 const auto momentumLambda = data::xrange(-45_degree, 45_degree, 15_degree);
37 const auto momentumAbs = data::xrange(500_MeV, 10_GeV, 500_MeV);
38 
39 // seeds for the random number generator
40 const auto rngSeed =
41  data::xrange<uint32_t>((data::begin = 2u, data::step = 3u));
42 
43 // combined parameter set
44 const auto parameters =
46 
48 
49 // utility function to build a particle from the dataset parameters
51  double lambda, double p) {
52  const auto id = ActsFatras::Barcode().setVertexPrimary(1).setParticle(1);
53  return ActsFatras::Particle(id, pdg)
54  .setPosition4(0, 0, 0, 0)
55  .setDirection(std::cos(lambda) * std::cos(phi),
56  std::cos(lambda) * std::sin(phi), std::sin(lambda))
58 }
59 
60 } // namespace Dataset