Import Geant4 10.4.0.beta source tree

This commit is contained in:
Gabriele Cosmo
2017-06-30 10:49:55 +02:00
parent 3a5407696b
commit 1a1316fea4
2180 changed files with 237880 additions and 59109 deletions
@@ -58,7 +58,7 @@ template <typename float_type> float_type
float_type upper_bracket,
float_type start, float_type value, int *error,
float_type *final_yprime, float_type *final_yprime2) const
throw(c2_exception)
/* throw(c2_exception) */
{
// find f(x)=value within the brackets, using the guarantees of
// smoothness associated with a c2_function
@@ -197,7 +197,7 @@ polynomial with the given values & derivatives
// minimize copying of data... lots of pointers
template <typename float_type> float_type
c2_function<float_type>::integrate_step(c2_integrate_recur &rb) const
throw(c2_exception)
/* throw(c2_exception) */
{
std::vector< recur_item > &rb_stack=*rb.rb_stack;
// heap-based stack of data for recursion
@@ -383,7 +383,7 @@ return rb_stack.back().step_sum; // last element on the stack holds the sum
template <typename float_type> bool c2_function<float_type>::check_monotonicity(
const std::vector<float_type> &data,
const char message[]) const throw(c2_exception)
const char message[]) const /* throw(c2_exception) */
{
size_t np=data.size();
if(np < 2) return false; // one point has no direction!
@@ -401,7 +401,7 @@ return rev;
template <typename float_type> void
c2_function<float_type>::set_sampling_grid(const std::vector<float_type> &grid)
throw(c2_exception)
/* throw(c2_exception) */
{
bool rev=this->check_monotonicity(grid,
"set_sampling_grid: sampling grid not monotonic");
@@ -538,7 +538,7 @@ template <typename float_type> float_type
c2_function<float_type>::integral(float_type amin, float_type amax,
std::vector<float_type> *partials,
float_type abs_tol, float_type rel_tol, int derivs,
bool adapt, bool extrapolate) const throw(c2_exception)
bool adapt, bool extrapolate) const /* throw(c2_exception) */
{
if(amin==amax) {
if(partials) partials->clear();
@@ -554,7 +554,7 @@ return intg;
template <typename float_type> c2_function<float_type>
&c2_function<float_type>::normalized_function(float_type amin,
float_type amax, float_type norm)
const throw(c2_exception)
const /* throw(c2_exception) */
{
float_type intg=integral(amin, amax);
return *new c2_scaled_function_p<float_type>(*this, norm/intg);
@@ -563,7 +563,7 @@ return *new c2_scaled_function_p<float_type>(*this, norm/intg);
template <typename float_type> c2_function<float_type>
&c2_function<float_type>::square_normalized_function(float_type amin,
float_type amax, float_type norm)
const throw(c2_exception)
const /* throw(c2_exception) */
{
c2_ptr<float_type> mesquared((*new
c2_quadratic_p<float_type>(0., 0., 0., 1.))(*this));
@@ -579,7 +579,7 @@ template <typename float_type> c2_function<float_type>
&c2_function<float_type>::square_normalized_function(
float_type amin, float_type amax, const c2_function<float_type> &weight,
float_type norm)
const throw(c2_exception)
const /* throw(c2_exception) */
{
c2_ptr<float_type> weighted((*new
c2_quadratic_p<float_type>(0., 0., 0., 1.))(*this) * weight);
@@ -596,7 +596,7 @@ c2_function<float_type>::partial_integrals(
std::vector<float_type> xgrid, std::vector<float_type> *partials,
float_type abs_tol, float_type rel_tol, int derivs,
bool adapt, bool extrapolate)
const throw(c2_exception)
const /* throw(c2_exception) */
{
int np=xgrid.size();
@@ -693,7 +693,7 @@ const std::vector<float_type> &x, const std::vector<float_type> &f,
bool lowerSlopeNatural, float_type lowerSlope,
bool upperSlopeNatural, float_type upperSlope,
bool splined
) throw(c2_exception)
) /* throw(c2_exception) */
{
c2_ptr<float_type> keepme(*this);
X= x;
@@ -761,7 +761,7 @@ std::vector<std::pair<float_type, float_type> > &data,
bool lowerSlopeNatural, float_type lowerSlope,
bool upperSlopeNatural, float_type upperSlope,
bool splined
) throw(c2_exception)
) /* throw(c2_exception) */
{
c2_ptr<float_type> keepme(*this);
@@ -791,7 +791,7 @@ template <typename float_type> interpolating_function_p<float_type> &
interpolating_function_p<float_type>::load_random_generator_function(
const std::vector<float_type> &bincenters,
const c2_function<float_type> &binheights)
throw(c2_exception)
/* throw(c2_exception) */
{
c2_ptr<float_type> keepme(*this);
@@ -820,7 +820,7 @@ template <typename float_type> interpolating_function_p<float_type> &
interpolating_function_p<float_type>::load_random_generator_bins(
const std::vector<float_type> &bins,
const std::vector<float_type> &binheights, bool splined)
throw(c2_exception)
/* throw(c2_exception) */
{
c2_ptr<float_type> keepme(*this);
@@ -870,7 +870,7 @@ template <typename float_type> void
interpolating_function_p<float_type>::spline(
bool lowerSlopeNatural, float_type lowerSlope,
bool upperSlopeNatural, float_type upperSlope
) throw(c2_exception)
) /* throw(c2_exception) */
{
// construct spline tables here.
// this code is a re-translation of the pythonlabtools spline
@@ -930,7 +930,7 @@ const c2_function<float_type> &func,
float_type amin, float_type amax, float_type abs_tol, float_type rel_tol,
bool lowerSlopeNatural, float_type lowerSlope,
bool upperSlopeNatural, float_type upperSlope
) throw(c2_exception)
) /* throw(c2_exception) */
{
c2_ptr<float_type> keepme(*this);
@@ -1015,7 +1015,7 @@ this->adaptively_sample(grid.front(), grid.back(), 8*abs_tol,
// first and second derivatives including all coordinate transforms
template <typename float_type> float_type
interpolating_function_p<float_type>::value_with_derivatives(
float_type x, float_type *yprime, float_type *yprime2) const throw(c2_exception)
float_type x, float_type *yprime, float_type *yprime2) const /* throw(c2_exception) */
{
if(sampler_function.valid()) {
// if this is non-null, we are sampling data for later,
@@ -1175,7 +1175,7 @@ return copy;
template <typename float_type> void
interpolating_function_p<float_type>::get_data(std::vector<float_type> &xvals,
std::vector<float_type> &yvals) const throw()
std::vector<float_type> &yvals) const /*throw()*/
{
xvals=Xraw;
@@ -1231,7 +1231,7 @@ this->set_domain(ly, ry);
template <typename float_type> float_type
c2_inverse_function_p<float_type>::value_with_derivatives(
float_type x, float_type *yprime, float_type *yprime2
) const throw(c2_exception)
) const /* throw(c2_exception) */
{
float_type l=this->func->xmin();
float_type r=this->func->xmax();
@@ -1309,7 +1309,7 @@ c2_piecewise_function_p<float_type>::~c2_piecewise_function_p()
template <typename float_type> float_type
c2_piecewise_function_p<float_type>::value_with_derivatives(
float_type x, float_type *yprime, float_type *yprime2
) const throw(c2_exception)
) const /* throw(c2_exception) */
{
size_t np=functions.size();
@@ -1342,7 +1342,7 @@ return functions[klo]->value_with_derivatives(x, yprime, yprime2);
template <typename float_type> void
c2_piecewise_function_p<float_type>::append_function(
const c2_function<float_type> &func) throw(c2_exception)
const c2_function<float_type> &func) /* throw(c2_exception) */
{
c2_const_ptr<float_type> keepfunc(func);
if(functions.size()) { // check whether there are any gaps to fill, etc.
@@ -1452,7 +1452,7 @@ c2_connector_function_p<float_type>::~c2_connector_function_p()
template <typename float_type> float_type
c2_connector_function_p<float_type>::value_with_derivatives(
float_type x, float_type *yprime, float_type *yprime2
) const throw(c2_exception)
) const /* throw(c2_exception) */
{
float_type x0=this->xmin(), x2=this->xmax();
float_type dx=(x-(x0+x2)*0.5)*fhinv;
@@ -1479,7 +1479,7 @@ return y;
// to minimize copying of data... lots of pointers
template <typename float_type> void
c2_function<float_type>::sample_step(c2_sample_recur &rb) const
throw(c2_exception)
/* throw(c2_exception) */
{
std::vector< recur_item > &rb_stack=*rb.rb_stack;
// heap-based stack of data for recursion
@@ -1636,7 +1636,7 @@ c2_function<float_type>::adaptively_sample(
float_type amin, float_type amax,
float_type abs_tol, float_type rel_tol,
int derivs, std::vector<float_type> *xvals,
std::vector<float_type> *yvals) const throw(c2_exception)
std::vector<float_type> *yvals) const /* throw(c2_exception) */
{
c2_fblock<float_type> f0, f2;
c2_sample_recur rb;