Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-06 08:11:40

0001 // This file is part of the Acts project.
0002 //
0003 // Copyright (C) 2020 CERN for the benefit of the Acts project
0004 //
0005 // This Source Code Form is subject to the terms of the Mozilla Public
0006 // License, v. 2.0. If a copy of the MPL was not distributed with this
0007 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
0008 
0009 #pragma once
0010 
0011 #include <boost/test/data/test_case.hpp>
0012 
0013 #include "Acts/Definitions/PdgParticle.hpp"
0014 #include "Acts/Definitions/Units.hpp"
0015 #include "ActsFatras/EventData/Particle.hpp"
0016 
0017 namespace Dataset {
0018 
0019 using namespace Acts::UnitLiterals;
0020 
0021 ActsFatras::Particle makeParticle(Acts::PdgParticle pdg, double z, double eta) {
0022   const auto id = ActsFatras::Barcode().setVertexPrimary(1).setParticle(1);
0023   return ActsFatras::Particle(id, pdg)
0024       .setPosition4(0.0, 0.0, z, 0.0)
0025       .setDirection(1.0 / std::cosh(eta), 0.0, std::tanh(eta))
0026       .setAbsoluteMomentum(1.5_GeV);
0027 }
0028 
0029 const auto centralElectron =
0030     makeParticle(Acts::PdgParticle::eElectron, 0_mm, 0.0);
0031 const auto centralPositron =
0032     makeParticle(Acts::PdgParticle::ePositron, 0_mm, 0.0);
0033 const auto centralMuon = makeParticle(Acts::PdgParticle::eMuon, 0_mm, 0.0);
0034 const auto centralAntiMuon =
0035     makeParticle(Acts::PdgParticle::eAntiMuon, 0_mm, 0.0);
0036 const auto backwardPion =
0037     makeParticle(Acts::PdgParticle::ePionMinus, -100_mm, -4.5);
0038 const auto centralPion = makeParticle(Acts::PdgParticle::ePionMinus, 0_mm, 0.0);
0039 const auto forwardPion =
0040     makeParticle(Acts::PdgParticle::ePionMinus, 100_mm, 4.5);
0041 const auto centralNeutron =
0042     makeParticle(Acts::PdgParticle::eNeutron, 1_mm, 0.1);
0043 
0044 }  // namespace Dataset