forked from celeritas-project/celeritas
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ImportPhysicsVector.hh
51 lines (45 loc) · 1.7 KB
/
ImportPhysicsVector.hh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
//----------------------------------*-C++-*----------------------------------//
// Copyright 2020-2024 UT-Battelle, LLC, and other Celeritas developers.
// See the top-level COPYRIGHT file for details.
// SPDX-License-Identifier: (Apache-2.0 OR MIT)
//---------------------------------------------------------------------------//
//! \file celeritas/io/ImportPhysicsVector.hh
//---------------------------------------------------------------------------//
#pragma once
#include <vector>
namespace celeritas
{
//---------------------------------------------------------------------------//
/*!
* Geant4 equivalent enum for Physics vector types.
*
* [See Geant4's G4PhysicsVectorType.hh]
*/
enum class ImportPhysicsVectorType
{
unknown,
linear, //!< Uniform and linear in x
log, //!< Uniform and logarithmic in x
free, //!< Nonuniform in x
size_
};
//---------------------------------------------------------------------------//
/*!
* Store imported physics vector data [see Geant4's G4PhysicsVector.hh].
*
* Each vector's x axis is structured according to the vector_type. X is
* usually energy, but (as in the case of "inverse range") can be distance or
* any other arbitrary value.
*/
struct ImportPhysicsVector
{
ImportPhysicsVectorType vector_type;
std::vector<double> x; //!< Geant4 binVector
std::vector<double> y; //!< Geant4 dataVector
};
//---------------------------------------------------------------------------//
// FREE FUNCTIONS
//---------------------------------------------------------------------------//
char const* to_cstring(ImportPhysicsVectorType value);
//---------------------------------------------------------------------------//
} // namespace celeritas