BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
BDSBH4DTypeDefs.hh
1/*
2Beam Delivery Simulation (BDSIM) Copyright (C) Royal Holloway,
3University of London 2001 - 2022.
4
5This file is part of BDSIM.
6
7BDSIM is free software: you can redistribute it and/or modify
8it under the terms of the GNU General Public License as published
9by the Free Software Foundation version 3 of the License.
10
11BDSIM is distributed in the hope that it will be useful, but
12WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU General Public License for more details.
15
16You should have received a copy of the GNU General Public License
17along with BDSIM. If not, see <http://www.gnu.org/licenses/>.
18*/
19#ifndef BDSBH4DTYPEDEFS_H
20#define BDSBH4DTYPEDEFS_H
21
22#ifdef USE_BOOST
23#include <boost/histogram.hpp>
24#include <boost/variant.hpp>
25
26#ifndef __ROOTDOUBLE__
27typedef double boost_histogram_storage_type;
28#else
29typedef double boost_histogram_storage_type;
30#endif
31
32typedef boost::histogram::axis::regular<double, boost::use_default, boost::use_default, boost::use_default> boost_histogram_linear_axis;
33typedef boost::histogram::axis::regular<double, boost::histogram::axis::transform::log, boost::use_default, boost::use_default> boost_histogram_log_axis;
34typedef boost::histogram::axis::variable<double, boost::use_default, boost::use_default, std::allocator<double> > boost_histogram_variable_axis;
35
36typedef boost::variant<boost_histogram_linear_axis*, boost_histogram_log_axis*, boost_histogram_variable_axis*> boost_histogram_axes_variant;
37
38typedef boost::histogram::histogram<std::tuple<boost_histogram_linear_axis, boost_histogram_linear_axis, boost_histogram_linear_axis, boost_histogram_linear_axis >, boost::histogram::storage_adaptor<std::vector<boost_histogram_storage_type, std::allocator<boost_histogram_storage_type> > > > boost_histogram_linear;
39typedef boost::histogram::histogram<std::tuple<boost_histogram_linear_axis, boost_histogram_linear_axis, boost_histogram_linear_axis, boost_histogram_log_axis >, boost::histogram::storage_adaptor<std::vector<boost_histogram_storage_type, std::allocator<boost_histogram_storage_type> > > > boost_histogram_log;
40typedef boost::histogram::histogram<std::tuple<boost_histogram_linear_axis, boost_histogram_linear_axis, boost_histogram_linear_axis, boost_histogram_variable_axis >, boost::histogram::storage_adaptor<std::vector<boost_histogram_storage_type, std::allocator<boost_histogram_storage_type> > > > boost_histogram_variable;
41
42#endif
43
44#endif