ECCE @ EIC 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 #include <boost/test/data/test_case.hpp>
10 
11 #include <cstdint>
12 
16 #include "Acts/Utilities/Units.hpp"
18 
19 namespace Dataset {
20 
21 namespace data = boost::unit_test::data;
22 using namespace Acts::UnitLiterals;
23 
24 // particle identity
25 const auto particlePdg = data::make(std::vector<Acts::PdgParticle>{
30 });
31 
32 // kinematic particle parameters
33 const auto momentumPhi = data::xrange(0_degree, 360_degree, 60_degree);
34 const auto momentumLambda = data::xrange(-45_degree, 45_degree, 15_degree);
35 const auto momentumAbs = data::xrange(500_MeV, 10_GeV, 500_MeV);
36 
37 // seeds for the random number generator
38 const auto rngSeed =
39  data::xrange<uint32_t>((data::begin = 2u, data::step = 3u));
40 
41 // combined parameter set
42 const auto parameters =
44 
45 // utility function to build a particle from the dataset parameters
47  double lambda, double p) {
48  const auto id = ActsFatras::Barcode().setVertexPrimary(1).setParticle(1);
49  return ActsFatras::Particle(id, pdg)
50  .setPosition4(0, 0, 0, 0)
51  .setDirection(std::cos(lambda) * std::cos(phi),
52  std::cos(lambda) * std::sin(phi), std::sin(lambda))
53  .setAbsMomentum(p);
54 }
55 
56 } // namespace Dataset