Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:10:45

0001 // This file is part of the ACTS project.
0002 //
0003 // Copyright (C) 2016 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 https://mozilla.org/MPL/2.0/.
0008 
0009 #pragma once
0010 
0011 #include "Acts/Definitions/PdgParticle.hpp"
0012 
0013 #include <iosfwd>
0014 #include <optional>
0015 #include <string_view>
0016 
0017 namespace Acts {
0018 
0019 struct ParticleData {
0020   float charge{};
0021   float mass{};
0022   std::string_view name;
0023 };
0024 
0025 /// Find the charge for a given PDG particle number.
0026 ///
0027 /// @return Charge in native units.
0028 std::optional<float> findCharge(PdgParticle pdg);
0029 
0030 /// Find the mass for a given PDG particle number.
0031 ///
0032 /// @return Mass in native units.
0033 std::optional<float> findMass(PdgParticle pdg);
0034 
0035 /// Find a descriptive particle name for a given PDG particle number.
0036 ///
0037 /// @return Particle name.
0038 std::optional<std::string_view> findName(PdgParticle pdg);
0039 
0040 /// Find all known particle data for a given PDG particle number.
0041 ///
0042 /// @return Particle name.
0043 std::optional<ParticleData> findParticleData(PdgParticle pdg);
0044 
0045 /// Print PDG particle numbers with a descriptive name.
0046 std::ostream& operator<<(std::ostream& os, PdgParticle pdg);
0047 
0048 std::optional<std::string_view> pdgToShortAbsString(PdgParticle pdg);
0049 
0050 }  // namespace Acts