Jpp
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Typedefs | Functions | Variables
JTOOLS Namespace Reference

Auxiliary classes and methods for multi-dimensional interpolations and histograms. More...

Classes

struct  JAbstractCollection
 Abstract interface for abscissa values of a collection of elements. More...
 
struct  JAbstractHistogram
 Simple data structure for histogram binning. More...
 
struct  JAbstractMultiMap
 Abstract interface for abscissa values of a multidimensional map. More...
 
struct  JAbstractMultiMap< 0, JAbscissa_t >
 Terminator class of recursive class JAbstractMultiMap. More...
 
class  JArray
 One dimensional array of template objects with fixed length. More...
 
class  JArray< 1, T >
 One dimensional array of template objects with fixed length. More...
 
class  JArray< N, const T >
 One dimensional read-only array of template objects with fixed length. More...
 
class  JArray< 1, const T >
 One dimensional read-only array of template objects with fixed length. More...
 
struct  JAssembler
 Auxiliary class to check whether given template is a collection, i.e. has a defined type collection_type. More...
 
struct  JAssembler< T, typename JVoid< typename T::collection_type >::type >
 Template specialisation of class JAssembler for classes with a defined type collection_type. More...
 
class  JAutoMap
 Forward declaration of class JAutoMap for specialisation of class JAutomate. More...
 
struct  JAutomate
 Auxiliary class for automatic element creation. More...
 
struct  JAutomate< JAutoMap< JKey_t, JValue_t > >
 Specialisation of class JAutomate for class JAutoMap. More...
 
class  JCollection
 General purpose class for collection of elements, see: Collection of elements. . More...
 
class  JCombinatorics
 Auxiliary class to convert pair of indices to unique index and back. More...
 
class  JConstantFunction1D
 Template implementation of function object in one dimension returning a constant value. More...
 
struct  JDistance
 Template class for distance evaluation. More...
 
class  JDriver
 Auxiliary class to load and store objects. More...
 
struct  JElement2D
 2D Element. More...
 
struct  JSplineElement2D
 2D Element for spline interpolations. More...
 
struct  JSplineElement2S
 2D Element for spline interpolations. More...
 
struct  JPolintElement2S
 2D Element for polynomial interpolations. More...
 
struct  JBin2D
 2D Binned element. More...
 
struct  JElement3D
 3D Element. More...
 
struct  JGridSplineFunction1D
 Type definition of a spline interpolation based on a JGridCollection. More...
 
struct  JSplineFunction1D_t
 Type definition of a spline interpolation method based on a JCollection with double result type. More...
 
struct  JSplineFunction1H_t
 Type definition of a spline interpolation method based on a JCollection with JResultDerivative result type. More...
 
struct  JSplineFunction1S_t
 Type definition of a spline interpolation method based on a JCollection with JResultPDF result type. More...
 
struct  JGridSplineFunction1D_t
 Type definition of a spline interpolation based on a JGridCollection with result type double. More...
 
struct  JGridSplineFunction1H_t
 Type definition of a spline interpolation based on a JGridCollection with JResultDerivative result type. More...
 
struct  JGridSplineFunction1S_t
 Type definition of a spline interpolation based on a JGridCollection with JResultPDF result type. More...
 
struct  JGridHermiteSplineFunction1D
 Type definition of a spline interpolation based on a JGridCollection. More...
 
struct  JHermiteSplineFunction1D_t
 Type definition of a spline interpolation method based on a JCollection with double result type. More...
 
struct  JHermiteSplineFunction1H_t
 Type definition of a spline interpolation method based on a JCollection with JResultDerivative result type. More...
 
struct  JHermiteSplineFunction1S_t
 Type definition of a spline interpolation method based on a JCollection with JResultPDF result type. More...
 
struct  JGridHermiteSplineFunction1D_t
 Type definition of a spline interpolation based on a JGridCollection with result type double. More...
 
struct  JGridHermiteSplineFunction1H_t
 Type definition of a spline interpolation based on a JGridCollection with JResultDerivative result type. More...
 
struct  JPolint0Function1D
 Type definition of a zero degree polynomial interpolation. More...
 
struct  JPolint1Function1D
 Type definition of a 1st degree polynomial interpolation. More...
 
struct  JPolint2Function1D
 Type definition of a 2nd degree polynomial interpolation. More...
 
struct  JPolint3Function1D
 Type definition of a 3rd degree polynomial interpolation. More...
 
struct  JPolintFunction1D_t
 Polynomial interpolation method with result type double. More...
 
struct  JPolint0Function1D_t
 Type definition of a zero degree polynomial interpolation with result type double. More...
 
struct  JPolint1Function1D_t
 Type definition of a 1st degree polynomial interpolation with result type double. More...
 
struct  JPolint2Function1D_t
 Type definition of a 2nd degree polynomial interpolation with result type double. More...
 
struct  JPolint3Function1D_t
 Type definition of a 3rd degree polynomial interpolation with result type double. More...
 
struct  JPolintFunction1H_t
 Polynomial interpolation method with result type JResultDerivative. More...
 
struct  JPolint1Function1H_t
 Type definition of a 1st degree polynomial interpolation with result type JResultDerivative. More...
 
struct  JPolint2Function1H_t
 Type definition of a 2nd degree polynomial interpolation with result type JResultDerivative. More...
 
struct  JPolint3Function1H_t
 Type definition of a 3rd degree polynomial interpolation with result type JResultDerivative. More...
 
struct  JPolintFunction1S_t
 Polynomial interpolation method with result type JResultPDF. More...
 
struct  JPolint1Function1S_t
 Type definition of a 1st degree polynomial interpolation with result type JResultPDF. More...
 
struct  JPolint2Function1S_t
 Type definition of a 2nd degree polynomial interpolation with result type JResultPDF. More...
 
struct  JPolint3Function1S_t
 Type definition of a 3rd degree polynomial interpolation with result type JResultPDF. More...
 
struct  JGridPolintFunction1D_t
 Polynomial interpolation method based on a JGridCollection with result type double. More...
 
struct  JGridPolint0Function1D_t
 Type definition of a zero degree polynomial interpolation based on a JGridCollection with result type double. More...
 
struct  JGridPolint1Function1D_t
 Type definition of a 1st degree polynomial interpolation based on a JGridCollection with result type double. More...
 
struct  JGridPolint2Function1D_t
 Type definition of a 2nd degree polynomial interpolation based on a JGridCollection with result type double. More...
 
struct  JGridPolint3Function1D_t
 Type definition of a 3rd degree polynomial interpolation based on a JGridCollection with result type double. More...
 
struct  JGridPolintFunction1H_t
 Polynomial interpolation method based on a JGridCollection with result type JResultDerivative. More...
 
struct  JGridPolint1Function1H_t
 Type definition of a 1st degree polynomial interpolation with result type JResultDerivative. More...
 
struct  JGridPolint2Function1H_t
 Type definition of a 2nd degree polynomial interpolation with result type JResultDerivative. More...
 
struct  JGridPolint3Function1H_t
 Type definition of a 3rd degree polynomial interpolation with result type JResultDerivative. More...
 
struct  JGridPolintFunction1S_t
 Polynomial interpolation method with result type JResultPDF. More...
 
struct  JGridPolint1Function1S_t
 Type definition of a 1st degree polynomial interpolation with result type JResulPDF. More...
 
struct  JGridPolint2Function1S_t
 Type definition of a 2nd degree polynomial interpolation with result type JResulPDF. More...
 
struct  JGridPolint3Function1S_t
 Type definition of a 3rd degree polynomial interpolation with result type JResulPDF. More...
 
class  JFunctional
 Template definition of function object interface. More...
 
class  JFunctional< JNullType, JNullType >
 Template specialisation of compilable function object. More...
 
struct  JFunction
 Template definition of function object interface in multidimensions. More...
 
struct  JFunction1D
 Template definition of function object interface in one dimension. More...
 
struct  JCompiler
 Functional object compiler. More...
 
struct  JResultType
 Auxiliary class to evaluate result type. More...
 
struct  JResultType< JClass_t, typename JVoid< typename JClass_t::result_type >::type >
 Auxiliary class to evaluate result type. More...
 
struct  JFunctionalMap
 Auxiliary class to define corresponding one-dimensional function interpolator function_type. More...
 
struct  JFunctionalMap< JSplineFunctionalMap >
 Specialisation of JFunctionalMap for JSplineFunctionalMap. More...
 
struct  JFunctionalMap< JSplineFunctionalGridMap >
 Specialisation of JFunctionalMap for JSplineFunctionalGridMap. More...
 
struct  JFunctionalMap< JPolint0FunctionalMap >
 Specialisation of JFunctionalMap for JPolint0FunctionalMap. More...
 
struct  JFunctionalMap< JPolint1FunctionalMap >
 Specialisation of JFunctionalMap for JPolint1FunctionalMap. More...
 
struct  JFunctionalMap< JPolint2FunctionalMap >
 Specialisation of JFunctionalMap for JPolint2FunctionalMap. More...
 
struct  JFunctionalMap< JPolint3FunctionalMap >
 Specialisation of JFunctionalMap for JPolint3FunctionalMap. More...
 
struct  JFunctionalMap< JPolint0FunctionalGridMap >
 Specialisation of JFunctionalMap for JPolint0FunctionalGridMap. More...
 
struct  JFunctionalMap< JPolint1FunctionalGridMap >
 Specialisation of JFunctionalMap for JPolint1FunctionalGridMap. More...
 
struct  JFunctionalMap< JPolint2FunctionalGridMap >
 Specialisation of JFunctionalMap for JPolint2FunctionalGridMap. More...
 
struct  JFunctionalMap< JPolint3FunctionalGridMap >
 Specialisation of JFunctionalMap for JPolint3FunctionalGridMap. More...
 
struct  JSplineFunctionalMap
 Type definition of a spline interpolation based on a JMap implementation. More...
 
struct  JSplineFunctionalGridMap
 Type definition of a spline interpolation based on a JGridMap implementation. More...
 
struct  JPolint0FunctionalMap
 Type definition of a zero degree polynomial interpolation based on a JMap implementation. More...
 
struct  JPolint1FunctionalMap
 Type definition of a 1st degree polynomial interpolation based on a JMap implementation. More...
 
struct  JPolint2FunctionalMap
 Type definition of a 2nd degree polynomial interpolation based on a JMap implementation. More...
 
struct  JPolint3FunctionalMap
 Type definition of a 3rd degree polynomial interpolation based on a JMap implementation. More...
 
struct  JPolint0FunctionalGridMap
 Type definition of a zero degree polynomial interpolation based on a JGridMap implementation. More...
 
struct  JPolint1FunctionalGridMap
 Type definition of a 1st degree polynomial interpolation based on a JGridMap implementation. More...
 
struct  JPolint2FunctionalGridMap
 Type definition of a 2nd degree polynomial interpolation based on a JGridMap implementation. More...
 
struct  JPolint3FunctionalGridMap
 Type definition of a 3rd degree polynomial interpolation based on a JGridMap implementation. More...
 
struct  JSplineFunctionalMapH
 Type definition of a spline interpolation based on a JMap implementation. More...
 
struct  JSplineFunctionalGridMapH
 Type definition of a spline interpolation based on a JGridMap implementation. More...
 
struct  JPolint0FunctionalMapH
 Type definition of a zero degree polynomial interpolation based on a JMap implementation. More...
 
struct  JPolint1FunctionalMapH
 Type definition of a 1st degree polynomial interpolation based on a JMap implementation. More...
 
struct  JPolint2FunctionalMapH
 Type definition of a 2nd degree polynomial interpolation based on a JMap implementation. More...
 
struct  JPolint3FunctionalMapH
 Type definition of a 3rd degree polynomial interpolation based on a JMap implementation. More...
 
struct  JPolint0FunctionalGridMapH
 Type definition of a zero degree polynomial interpolation based on a JGridMap implementation. More...
 
struct  JPolint1FunctionalGridMapH
 Type definition of a 1st degree polynomial interpolation based on a JGridMap implementation. More...
 
struct  JPolint2FunctionalGridMapH
 Type definition of a 2nd degree polynomial interpolation based on a JGridMap implementation. More...
 
struct  JPolint3FunctionalGridMapH
 Type definition of a 3rd degree polynomial interpolation based on a JGridMap implementation. More...
 
class  JExternalFunction1D
 Template implementation of function object in one dimension using an external function. More...
 
class  JFunctionObject1D
 Template implementation of function object in one dimension. More...
 
class  JGarbageCollection
 Garbage collection. More...
 
struct  JGrid
 Simple data structure for an abstract collection of equidistant abscissa values. More...
 
class  JGridCollection
 General purpose class for collection of equidistant elements. More...
 
class  JGridMap
 Map of equidistant pair-wise elements. More...
 
struct  JMapCollection< JGridMap >
 Specialisation of JMapCollection for JGridMap. More...
 
class  JHashCollection
 General purpose class for hash collection of unique elements. More...
 
struct  JHashEvaluator
 Auxiliary class for default hash key evaluation. More...
 
struct  JHashMapEvaluator
 Auxiliary class for hash evaluation of map keys and elements. More...
 
struct  JHashMap
 General purpose class for hash map of unique keys. More...
 
struct  JHashMapToolkit
 Toolkit for JHashMap. More...
 
class  JHashSet
 General purpose class for hash set of elements. More...
 
class  JHermiteSplineCollection
 Template base class spline interpolations. More...
 
class  JHermiteSplineFunction
 Template definition for functional collection with spline interpolation. More...
 
class  JHermiteSplineFunction< JElement_t, JCollection_t, typename JResultType< typename JElement_t::ordinate_type >::result_type, JDistance_t >
 Template specialisation for functional collection with spline interpolation. More...
 
class  JHermiteSplineFunction< JElement_t, JCollection_t, JResultDerivative< typename JResultType< typename JElement_t::ordinate_type >::result_type >, JDistance_t >
 Template specialisation for spline interpolation method with returning JResultDerivative data structure. More...
 
class  JHermiteSplineFunction< JElement_t, JCollection_t, JResultPDF< typename JResultType< typename JElement_t::ordinate_type >::result_type >, JDistance_t >
 Template specialisation for spline interpolation method with returning JResultPDF data structure. More...
 
class  JHermiteSplineFunction1D
 Template class for spline interpolation in 1D. More...
 
class  JHermiteSplineMap
 Functional map with spline interpolation. More...
 
struct  JHesseMatrix
 Hessian matrix. More...
 
class  JHistogram
 Template definition of histogram object interface. More...
 
struct  JCumulator
 Functional histogram cumulator. More...
 
struct  JRebin
 Auxiliary class for merging of fixed number of consecutive bins. More...
 
struct  JContent
 Auxiliary class for merging of consecutive bins until minimal content is reached. More...
 
class  JHistogram1D
 Histogram in 1D. More...
 
class  JHistogram1D< JBin2D< JAbscissa_t, JContents_t >, JContainer_t, JDistance_t >
 Template specialisation if JHistogram1D class with bin centering. More...
 
class  JHistogramMap
 Histogram map. More...
 
struct  JHistogramMap_t
 Type definition of a JHistogramMap based on JMap implementation. More...
 
struct  JHistogramGridMap_t
 Type definition of a JHistogramMap based on JGridMap implementation. More...
 
class  JList
 Recursive template class. More...
 
class  JList< 1, T, JClass_t >
 Terminator class of recursive template class. More...
 
class  JList< 0, T, JClass_t >
 Template specialisation of obsolete JList<unsigned int, ...> class. More...
 
class  JMap
 Map of pair-wise elements. More...
 
struct  JMapCollection< JMap >
 Specialisation of JMapCollection for JMap. More...
 
struct  JMapCollection
 Template class to define the corresponding JCollection for a given template JMap. More...
 
struct  JMapList
 Map list. More...
 
struct  JMapList< JHead_t, JNullType >
 Terminator class of map list. More...
 
struct  JMapLength
 Length of map list. More...
 
struct  JMapLength< JMapList< JHead_t, JTail_t > >
 Recursive length of map list. More...
 
struct  JMapLength< JMapList< JHead_t, JNullType > >
 Terminator class of length of map list. More...
 
struct  JNullMap
 Auxiliary class for no map definition. More...
 
struct  JMAPLIST
 Auxiliary class for recursive map list generation. More...
 
struct  JMAPLIST< A, JNullMap, JNullMap, JNullMap, JNullMap, JNullMap, JNullMap, JNullMap, JNullMap, JNullMap, JNullMap, JNullMap, JNullMap, JNullMap, JNullMap, JNullMap, JNullMap, JNullMap, JNullMap, JNullMap, JNullMap, JNullMap, JNullMap, JNullMap, JNullMap, JNullMap >
 Template specialisation to terminate recursive map list generation. More...
 
struct  JMappableCollection
 Template interface definition for associative collection of elements. More...
 
struct  JMappable
 Auxiliary class to define JMappableCollection for given template. More...
 
class  JMergeSort
 This class implements a merge and sort algorithm based on the divide-and-conquer concept. More...
 
class  JMultiFunction
 Multidimensional interpolation method. More...
 
class  JMultiFunction< JConstantFunction1D< JArgument_t, JResult_t >, JMapList< JMap_t >, JDistance_t >
 Template specialisation of JMultiFunction for a JConstantFunction. More...
 
class  JMultiFunction< JConstantFunction1D< JArgument_t, JResult_t >, JMaplist_t, JDistance_t >
 Template specialisation of JMultiFunction for a JConstantFunction. More...
 
struct  JMultiGrid
 Simple data structure for an abstract multidimensional map of equidistant elements. More...
 
struct  JMultiGrid< 0, JAbscissa_t >
 Terminator class of recursive class JMultiGrid. More...
 
struct  JHashMap< JTypeList< JHead_t, JTail_t >, JValue_t, JEvaluator_t >
 Multi-dimensional hash map. More...
 
struct  JHashMap< JTypeList< JHead_t, JNullType >, JValue_t, JEvaluator_t >
 Terminator class of recursive class JHashMap. More...
 
class  JMultiHistogram
 Multidimensional histogram. More...
 
class  JMultiKey
 Forward declaration of template JMultiKey class. More...
 
class  JMultiKey< 2, JKey_t >
 Two-dimensional key. More...
 
class  JMultiKey< 1, JKey_t >
 One-dimensional key. More...
 
class  JMultiKey< 0, JKey_t >
 Empty key. More...
 
class  JMultiMap
 Multidimensional map. More...
 
class  JMultiMap< JAbscissa_t, JOrdinate_t, JMapList< JHead_t, JTail_t >, JDistance_t >
 Template specialisation of JMultiMap for map list with at least one map. More...
 
class  JMultiMap< JAbscissa_t, JOrdinate_t, JMapList< JHead_t, JLANG::JNullType >, JDistance_t >
 Terminator class of recursive JMultiMap class. More...
 
class  JMultiMapTransformer
 Interface for weight application and coordinate transformation of function. More...
 
class  JMultiMapPutTransformer
 Auxiliary class to convert JMultiMapTransformer to JCollectionElementTransformer. More...
 
class  JMultiMapGetTransformer
 Auxiliary class to convert JMultiMapTransformer to JCollectionElementTransformer. More...
 
struct  JTransformable
 Abstract interface for transformable multidimensional map. More...
 
class  JMultiPair
 Multidimensional pair. More...
 
class  JMultiPair< 2, JKey_t, JValue_t >
 Two-dimensional pair. More...
 
class  JMultiPair< 1, JKey_t, JValue_t >
 One-dimensional pair. More...
 
class  JMultiPair< 0, JKey_t, JValue_t >
 Empty pair. More...
 
class  JMultiPDF
 General purpose class for multi-dimensional probability density function (PDF). More...
 
struct  JMultipleMap
 List of identical maps. More...
 
struct  JMultipleMap< 1, JMap_t >
 Terminator class of list of identical maps. More...
 
struct  JMultiSet
 Simple data structure for an abstract multidimensional map of equidistant elements. More...
 
struct  JMultiSet< 0, JAbscissa_t >
 Terminator class of recursive class JMultiSet. More...
 
class  JPair
 Template specialisation for a pair of values. More...
 
class  JPair< JKey_t &, JValue_t & >
 Template specialisation for a pair of references. More...
 
class  JPair< const JKey_t &, JValue_t & >
 Template specialisation for a mixed pair of const and non-const references. More...
 
class  JPair< const JKey_t &, const JValue_t & >
 Template specialisation for a pair of const references. More...
 
class  JPolintFunction
 Template definition for functional collection with polynomial interpolation. More...
 
class  JPolintFunction< N, JElement_t, JCollection_t, typename JResultType< typename JElement_t::ordinate_type >::result_type, JDistance_t >
 Template specialisation for functional collection with polynomial interpolation. More...
 
class  JPolintFunction< 0, JElement_t, JCollection_t, typename JResultType< typename JElement_t::ordinate_type >::result_type, JDistance_t >
 Template specialisation for zero-degree polynomial interpolation method. More...
 
class  JPolintFunction< 1, JElement_t, JCollection_t, typename JResultType< typename JElement_t::ordinate_type >::result_type, JDistance_t >
 Template specialisation for first-degree polynomial interpolation method. More...
 
class  JPolintFunction< N, JElement_t, JCollection_t, JResultPDF< typename JResultType< typename JElement_t::ordinate_type >::result_type >, JDistance_t >
 Template specialisation for polynomial interpolation method with returning JResultPDF data structure. More...
 
class  JPolintCollection
 Template definition of base class for polynomial interpolations with polynomial result. More...
 
class  JPolintFunction< N, JElement_t, JCollection_t, JResultPolynome< M, typename JResultType< typename JElement_t::ordinate_type >::result_type >, JDistance_t >
 Template specialisation for polynomial interpolation method with returning JResultPolynome data structure. More...
 
class  JPolintFunction< N, JElement_t, JCollection_t, JResultDerivative< typename JResultType< typename JElement_t::ordinate_type >::result_type >, JDistance_t >
 Template specialisation for polynomial interpolation method with returning JResultDerivative data structure. More...
 
class  JPolintFunction< N, JElement_t, JCollection_t, JResultHesse< typename JResultType< typename JElement_t::ordinate_type >::result_type >, JDistance_t >
 Template specialisation for polynomial interpolation method with returning JResultHesse data structure. More...
 
class  JPolintFunction1D
 Template class for polynomial interpolation in 1D. More...
 
class  JPolintMap
 Functional map with polynomial interpolation. More...
 
class  JQuadrature
 Type definition for numerical integration. More...
 
class  JGaussLegendre
 Numerical integrator for W(x) = 1. More...
 
class  JGaussLaguerre
 Numerical integrator for W(x) = x^a e^(-x). More...
 
class  JGaussHermite
 Numerical integrator for W(x) = e^-(x^2). More...
 
class  JHenyeyGreenstein
 Numerical integrator for W(x) = (1 + g^2 - 2gx)^a. More...
 
class  JRayleigh
 Numerical integrator for W(x) = (1 + g*x*x). More...
 
class  JCotangent
 Numerical integrator for W(x) = |x| / sqrt(1 - x*x) More...
 
class  JBitangent
 Numerical integrator for W(x) = |x| / sqrt(1 - x*x), x > 0 and W(x) = 1, x <= 0. More...
 
struct  JQuantile_t
 Auxiliary data structure for quantiles. More...
 
struct  JQuantile
 Quantile calculator. More...
 
class  JQuantiles
 Quantile calculator for a given function. More...
 
class  JRange
 Range of values. More...
 
struct  JResultDerivative
 Data structure for result including value and first derivative of function. More...
 
struct  JResultHesse
 Data structure for result including value and first derivative of function. More...
 
struct  JResultPDF
 Data structure for result including value, first derivative and integrals of function. More...
 
struct  JResultPolynome
 Data structure for result including value and N derivatives of function. More...
 
struct  JResultEvaluator
 Auxiliary class to recursively evaluate to a result. More...
 
struct  JResultEvaluator< JResultDerivative< T > >
 Template specialisation of JResultEvaluator for JResultDerivative. More...
 
struct  JResultEvaluator< JResultHesse< T > >
 Template specialisation of JResultEvaluator for JResultHesse. More...
 
struct  JResultEvaluator< JResultPDF< T > >
 Template specialisation of JResultEvaluator for JResultPDF. More...
 
struct  JResultEvaluator< JResultPolynome< N, T > >
 Template specialisation of JResultEvaluator for JResultPolynome. More...
 
struct  JResultEvaluator< JResultPolynome< 0, T > >
 Template specialisation of JResultEvaluator for JResultPolynome. More...
 
struct  JResultTransformer
 Auxiliary class to handle multidimensional map transformations for given result type. More...
 
struct  JResultTransformer< JResultHesse< JResult_t > >
 Auxiliary class to handle multidimensional map transformations for given result type. More...
 
struct  JResultTransformer< JResultPDF< JResult_t > >
 Auxiliary class to handle multidimensional map transformations for given result type. More...
 
class  JRouter
 Direct addressing of elements with unique identifiers. More...
 
class  JRouter< JAddress_t, false >
 Template specialisation of JRouter without default address comparison. More...
 
class  JRouter< JAddress_t, true >
 Template specialisation of JRouter with default address comparison. More...
 
class  JAbstractAutoPointer
 Abstract class of an automatic pointer. More...
 
class  JAutoPointer
 Template class for loading and storing of objects. More...
 
class  JAutoElement
 Handler class for automatic pointer. More...
 
class  JSelector
 Template selector class. More...
 
struct  JSet
 Simple data structure for an abstract collection of non-equidistant abscissa values. More...
 
class  JSplineBounds
 Auxiliary class to define first derivates of the spline function at the two extrema. More...
 
class  JSplineCollection
 Template base class for spline interpolations. More...
 
class  JSplineFunction
 Template definition for functional collection with spline interpolation. More...
 
class  JSplineFunction< JElement_t, JCollection_t, typename JResultType< typename JElement_t::ordinate_type >::result_type, JDistance_t >
 Template specialisation for functional collection with spline interpolation. More...
 
class  JSplineFunction< JElement_t, JCollection_t, JResultDerivative< typename JResultType< typename JElement_t::ordinate_type >::result_type >, JDistance_t >
 Template specialisation for spline interpolation method with returning JResultDerivative data structure. More...
 
class  JSplineFunction< JElement_t, JCollection_t, JResultPDF< typename JResultType< typename JElement_t::ordinate_type >::result_type >, JDistance_t >
 Template specialisation for spline interpolation method with returning JResultPDF data structure. More...
 
class  JSplineFunction1D
 Template class for spline interpolation in 1D. More...
 
class  JSplineMap
 Functional map with spline interpolation. More...
 
struct  JTable2D
 2D table with arithmetic capabilities. More...
 
class  JTransformableMultiFunction
 Transformable multidimensional function. More...
 
class  JTransformableMultiHistogram
 Transformable multidimensional histogram. More...
 
struct  JCollectionElementTransformer
 Interface for transformation of collection of elements. More...
 
struct  JTuple
 Template data structure. More...
 
struct  JTuple< JTypeList< JHead_t, JTail_t > >
 Template specialisation of JTuple for multiple data types. More...
 
struct  JTuple< JTypeList< JHead_t, JTypeList< JTail_t, JNullType > > >
 Template specialisation of JTuple for two data types. More...
 
struct  JTuple< JTypeList< JHead_t, JNullType > >
 Terminator class of recursive JTuple class. More...
 
class  JWeight
 Weight calculator. More...
 
struct  JGetElement
 Auxiliary class to convert value to element. More...
 

Typedefs

typedef JRange< double > JAngleRange
 Type definition for angle range. More...
 
typedef JHistogram1D
< JElement2D< double, double >
, JCollection
JHistogram1D_t
 Type definition of a 1 dimensional histogram based on a JCollection. More...
 
typedef JHistogram1D
< JElement2D< double, double >
, JGridCollection
JGridHistogram1D_t
 Type definition of a 1 dimensional histogram based on a JGridCollection. More...
 
typedef JHistogram1D< JBin2D
< double, double >
, JCollection
JHistogram1B_t
 Type definition of a 1 dimensional histogram with bin centering based on a JCollection. More...
 
typedef JHistogram1D< JBin2D
< double, double >
, JGridCollection
JGridHistogram1B_t
 Type definition of a 1 dimensional histogram with bin centering based on a JGridCollection. More...
 
typedef JElement2D< double,
double > 
JElement2D_t
 Type definition of basic element for quadratures. More...
 
typedef JRange< double > JTimeRange
 Type definition for time range. More...
 

Functions

template<class JAbscissa_t >
JAbstractHistogram< JAbscissa_t > make_histogram (const int nx, const JAbscissa_t xmin, const JAbscissa_t xmax)
 Helper method for JAbstractHistogram. More...
 
template<class JElement_t , class JDistance_t >
JElement_t::ordinate_type integrate (const JCollection< JElement_t, JDistance_t > &input, typename JMappable< JElement_t >::map_type &output)
 Conversion of data points to integral values. More...
 
const double getSpeedOfLight ()
 Number of bytes in a gigabyte. More...
 
const double getInverseSpeedOfLight ()
 Get inverse speed of light. More...
 
double getIndexOfRefraction ()
 Get average index of refraction of water. More...
 
double getIndexOfRefractionPhase ()
 Get average index of refraction of water. More...
 
double getTanThetaC ()
 Get average tangent of Cherenkov angle of water. More...
 
double getCosThetaC ()
 Get average cosine of Cherenkov angle of water. More...
 
double getSinThetaC ()
 Get average sine of Cherenkov angle of water. More...
 
double getKappaC ()
 Get average kappa of Cherenkov light in water. More...
 
template<class JAbscissa_t >
JGrid< JAbscissa_t > make_grid (const int nx, const JAbscissa_t Xmin, const JAbscissa_t Xmax)
 Helper method for JGrid. More...
 
template<class JElement_t , template< class, class > class JCollection_t, class JResult_t , class JDistance_t >
JElement_t::ordinate_type integrate (const JHermiteSplineFunction1D< JElement_t, JCollection_t, JResult_t, JDistance_t > &input, typename JMappable< JElement_t >::map_type &output)
 Conversion of data points to integral values. More...
 
template<class JElement_t , template< class, class > class JCollection_t, class JDistance_t >
JElement_t::ordinate_type integrate (const JHermiteSplineFunction1D< JElement_t, JCollection_t, JResultPDF< typename JElement_t::ordinate_type >, JDistance_t > &input, typename JMappable< JElement_t >::map_type &output)
 Conversion of data points to integral values. More...
 
template<class JElement_t , template< class, class > class JContainer_t, class JDistance_t >
void makePDF (const JHistogram1D< JElement_t, JContainer_t, JDistance_t > &input, typename JMappable< JElement_t >::map_type &output)
 Conversion of histogram to probability density function (PDF). More...
 
template<class JAbscissa_t , class JContents_t , template< class, class > class JContainer_t, class JDistance_t >
void makePDF (const JHistogram1D< JBin2D< JAbscissa_t, JContents_t >, JContainer_t, JDistance_t > &input, JMappableCollection< JAbscissa_t, JContents_t > &output)
 Conversion of histogram to probability density function (PDF). More...
 
template<class JElement_t , template< class, class > class JContainer_t, class JDistance_t >
JElement_t::ordinate_type integrate (const JHistogram1D< JElement_t, JContainer_t, JDistance_t > &input, typename JMappable< JElement_t >::map_type &output)
 Conversion of data points to integral values. More...
 
template<class JHistogram_t , class JHistogramMaplist_t , class JHistogramDistance_t , class JFunction_t , class JFunctionMaplist_t , class JFunctionDistance_t >
void makePDF (const JMultiHistogram< JHistogram_t, JHistogramMaplist_t, JHistogramDistance_t > &input, JMultiFunction< JFunction_t, JFunctionMaplist_t, JFunctionDistance_t > &output)
 Conversion of multidimensional histogram to multidimensional function. More...
 
template<unsigned int N, class JAbscissa_t >
JMultiGrid< N, JAbscissa_t > make_multigrid (const JGrid< JAbscissa_t > &bounds)
 Helper method for JMultiGrid. More...
 
template<class JHistogram_t , class JHistogramMaplist_t , class JHistogramDistance_t , class JFunction_t , class JFunctionMaplist_t , class JFunctionDistance_t >
void makePDF (const JMultiHistogram< JHistogram_t, JHistogramMaplist_t, JHistogramDistance_t > &input, JMultiPDF< JFunction_t, JFunctionMaplist_t, JFunctionDistance_t > &output)
 Conversion of multi-dimensional histogram to multi-dimensional PDF. More...
 
template<unsigned int N, class JAbscissa_t >
JMultiSet< N, JAbscissa_t > make_multiset (const JSet< JAbscissa_t > &bounds)
 Helper method for JMultiSet. More...
 
template<class T , class JComparator_t >
bool next_permutation (T __begin, T __last, T __end, JComparator_t compare, std::bidirectional_iterator_tag)
 Implementation of method next_permutation for bidirectional iterators. More...
 
template<class T , class JComparator_t >
bool next_permutation (T __begin, T __last, T __end, JComparator_t compare)
 Permutations of sub-set of data. More...
 
template<unsigned int N, class JElement_t , template< class, class > class JCollection_t, class JDistance_t , unsigned int M>
 if ((p==this->begin()&&this->getDistance(x,(p++) ->getX()) > distance_type::precision)||(p==this->end()&&this->getDistance((--p) ->getX(), x) > distance_type::precision))
 Template base class for polynomial interpolations with polynomial result. More...
 
 for (int i=n/2;i!=0 &&p!=this->end();--i,++p)
 
 for (int i=n;i!=0 &&p!=this->begin();--i,--p)
 
 for (unsigned int k=0;k!=M+1;++k)
 
 for (int m=1;m!=n;++m)
 
virtual void do_compile ()
 Function compilation. More...
 
template<unsigned int N, class JElement_t , template< class, class > class JCollection_t, class JResult_t , class JDistance_t >
JElement_t::ordinate_type integrate (const JPolintFunction1D< N, JElement_t, JCollection_t, JResult_t, JDistance_t > &input, typename JMappable< JElement_t >::map_type &output)
 Conversion of data points to integral values. More...
 
template<unsigned int N, class JElement_t , template< class, class > class JCollection_t, class JResult_t , class JDistance_t >
JElement_t::ordinate_type integrate (const JPolintFunction1D< N, JElement_t, JCollection_t, JResult_t, JDistance_t > &input, typename JMappable< JElement_t >::map_type &output, const JLANG::JBool< false > &option)
 Conversion of data points to integral values. More...
 
template<class JElement_t , template< class, class > class JCollection_t, class JResult_t , class JDistance_t >
JElement_t::ordinate_type integrate (const JPolintFunction1D< 0, JElement_t, JCollection_t, JResult_t, JDistance_t > &input, typename JMappable< JElement_t >::map_type &output, const JLANG::JBool< true > &option)
 Conversion of data points to integral values. More...
 
template<class JElement_t , template< class, class > class JCollection_t, class JResult_t , class JDistance_t >
JElement_t::ordinate_type integrate (const JPolintFunction1D< 1, JElement_t, JCollection_t, JResult_t, JDistance_t > &input, typename JMappable< JElement_t >::map_type &output, const JLANG::JBool< true > &option)
 Conversion of data points to integral values. More...
 
template<class JFunction1D_t >
double search (const double xa, const double xb, const double xc, const JFunction1D_t &f, const int is, const double eps=1.0e-6)
 Locate maximum or minimun of function. More...
 
template<class T , class JComparator_t >
JRange< T, JComparator_t > operator+ (const JRange< T, JComparator_t > &first, const JRange< T, JComparator_t > &second)
 Add ranges. More...
 
template<class T , class JComparator_t >
JRange< T, JComparator_t > operator- (const JRange< T, JComparator_t > &first, const JRange< T, JComparator_t > &second)
 Subtract ranges. More...
 
template<class T , class JComparator_t >
bool overlap (const JRange< T, JComparator_t > &first, const JRange< T, JComparator_t > &second)
 Test overlap between ranges. More...
 
template<class T , class JComparator_t >
JRange< T, JComparator_t > join (const JRange< T, JComparator_t > &first, const JRange< T, JComparator_t > &second)
 Join ranges. More...
 
template<class T , class JComparator_t >
JRange< T, JComparator_t > combine (const JRange< T, JComparator_t > &first, const JRange< T, JComparator_t > &second)
 Combine ranges. More...
 
template<class T >
JRange< Tmake_range (T x, T y)
 Auxiliary method to create range of values. More...
 
template<class JResult_t >
JResultEvaluator< JResult_t >
::result_type 
get_value (const JResult_t &value)
 Helper method to recursively evaluate a to function value. More...
 
template<class JResult_t >
JResultEvaluator< JResult_t >
::result_type 
get_derivative (const JResult_t &value)
 Helper method to convert function value to derivative value. More...
 
template<class JResult_t >
JResultEvaluator< JResult_t >
::result_type 
get_integral (const JResult_t &value)
 Helper method to convert function value to partial integral value. More...
 
template<class T >
JSet< typename
std::iterator_traits< T >
::value_type > 
make_set (T __begin, T __end)
 Helper method for JSet. More...
 
template<class JAbscissa_t >
JSet< JAbscissa_t > make_set (const JAbstractCollection< JAbscissa_t > &input)
 Helper method for JSet. More...
 
template<class JOrdinate_t >
JSplineBounds< JOrdinate_t > make_spline_bounds (const JOrdinate_t fpAtXmin, const JOrdinate_t fpAtXmax)
 Helper method for JSplineBounds. More...
 
template<class JElement_t , template< class, class > class JCollection_t, class JResult_t , class JDistance_t >
JElement_t::ordinate_type integrate (const JSplineFunction1D< JElement_t, JCollection_t, JResult_t, JDistance_t > &input, typename JMappable< JElement_t >::map_type &output)
 Conversion of data points to integral values. More...
 
template<class JElement_t , template< class, class > class JCollection_t, class JDistance_t >
JElement_t::ordinate_type integrate (const JSplineFunction1D< JElement_t, JCollection_t, JResultPDF< typename JElement_t::ordinate_type >, JDistance_t > &input, typename JMappable< JElement_t >::map_type &output)
 Conversion of data points to integral values. More...
 
template<class JContainer_t , class JKey_t , class JValue_t >
JContainer_t::ordinate_type makeCDF (const JContainer_t &input, JMappableCollection< JKey_t, JValue_t > &output, const typename JContainer_t::ordinate_type eps=JMATH::zero)
 Conversion of data points to cumulative probability distribition (CDF). More...
 
template<class JContainer_t >
JContainer_t::ordinate_type getIntegral (const JContainer_t &input)
 Get integral of input data points. More...
 
template<class JFunction_t , template< class, class, class > class JMap_t, class JTail_t >
JFunction_t::ordinate_type getIntegral (const JMultiMap< typename JFunction_t::abscissa_type, JFunction_t, JMapList< JMap_t, JTail_t >, typename JFunction_t::distance_type > &input)
 Auxiliary method to get integral of input data points. More...
 
template<class JFunction_t , template< class, class, class > class JMap_t, class JTail_t >
JFunction_t::ordinate_type getIntegral (const JMultiFunction< JFunction_t, JMapList< JMap_t, JTail_t >, typename JFunction_t::distance_type > &input)
 Get integral of input data points. More...
 
template<class T >
void reset (T &value)
 Reset value. More...
 
template<class JElement_t , class JDistance_t >
void reset (JCollection< JElement_t, JDistance_t > &collection)
 Recursive reset of collection. More...
 
template<class T >
void copy (const T &input, T &output)
 Copy of input to output. More...
 
template<class JElement_t , class JDistance_t , class JKey_t , class JValue_t >
void copy (const JCollection< JElement_t, JDistance_t > &input, JMappableCollection< JKey_t, JValue_t > &output)
 Recursive copy of input collection to output collection. More...
 
template<class T , class JAbscissa_t >
void configure (const T &value, const JAbstractCollection< JAbscissa_t > &bounds, JBool< false > option)
 Configuration of value. More...
 
template<class JElement_t , class JDistance_t >
void configure (JCollection< JElement_t, JDistance_t > &collection, const JAbstractCollection< typename JElement_t::abscissa_type > &bounds, JBool< true > option=JBool< true >())
 Recursive configuration of collection. More...
 
template<class T >
void accumulate (T &value, JBool< false > option)
 Accumulation of value. More...
 
template<class JElement_t , class JDistance_t >
void accumulate (JCollection< JElement_t, JDistance_t > &collection, JBool< true > option=JBool< true >())
 Recursive accumulation of collection. More...
 
template<class JHistogram_t , class JHistogramMaplist_t , class JHistogramDistance_t , class JFunction_t , class JFunctionMaplist_t , class JFunctionDistance_t >
void makePDF (const JTransformableMultiHistogram< JHistogram_t, JHistogramMaplist_t, JHistogramDistance_t > &input, JTransformableMultiFunction< JFunction_t, JFunctionMaplist_t, JFunctionDistance_t > &output)
 Conversion of multidimensional histogram to multidimensional function. More...
 
template<class JObject_t , class JHead_t , class JTail_t , class T >
JObject_t & for_each (JObject_t &object, JType< JTypeList< JHead_t, JTail_t > > typelist, const JTuple< T > &tuple)
 For each data type method. More...
 
template<class JObject_t , class JTypelist_t , class T >
JObject_t & for_each (JObject_t &object, JType< JTypelist_t > type, const JTuple< T > &tuple)
 For each data type method. More...
 
template<class... Args>
JTuple< typename JTYPELIST
< Args...>::typelist > 
make_tuple (const Args &...args)
 Helper method for tuple. More...
 
template<class JObject_t , class T >
JObject_t & for_each (JObject_t &object, JType< JNullType > type, const JTuple< T > &tuple)
 Termination method of for each data type method. More...
 
template<class T >
void inplace_merge (T __begin, const size_t N, const size_t *delimiter)
 Merge multiple sorted ranges. More...
 
template<class T >
bool is_sorted (T __begin, T __end)
 Test whether range is sorted. More...
 

Variables

static const double PI = 3.1415927
 Constants. More...
 
static const double EULER = 0.577215664901533
 Euler number. More...
 
static const double C = 0.299792458
 Speed of light in vacuum [m/ns]. More...
 
static const double C_INVERSE = 1.0/C
 Inverse speed of light in vacuum [ns/m]. More...
 
static const double AVOGADRO = 6.0221415e23
 Avogadro's number [gr^-1]. More...
 
static const double H = 4.13566733e-15
 Planck constant [eV s]. More...
 
static const double HBAR = H/(2*PI)
 Planck constant [eV s]. More...
 
static const double HBARC = HBAR*C*1.0e9
 Planck constant [eV m]. More...
 
static const double ALPHA_ELECTRO_MAGNETIC = 1.0/137.036
 Electro-Magnetic coupling constant. More...
 
static const double THETA_MCS = 13.6e-3
 Multiple Coulomb scattering constant [GeV]. More...
 
static const double DENSITY_SEA_WATER = 1.038
 Fixed environment values. More...
 
static const double DENSITY_ROCK = 2.65
 Density of rock [g/cm^3]. More...
 
static const double SALINITY_SEA_WATER = 0.035
 Salinity of sea water. More...
 
static const double INDEX_OF_REFRACTION_WATER = 1.3800851282
 average index of refraction of water More...
 
static const double X0_WATER_M = 0.36
 Radiation length pure water [m]. More...
 
static const double TAN_THETA_C_WATER = sqrt((INDEX_OF_REFRACTION_WATER - 1.0) * (INDEX_OF_REFRACTION_WATER + 1.0))
 Derived quantities of optical medium. More...
 
static const double COS_THETA_C_WATER = 1.0 / INDEX_OF_REFRACTION_WATER
 
static const double SIN_THETA_C_WATER = TAN_THETA_C_WATER * COS_THETA_C_WATER
 
static const double KAPPA_WATER = 0.96
 
static const double MASS_PHOTON = 0.0
 Particle masses. More...
 
static const double MASS_ELECTRON_NEUTRINO = 0.0
 electron neutrino mass [GeV] More...
 
static const double MASS_MUON_NEUTRINO = 0.0
 muon neutrino mass [GeV] More...
 
static const double MASS_TAU_NEUTRINO = 0.0
 tau neutrino mass [GeV] More...
 
static const double MASS_ELECTRON = 0.510998946e-3
 electron mass [GeV] More...
 
static const double MASS_MUON = 0.1056583745
 muon mass [GeV] More...
 
static const double MASS_TAU = 1.77682
 tau mass [GeV] More...
 
static const double MASS_NEUTRAL_PION = 0.1349766
 pi_0 mass [GeV] More...
 
static const double MASS_CHARGED_PION = 0.13957018
 pi^+/- mass [GeV] More...
 
static const double MASS_NEUTRAL_KAON = 0.497614
 K_0 mass [GeV]. More...
 
static const double MASS_CHARGED_KAON = 0.493677
 K^+/- mass [GeV]. More...
 
static const double MASS_PROTON = 0.9382720813
 proton mass [GeV] More...
 
static const double MASS_NEUTRON = 0.9395654133
 neutron mass [GeV] More...
 
static const double MASS_LAMBDA = 1.115683
 Lambda mass [GeV]. More...
 
static const double MASS_NEUTRAL_SIGMA = 1.192642
 Sigma_0 mass [GeV]. More...
 
static const double MASS_CHARGED_SIGMA = 1.18937
 Sigma^+/- mass [GeV]. More...
 
static const double MASS_NEUTRAL_XI = 1.31486
 Xi_0 mass [GeV]. More...
 
static const double MASS_CHARGED_XI = 1.32171
 Xi^+/- mass [GeV]. More...
 
static const double MASS_CHARGED_OMEGA = 1.67245
 Omega^+/- mass [GeV]. More...
 
static const long long int KILOBYTE = 1024
 Computing quantities. More...
 
static const long long int MEGABYTE = KILOBYTE*KILOBYTE
 Number of bytes in a kilobyte. More...
 
static const long long int GIGABYTE = KILOBYTE*KILOBYTE*KILOBYTE
 Number of bytes in a megabyte. More...
 
static const JCompiler compiler
 Function object for functional object compilation. More...
 
static const JCumulator cumulator
 Function object for functional object compilation. More...
 
 pX
 
const int n = std::min((int) (N + 1), (int) this->size())
 
int j = 0
 
return result
 
double u [N+1]
 
data_type v [N+1][M+1]
 
data_type w [N+1][M+1]
 
data_type r [M+1]
 

Detailed Description

Auxiliary classes and methods for multi-dimensional interpolations and histograms.

Author
mdejong

Typedef Documentation

typedef JRange<double> JTOOLS::JAngleRange

Type definition for angle range.

Definition at line 19 of file JAngleRange.hh.

Type definition of a 1 dimensional histogram based on a JCollection.

Definition at line 22 of file JHistogram1D_t.hh.

Type definition of a 1 dimensional histogram based on a JGridCollection.

Definition at line 28 of file JHistogram1D_t.hh.

Type definition of a 1 dimensional histogram with bin centering based on a JCollection.

Definition at line 34 of file JHistogram1D_t.hh.

Type definition of a 1 dimensional histogram with bin centering based on a JGridCollection.

Definition at line 40 of file JHistogram1D_t.hh.

typedef JElement2D<double, double> JTOOLS::JElement2D_t

Type definition of basic element for quadratures.

Definition at line 25 of file JQuadrature.hh.

typedef JRange<double> JTOOLS::JTimeRange

Type definition for time range.

Definition at line 19 of file JTools/JTimeRange.hh.

Function Documentation

template<class JAbscissa_t >
JAbstractHistogram<JAbscissa_t> JTOOLS::make_histogram ( const int  nx,
const JAbscissa_t  xmin,
const JAbscissa_t  xmax 
)
inline

Helper method for JAbstractHistogram.

Parameters
nxnumber of bins
xminlower limit
xmaxupper limit
Returns
histogram

Definition at line 158 of file JAbstractHistogram.hh.

161  {
162  return JAbstractHistogram<JAbscissa_t>(nx, xmin, xmax);
163  }
Simple data structure for histogram binning.
template<class JElement_t , class JDistance_t >
JElement_t::ordinate_type JTOOLS::integrate ( const JCollection< JElement_t, JDistance_t > &  input,
typename JMappable< JElement_t >::map_type &  output 
)
inline

Conversion of data points to integral values.

The integration is based on the trapezoidal rule applied to the input data points.

Parameters
inputcollection
outputmappable collection
Returns
integral

Definition at line 812 of file JCollection.hh.

813  {
814  typedef typename JElement_t::ordinate_type ordinate_type;
815  typedef typename JCollection<JElement_t, JDistance_t>::const_iterator const_iterator;
816 
817  ordinate_type V(JMATH::zero);
818 
819  if (input.getSize() > 1) {
820 
821  output.put(input.begin()->getX(), V);
822 
823  for (const_iterator j = input.begin(), i = j++; j != input.end(); ++i, ++j) {
824 
825  V += 0.5 * input.getDistance(i->getX(), j->getX()) * (i->getY() + j->getY());
826 
827  output.put(j->getX(), V);
828  }
829  }
830 
831  return V;
832  }
JDistance_t getDistance
Function object for distance evaluation.
Definition: JCollection.hh:773
virtual int getSize() const
Get number of elements.
Definition: JCollection.hh:196
static const JZero zero
Function object to assign zero value.
Definition: JZero.hh:105
virtual abscissa_type getX(int index) const
Get abscissa value.
Definition: JCollection.hh:208
container_type::const_iterator const_iterator
Definition: JCollection.hh:90
int j
Definition: JPolint.hh:634
const double JTOOLS::getSpeedOfLight ( )
inline

Number of bytes in a gigabyte.

Get speed of light.

return speed of light [m/ns]

Definition at line 89 of file JConstants.hh.

90  {
91  return C;
92  }
static const double C
Speed of light in vacuum [m/ns].
Definition: JConstants.hh:22
const double JTOOLS::getInverseSpeedOfLight ( )
inline

Get inverse speed of light.

return inverse speed of light [ns/m]

Definition at line 100 of file JConstants.hh.

101  {
102  return C_INVERSE;
103  }
static const double C_INVERSE
Inverse speed of light in vacuum [ns/m].
Definition: JConstants.hh:23
double JTOOLS::getIndexOfRefraction ( )
inline

Get average index of refraction of water.

Returns
index of refraction

Definition at line 111 of file JConstants.hh.

112  {
114  }
static const double INDEX_OF_REFRACTION_WATER
average index of refraction of water
Definition: JConstants.hh:37
double JTOOLS::getIndexOfRefractionPhase ( )
inline

Get average index of refraction of water.

Returns
index of refraction

Definition at line 122 of file JConstants.hh.

123  {
124  return 1.35;
125  }
double JTOOLS::getTanThetaC ( )
inline

Get average tangent of Cherenkov angle of water.

Returns
tan(theta_C)

Definition at line 133 of file JConstants.hh.

134  {
135  return TAN_THETA_C_WATER;
136  }
static const double TAN_THETA_C_WATER
Derived quantities of optical medium.
Definition: JConstants.hh:43
double JTOOLS::getCosThetaC ( )
inline

Get average cosine of Cherenkov angle of water.

Returns
cos(theta_C)

Definition at line 144 of file JConstants.hh.

145  {
146  return COS_THETA_C_WATER;
147  }
static const double COS_THETA_C_WATER
Definition: JConstants.hh:44
double JTOOLS::getSinThetaC ( )
inline

Get average sine of Cherenkov angle of water.

Returns
sin(theta_C)

Definition at line 155 of file JConstants.hh.

156  {
157  return SIN_THETA_C_WATER;
158  }
static const double SIN_THETA_C_WATER
Definition: JConstants.hh:45
double JTOOLS::getKappaC ( )
inline

Get average kappa of Cherenkov light in water.

Returns
kappa

Definition at line 166 of file JConstants.hh.

167  {
168  return KAPPA_WATER;
169  }
static const double KAPPA_WATER
Definition: JConstants.hh:46
template<class JAbscissa_t >
JGrid<JAbscissa_t> JTOOLS::make_grid ( const int  nx,
const JAbscissa_t  Xmin,
const JAbscissa_t  Xmax 
)
inline

Helper method for JGrid.

Parameters
nxnumber of elements
Xminlower limit
Xmaxupper limit
Returns
grid

Definition at line 177 of file JGrid.hh.

180  {
181  return JGrid<JAbscissa_t>(nx, Xmin, Xmax);
182  }
Simple data structure for an abstract collection of equidistant abscissa values.
Definition: JGrid.hh:32
template<class JElement_t , template< class, class > class JCollection_t, class JResult_t , class JDistance_t >
JElement_t::ordinate_type JTOOLS::integrate ( const JHermiteSplineFunction1D< JElement_t, JCollection_t, JResult_t, JDistance_t > &  input,
typename JMappable< JElement_t >::map_type &  output 
)
inline

Conversion of data points to integral values.

The integration includes the use of 2nd derivatives of the data points of the input spline interpolating function.

Parameters
inputcollection
outputmappable collection
Returns
integral

Definition at line 642 of file JHermiteSpline.hh.

644  {
645  typedef typename JElement_t::ordinate_type ordinate_type;
647 
648  ordinate_type V(JMATH::zero);
649 
650  if (input.getSize() > 1) {
651 
652  output.put(input.begin()->getX(), V);
653 
654  for (const_iterator j = input.begin(), i = j++; j != input.end(); ++i, ++j) {
655 
656  const double dx = input.getDistance(i->getX(), j->getX());
657  const ordinate_type y = i->getY() + j->getY();
658  const ordinate_type z = i->getU() - j->getU();
659 
660  const ordinate_type v = dx * 0.50 * y;
661  const ordinate_type w = dx * 1.00 * z*dx/12.0;
662 
663  V += v + w;
664 
665  output.put(j->getX(), V);
666  }
667  }
668 
669  return V;
670  }
data_type w[N+1][M+1]
Definition: JPolint.hh:708
static const JZero zero
Function object to assign zero value.
Definition: JZero.hh:105
collection_type::const_iterator const_iterator
int j
Definition: JPolint.hh:634
data_type v[N+1][M+1]
Definition: JPolint.hh:707
template<class JElement_t , template< class, class > class JCollection_t, class JDistance_t >
JElement_t::ordinate_type JTOOLS::integrate ( const JHermiteSplineFunction1D< JElement_t, JCollection_t, JResultPDF< typename JElement_t::ordinate_type >, JDistance_t > &  input,
typename JMappable< JElement_t >::map_type &  output 
)
inline

Conversion of data points to integral values.

The integration directly uses the integral values of the input spline interpolating function.

Parameters
inputcollection
outputmappable collection
Returns
integral

Definition at line 686 of file JHermiteSpline.hh.

688  {
689  typedef typename JElement_t::ordinate_type ordinate_type;
690  typedef JResultPDF<ordinate_type> result_type;
692 
693  if (input.getSize() > 1) {
694 
695  for (const_iterator i = input.begin(); i != input.end(); ++i) {
696  output.put(i->getX(), i->getIntegral());
697  }
698 
699  return input.rbegin()->getIntegral();
700  }
701 
702  return JMATH::zero;
703  }
static const JZero zero
Function object to assign zero value.
Definition: JZero.hh:105
collection_type::const_iterator const_iterator
Data structure for result including value, first derivative and integrals of function.
Definition: JResult.hh:335
template<class JElement_t , template< class, class > class JContainer_t, class JDistance_t >
void JTOOLS::makePDF ( const JHistogram1D< JElement_t, JContainer_t, JDistance_t > &  input,
typename JMappable< JElement_t >::map_type &  output 
)
inline

Conversion of histogram to probability density function (PDF).

The PDF abscissa and contents are set to the bin center and contents divided the bin width, respectively.

Parameters
inputhistogram
outputmappable collection

Definition at line 545 of file JHistogram1D.hh.

547  {
548  typedef typename JElement_t::abscissa_type abscissa_type;
549  typedef typename JElement_t::ordinate_type ordinate_type;
551 
552  if (input.getSize() > 1) {
553 
554  for (const_iterator j = input.begin(), i = j++; j != input.end(); ++i, ++j) {
555 
556  const abscissa_type x = 0.5 * (i->getX() + j->getX());
557  const ordinate_type y = i->getY();
558  const double w = input.getDistance(i->getX(), j->getX());
559 
560  output.put(x, y/w);
561  }
562  }
563  }
data_type w[N+1][M+1]
Definition: JPolint.hh:708
collection_type::const_iterator const_iterator
int j
Definition: JPolint.hh:634
template<class JAbscissa_t , class JContents_t , template< class, class > class JContainer_t, class JDistance_t >
void JTOOLS::makePDF ( const JHistogram1D< JBin2D< JAbscissa_t, JContents_t >, JContainer_t, JDistance_t > &  input,
JMappableCollection< JAbscissa_t, JContents_t > &  output 
)
inline

Conversion of histogram to probability density function (PDF).

The PDF abscissa and contents are set to the bin center and contents divided the bin width, respectively.

Parameters
inputhistogram
outputmappable collection

Definition at line 578 of file JHistogram1D.hh.

580  {
581  typedef JAbscissa_t abscissa_type;
582  typedef JContents_t contents_type;
583  typedef typename JHistogram1D<JBin2D<JAbscissa_t, JContents_t>, JContainer_t, JDistance_t>::const_iterator const_iterator;
584 
585  if (input.getSize() > 1) {
586 
587  for (const_iterator j = input.begin(), i = j++; j != input.end(); ++i, ++j) {
588 
589  const abscissa_type x = i->getBinCenter();
590  const contents_type y = i->getY();
591  const double w = input.getDistance(i->getX(), j->getX());
592 
593  output.put(x, y/w);
594  }
595  }
596  }
data_type w[N+1][M+1]
Definition: JPolint.hh:708
void put(typename JClass< key_type >::argument_type key, typename JClass< mapped_type >::argument_type value)
Put pair-wise element (key,value) into collection.
Histogram in 1D.
int j
Definition: JPolint.hh:634
template<class JElement_t , template< class, class > class JContainer_t, class JDistance_t >
JElement_t::ordinate_type JTOOLS::integrate ( const JHistogram1D< JElement_t, JContainer_t, JDistance_t > &  input,
typename JMappable< JElement_t >::map_type &  output 
)
inline

Conversion of data points to integral values.

The integration is based on the sum of bin contents of the input data points.

Parameters
inputhistogram
outputmappable collection
Returns
integral

Definition at line 612 of file JHistogram1D.hh.

614  {
615  typedef typename JElement_t::ordinate_type ordinate_type;
617 
618  ordinate_type V(JMATH::zero);
619 
620  if (input.getSize() > 1) {
621 
622  output.put(input.begin()->getX(), V);
623 
624  for (const_iterator j = input.begin(), i = j++; j != input.end(); ++i, ++j) {
625 
626  V += i->getY();
627 
628  output.put(j->getX(), V);
629  }
630  }
631 
632  return V;
633  }
static const JZero zero
Function object to assign zero value.
Definition: JZero.hh:105
collection_type::const_iterator const_iterator
int j
Definition: JPolint.hh:634
template<class JHistogram_t , class JHistogramMaplist_t , class JHistogramDistance_t , class JFunction_t , class JFunctionMaplist_t , class JFunctionDistance_t >
void JTOOLS::makePDF ( const JMultiHistogram< JHistogram_t, JHistogramMaplist_t, JHistogramDistance_t > &  input,
JMultiFunction< JFunction_t, JFunctionMaplist_t, JFunctionDistance_t > &  output 
)
inline

Conversion of multidimensional histogram to multidimensional function.

Parameters
inputmultidimensional histogram
outputmultidimensional function

Definition at line 347 of file JMultiFunction.hh.

349  {
350  output.insert(input);
351  }
void insert(const JMultiFunction< JPDF_t, JPDFMaplist_t, JPDFDistance_t > &input)
Insert multidimensional input.
template<unsigned int N, class JAbscissa_t >
JMultiGrid<N, JAbscissa_t> JTOOLS::make_multigrid ( const JGrid< JAbscissa_t > &  bounds)
inline

Helper method for JMultiGrid.

Parameters
boundsbounds
Returns
multidimensional grid

Definition at line 150 of file JMultiGrid.hh.

151  {
152  return JMultiGrid<N, JAbscissa_t>(bounds);
153  }
Simple data structure for an abstract multidimensional map of equidistant elements.
Definition: JMultiGrid.hh:24
template<class JHistogram_t , class JHistogramMaplist_t , class JHistogramDistance_t , class JFunction_t , class JFunctionMaplist_t , class JFunctionDistance_t >
void JTOOLS::makePDF ( const JMultiHistogram< JHistogram_t, JHistogramMaplist_t, JHistogramDistance_t > &  input,
JMultiPDF< JFunction_t, JFunctionMaplist_t, JFunctionDistance_t > &  output 
)
inline

Conversion of multi-dimensional histogram to multi-dimensional PDF.

Parameters
inputmulti-dimensional histogram
outputmulti-dimensional PDF

Definition at line 185 of file JMultiPDF.hh.

187  {
188  output.insert(input);
189  }
void insert(const JMultiHistogram< JHistogram_t, JHistogramMaplist_t, JHistogramDistance_t > &input)
Insert multi-dimensional input.
Definition: JMultiPDF.hh:97
template<unsigned int N, class JAbscissa_t >
JMultiSet<N, JAbscissa_t> JTOOLS::make_multiset ( const JSet< JAbscissa_t > &  bounds)
inline

Helper method for JMultiSet.

Parameters
boundsbounds
Returns
multidimensional set

Definition at line 151 of file JMultiSet.hh.

152  {
153  return JMultiSet<N, JAbscissa_t>(bounds);
154  }
Simple data structure for an abstract multidimensional map of equidistant elements.
Definition: JMultiSet.hh:24
template<class T , class JComparator_t >
bool JTOOLS::next_permutation ( T  __begin,
T  __last,
T  __end,
JComparator_t  compare,
std::bidirectional_iterator_tag   
)
inline

Implementation of method next_permutation for bidirectional iterators.

Definition at line 20 of file JPermutation.hh.

25  {
26  using namespace std;
27 
28  T __rend = __begin;
29  --__rend;
30 
31  for (T __i = __last; --__i != __rend; ) {
32 
33  T __j;
34 
35  for (__j = __last; __j != __end && !compare(*__i,*__j); ++__j) {}
36 
37  if (__j != __end) {
38 
39  iter_swap(__i,__j);
40 
41  if (++__i != __last && ++__j != __end) {
42 
43  reverse(__i,__last);
44  reverse(__j,__end);
45 
46  T __k = __end;
47 
48  while (__k != __j && __i != __last)
49  iter_swap(__i++,--__k);
50 
51  reverse(__i,__last);
52  reverse(__j,__k);
53  }
54 
55  return true;
56  }
57  }
58 
59  reverse(__begin, __last);
60  reverse(__last, __end);
61  reverse(__begin, __end);
62 
63  return false;
64  }
do set_variable OUTPUT_DIRECTORY $WORKDIR T
template<class T , class JComparator_t >
bool JTOOLS::next_permutation ( T  __begin,
T  __last,
T  __end,
JComparator_t  compare 
)
inline

Permutations of sub-set of data.

The first template argument refers to a bidirectional iterator and the second template argument to the comparator.

Parameters
__beginbegin of input data
__lastend of output data
__endend of input data
comparecomparison operator
Returns
true if another permutation exists; else false

Definition at line 79 of file JPermutation.hh.

83  {
84  return next_permutation(__begin, __last, __end, compare, typename std::iterator_traits<T>::iterator_category());
85  }
bool next_permutation(T __begin, T __last, T __end, JComparator_t compare, std::bidirectional_iterator_tag)
Implementation of method next_permutation for bidirectional iterators.
Definition: JPermutation.hh:20
template<unsigned int N, class JElement_t , template< class, class > class JCollection_t, class JDistance_t , unsigned int M>
JTOOLS::if ( (p==this->begin()&&this->getDistance(x,(p++) ->getX()) > distance_type::precision)||(p==this->end()&&this->getDistance((--p) ->getX(), x) > distance_type::precision)  )

Template base class for polynomial interpolations with polynomial result.

This class partially implements the JFunctional interface.

Definition at line 619 of file JPolint.hh.

620  {
621 
622  THROW(JValueOutOfRange, "JPolintFunction::evaluate() x out of range.");
623  }
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
Definition: JException.hh:670
JTOOLS::for ( int  i = n/2; i != 0 && p != this->end(); --i,
++  p 
)

Definition at line 630 of file JPolint.hh.

630 {} // move p to begin of data
JTOOLS::for ( int  i = n ; i != 0 && p != this->begin(); --i,
--  p 
)

Definition at line 631 of file JPolint.hh.

631 {}
JTOOLS::for ( unsigned int  k = 0; k != M+1; ++k)

Definition at line 652 of file JPolint.hh.

652  {
653  result.y[k] = v[j][k];
654  }
*fatal Wrong number of arguments esac JCookie sh JRuns D $DETECTOR d sort n k
Definition: JRunrange.sh:16
return result
Definition: JPolint.hh:695
int j
Definition: JPolint.hh:634
data_type v[N+1][M+1]
Definition: JPolint.hh:707
JTOOLS::for ( int  m = 1; m != n; ++m)

Definition at line 658 of file JPolint.hh.

658  {
659 
660  for (int i = 0; i != n-m; ++i) {
661 
662  const double ho = u[ i ];
663  const double hp = u[i+m];
664  const double dx = ho - hp;
665 
666  for (int k = 0; k != M+1; ++k) {
667  r[k] = (v[i+1][k] - w[i][k]) / dx;
668  }
669 
670  v[i][0] = ho * r[0];
671  w[i][0] = hp * r[0];
672 
673  for (int k = 1; k != M+1; ++k) {
674  v[i][k] = ho * r[k] - k * r[k-1];
675  w[i][k] = hp * r[k] - k * r[k-1];
676  }
677  }
678 
679  if (2*(j+1) < n - m) {
680 
681  for (int k = 0; k != M+1; ++k) {
682  result.y[k] += v[j+1][k];
683  }
684 
685  } else {
686 
687  for (int k = 0; k != M+1; ++k) {
688  result.y[k] += w[j][k];
689  }
690 
691  --j;
692  }
693  }
*fatal Wrong number of arguments esac JCookie sh JRuns D $DETECTOR d sort n k
Definition: JRunrange.sh:16
data_type w[N+1][M+1]
Definition: JPolint.hh:708
do $JPP JMEstimator M
Definition: JMEstimator.sh:37
data_type r[M+1]
Definition: JPolint.hh:709
return result
Definition: JPolint.hh:695
alias put_queue eval echo n
Definition: qlib.csh:19
int j
Definition: JPolint.hh:634
data_type v[N+1][M+1]
Definition: JPolint.hh:707
double u[N+1]
Definition: JPolint.hh:706
virtual void JTOOLS::do_compile ( )
privatevirtual

Function compilation.

Definition at line 702 of file JPolint.hh.

703  {}
template<unsigned int N, class JElement_t , template< class, class > class JCollection_t, class JResult_t , class JDistance_t >
JElement_t::ordinate_type JTOOLS::integrate ( const JPolintFunction1D< N, JElement_t, JCollection_t, JResult_t, JDistance_t > &  input,
typename JMappable< JElement_t >::map_type &  output 
)
inlineprivate

Conversion of data points to integral values.

This method transfers the integration to the corresponding specialised function.

Parameters
inputcollection
outputmappable collection
Returns
integral

Definition at line 1029 of file JPolint.hh.

1031  {
1032  return integrate(input, output, JLANG::JBool<N == 0 || N == 1>());
1033  }
Auxiliary template class for type bool.
Definition: JBool.hh:20
JElement_t::ordinate_type integrate(const JCollection< JElement_t, JDistance_t > &input, typename JMappable< JElement_t >::map_type &output)
Conversion of data points to integral values.
Definition: JCollection.hh:812
template<unsigned int N, class JElement_t , template< class, class > class JCollection_t, class JResult_t , class JDistance_t >
JElement_t::ordinate_type JTOOLS::integrate ( const JPolintFunction1D< N, JElement_t, JCollection_t, JResult_t, JDistance_t > &  input,
typename JMappable< JElement_t >::map_type &  output,
const JLANG::JBool< false > &  option 
)
inlineprivate

Conversion of data points to integral values.

The integration uses the Gauss-Legendre quadratures with the number of points set to the degree of the input polynomial interpolating function.

Parameters
inputcollection
outputmappable collection
optionfalse
Returns
integral

Definition at line 1053 of file JPolint.hh.

1056  {
1057  typedef typename JElement_t::abscissa_type abscissa_type;
1058  typedef typename JElement_t::ordinate_type ordinate_type;
1060 
1061  ordinate_type V(JMATH::zero);
1062 
1063  if (input.getSize() > 1) {
1064 
1065  output.put(input.begin()->getX(), V);
1066 
1067  const JGaussLegendre engine(N);
1068 
1069  for (const_iterator j = input.begin(), i = j++; j != input.end(); ++i, ++j) {
1070 
1071  const abscissa_type xmin = i->getX();
1072  const abscissa_type xmax = j->getX();
1073 
1074  for (JGaussLegendre::const_iterator m = engine.begin(); m != engine.end(); ++m) {
1075 
1076  const abscissa_type x = 0.5 * (xmax + xmin + m->getX() * (xmax - xmin));
1077  const ordinate_type v = 0.5 * (xmax - xmin) * m->getY() * get_value(input(x));
1078 
1079  V += v;
1080  }
1081 
1082  output.put(xmax, V);
1083  }
1084  }
1085 
1086  return V;
1087  }
Numerical integrator for W(x) = 1.
Definition: JQuadrature.hh:111
collection_type::const_iterator const_iterator
Definition: JPolint.hh:946
static const JZero zero
Function object to assign zero value.
Definition: JZero.hh:105
int j
Definition: JPolint.hh:634
data_type v[N+1][M+1]
Definition: JPolint.hh:707
then usage $script[input file[working directory[option]]] nWhere option can be N
Definition: JMuonPostfit.sh:37
JResultEvaluator< JResult_t >::result_type get_value(const JResult_t &value)
Helper method to recursively evaluate a to function value.
Definition: JResult.hh:936
template<class JElement_t , template< class, class > class JCollection_t, class JResult_t , class JDistance_t >
JElement_t::ordinate_type JTOOLS::integrate ( const JPolintFunction1D< 0, JElement_t, JCollection_t, JResult_t, JDistance_t > &  input,
typename JMappable< JElement_t >::map_type &  output,
const JLANG::JBool< true > &  option 
)
inlineprivate

Conversion of data points to integral values.

The integration is based on the sum of ordinates of the input data points.

Parameters
inputcollection
outputmappable collection
optiontrue
Returns
integral

Definition at line 1105 of file JPolint.hh.

1108  {
1109  typedef typename JElement_t::ordinate_type ordinate_type;
1111 
1112  ordinate_type V(JMATH::zero);
1113 
1114  if (input.getSize() > 1) {
1115 
1116  output.put(input.begin()->getX(), V);
1117 
1118  for (const_iterator j = input.begin(), i = j++; j != input.end(); ++i, ++j) {
1119 
1120  V += input.getDistance(i->getX(), j->getX()) * j->getY();
1121 
1122  output.put(j->getX(), V);
1123  }
1124  }
1125 
1126  return V;
1127  }
collection_type::const_iterator const_iterator
Definition: JPolint.hh:946
static const JZero zero
Function object to assign zero value.
Definition: JZero.hh:105
int j
Definition: JPolint.hh:634
template<class JElement_t , template< class, class > class JCollection_t, class JResult_t , class JDistance_t >
JElement_t::ordinate_type JTOOLS::integrate ( const JPolintFunction1D< 1, JElement_t, JCollection_t, JResult_t, JDistance_t > &  input,
typename JMappable< JElement_t >::map_type &  output,
const JLANG::JBool< true > &  option 
)
inlineprivate

Conversion of data points to integral values.

The integration is based on the trapezoidal rule applied to the input data points.

Parameters
inputcollection
outputmappable collection
optiontrue
Returns
integral

Definition at line 1145 of file JPolint.hh.

1148  {
1149  typedef typename JElement_t::ordinate_type ordinate_type;
1151 
1152  ordinate_type V(JMATH::zero);
1153 
1154  if (input.getSize() > 1) {
1155 
1156  output.put(input.begin()->getX(), V);
1157 
1158  for (const_iterator j = input.begin(), i = j++; j != input.end(); ++i, ++j) {
1159 
1160  V += 0.5 * input.getDistance(i->getX(), j->getX()) * (i->getY() + j->getY());
1161 
1162  output.put(j->getX(), V);
1163  }
1164  }
1165 
1166  return V;
1167  }
collection_type::const_iterator const_iterator
Definition: JPolint.hh:946
static const JZero zero
Function object to assign zero value.
Definition: JZero.hh:105
int j
Definition: JPolint.hh:634
template<class JFunction1D_t >
double JTOOLS::search ( const double  xa,
const double  xb,
const double  xc,
const JFunction1D_t &  f,
const int  is,
const double  eps = 1.0e-6 
)

Locate maximum or minimun of function.

Golden section search code is taken from reference: Numerical Recipes in C++, W.H. Press, S.A. Teukolsky, W.T. Vetterling and B.P. Flannery, Cambridge University Press.

        xa < xb < xc

        is = +1  ->  There is a minimum, i.e:  f(xb) < min(f(xa),f(xc))
        is = -1  ->  There is a maximum, i.e:  f(xb) > max(f(xa),f(xc))
Parameters
xa
xb
xc
ffunction
issign (+1 -> minimim, -1 -> maximum)
epsrelative precision

Definition at line 48 of file JQuantiles.hh.

54  {
55  static const double R = 0.61803399;
56  static const double C = 1.0 - R;
57 
58  double x0 = xa;
59  double x3 = xc;
60  double x1, x2;
61 
62  if (fabs(xc-xb) > fabs(xb-xa)) {
63  x1 = xb;
64  x2 = xb + C*(xc-xb);
65  } else {
66  x2 = xb;
67  x1 = xb - C*(xb-xa);
68  }
69 
70  double f1 = is * get_value(f(x1));
71  double f2 = is * get_value(f(x2));
72 
73  while (fabs(x3-x0) > eps*(fabs(x1)+fabs(x2))) {
74 
75  if (f2 < f1) {
76 
77  x0 = x1;
78  x1 = x2;
79  x2 = R*x2 + C*x3;
80 
81  f1 = f2;
82  f2 = is * get_value(f(x2));
83 
84  } else {
85 
86  x3 = x2;
87  x2 = x1;
88  x1 = R*x1 + C*x0;
89 
90  f2 = f1;
91  f1 = is * get_value(f(x1));
92  }
93  }
94 
95  if (f1 < f2)
96  return x1;
97  else
98  return x2;
99  }
is
Definition: JDAQCHSM.chsm:167
then JPizza f
Definition: JPizza.sh:46
then usage $script[distance] fi case set_variable R
Definition: JDrawLED.sh:40
static const double C
Speed of light in vacuum [m/ns].
Definition: JConstants.hh:22
JResultEvaluator< JResult_t >::result_type get_value(const JResult_t &value)
Helper method to recursively evaluate a to function value.
Definition: JResult.hh:936
template<class T , class JComparator_t >
JRange<T, JComparator_t> JTOOLS::operator+ ( const JRange< T, JComparator_t > &  first,
const JRange< T, JComparator_t > &  second 
)
inline

Add ranges.


The new lower limit is the sum of the two lower limits and
the new upper limit is the sum of the two upper limits.

Parameters
firstfirst range
secondsecond range
Returns
range

Definition at line 634 of file JRange.hh.

635  {
636  return JRange<T, JComparator_t>(first).add(second);
637  }
then echo The file $DIR KM3NeT_00000001_00000000 root already please rename or remove it first
Range of values.
Definition: JRange.hh:34
template<class T , class JComparator_t >
JRange<T, JComparator_t> JTOOLS::operator- ( const JRange< T, JComparator_t > &  first,
const JRange< T, JComparator_t > &  second 
)
inline

Subtract ranges.


The new lower limit is the difference of the two lower limits and the new upper limit is the difference of the two upper limits.

Parameters
firstfirst range
secondsecond range
Returns
range

Definition at line 650 of file JRange.hh.

651  {
652  return JRange<T, JComparator_t>(first).sub(second);
653  }
then echo The file $DIR KM3NeT_00000001_00000000 root already please rename or remove it first
Range of values.
Definition: JRange.hh:34
template<class T , class JComparator_t >
bool JTOOLS::overlap ( const JRange< T, JComparator_t > &  first,
const JRange< T, JComparator_t > &  second 
)
inline

Test overlap between ranges.

Parameters
firstfirst range
secondsecond range
Returns
true if there is a non-zero overlap; else false

Definition at line 664 of file JRange.hh.

665  {
666  return first.overlap(second);
667  }
bool overlap(const range_type &range) const
Test overlap with given range.
Definition: JRange.hh:384
template<class T , class JComparator_t >
JRange<T, JComparator_t> JTOOLS::join ( const JRange< T, JComparator_t > &  first,
const JRange< T, JComparator_t > &  second 
)
inline

Join ranges.


The new lower limit is the maximim of the two lower limits and
the new upper limit is the minimum of the two upper limits.
This operation results in an equal or smaller range and may result in an unphysical range (i.e. lower limit > upper limit).

Parameters
firstfirst range
secondsecond range
Returns
range

Definition at line 682 of file JRange.hh.

683  {
684  return JRange<T, JComparator_t>(first).join(second);
685  }
JRange< T, JComparator_t > join(const JRange< T, JComparator_t > &first, const JRange< T, JComparator_t > &second)
Join ranges.
Definition: JRange.hh:682
then echo The file $DIR KM3NeT_00000001_00000000 root already please rename or remove it first
Range of values.
Definition: JRange.hh:34
template<class T , class JComparator_t >
JRange<T, JComparator_t> JTOOLS::combine ( const JRange< T, JComparator_t > &  first,
const JRange< T, JComparator_t > &  second 
)
inline

Combine ranges.


The new lower limit is the minimim of the two lower limits and
the new upper limit is the maximum of the two upper limits.
This operation results in an equal or larger range.

Parameters
firstfirst range
secondsecond range
Returns
range

Definition at line 699 of file JRange.hh.

700  {
701  return JRange<T, JComparator_t>(first).combine(second);
702  }
then echo The file $DIR KM3NeT_00000001_00000000 root already please rename or remove it first
Range of values.
Definition: JRange.hh:34
JRange< T, JComparator_t > combine(const JRange< T, JComparator_t > &first, const JRange< T, JComparator_t > &second)
Combine ranges.
Definition: JRange.hh:699
template<class T >
JRange<T> JTOOLS::make_range ( T  x,
T  y 
)
inline

Auxiliary method to create range of values.

Parameters
xlower limit
yupper limit
Returns
range

Definition at line 713 of file JRange.hh.

714  {
715  return JRange<T>(x,y);
716  }
Range of values.
Definition: JRange.hh:34
template<class JResult_t >
JResultEvaluator<JResult_t>::result_type JTOOLS::get_value ( const JResult_t &  value)
inline

Helper method to recursively evaluate a to function value.

Parameters
valueresult
Returns
function value

Definition at line 936 of file JResult.hh.

937  {
939  }
JResultEvaluator< JResult_t >::result_type get_value(const JResult_t &value)
Helper method to recursively evaluate a to function value.
Definition: JResult.hh:936
template<class JResult_t >
JResultEvaluator<JResult_t>::result_type JTOOLS::get_derivative ( const JResult_t &  value)
inline

Helper method to convert function value to derivative value.

Parameters
valueresult
Returns
derivative value

Definition at line 949 of file JResult.hh.

950  {
952  }
JResultEvaluator< JResult_t >::result_type get_derivative(const JResult_t &value)
Helper method to convert function value to derivative value.
Definition: JResult.hh:949
template<class JResult_t >
JResultEvaluator<JResult_t>::result_type JTOOLS::get_integral ( const JResult_t &  value)
inline

Helper method to convert function value to partial integral value.

Parameters
valueresult
Returns
partial integral value

Definition at line 962 of file JResult.hh.

963  {
965  }
JResultEvaluator< JResult_t >::result_type get_integral(const JResult_t &value)
Helper method to convert function value to partial integral value.
Definition: JResult.hh:962
template<class T >
JSet<typename std::iterator_traits<T>::value_type> JTOOLS::make_set ( T  __begin,
T  __end 
)
inline

Helper method for JSet.

Parameters
__beginbegin of abscissa values
__endend of abscissa values
Returns
set

Definition at line 144 of file JSet.hh.

145  {
147  }
Simple data structure for an abstract collection of non-equidistant abscissa values.
Definition: JSet.hh:29
template<class JAbscissa_t >
JSet<JAbscissa_t> JTOOLS::make_set ( const JAbstractCollection< JAbscissa_t > &  input)
inline

Helper method for JSet.

Parameters
inputabstract collection
Returns
set

Definition at line 157 of file JSet.hh.

158  {
159  return JSet<JAbscissa_t>(input);
160  }
Simple data structure for an abstract collection of non-equidistant abscissa values.
Definition: JSet.hh:29
template<class JOrdinate_t >
JSplineBounds<JOrdinate_t> JTOOLS::make_spline_bounds ( const JOrdinate_t  fpAtXmin,
const JOrdinate_t  fpAtXmax 
)
inline

Helper method for JSplineBounds.

Parameters
fpAtXmin1st derivative at minimal abscissa value
fpAtXmax1st derivative at maximal abscissa value
Returns
spline bounds

Definition at line 150 of file JSpline.hh.

152  {
153  return JSplineBounds<JOrdinate_t>(fpAtXmin, fpAtXmax);
154  }
Auxiliary class to define first derivates of the spline function at the two extrema.
Definition: JSpline.hh:34
template<class JElement_t , template< class, class > class JCollection_t, class JResult_t , class JDistance_t >
JElement_t::ordinate_type JTOOLS::integrate ( const JSplineFunction1D< JElement_t, JCollection_t, JResult_t, JDistance_t > &  input,
typename JMappable< JElement_t >::map_type &  output 
)
inline

Conversion of data points to integral values.

The integration includes the use of 2nd derivatives of the data points of the input spline interpolating function.

Parameters
inputcollection
outputmappable collection
Returns
integral

Definition at line 790 of file JSpline.hh.

792  {
793  typedef typename JElement_t::ordinate_type ordinate_type;
795 
796  ordinate_type V(JMATH::zero);
797 
798  if (input.getSize() > 1) {
799 
800  output.put(input.begin()->getX(), V);
801 
802  for (const_iterator j = input.begin(), i = j++; j != input.end(); ++i, ++j) {
803 
804  const double dx = input.getDistance(i->getX(), j->getX());
805  const ordinate_type y = i->getY() + j->getY();
806  const ordinate_type z = i->getU() + j->getU();
807  const ordinate_type v = dx * 0.50 * y;
808  const ordinate_type w = dx * 0.25 * z*dx*dx/6;
809 
810  V += v - w;
811 
812  output.put(j->getX(), V);
813  }
814  }
815 
816  return V;
817  }
collection_type::const_iterator const_iterator
Definition: JSpline.hh:670
data_type w[N+1][M+1]
Definition: JPolint.hh:708
static const JZero zero
Function object to assign zero value.
Definition: JZero.hh:105
int j
Definition: JPolint.hh:634
data_type v[N+1][M+1]
Definition: JPolint.hh:707
template<class JElement_t , template< class, class > class JCollection_t, class JDistance_t >
JElement_t::ordinate_type JTOOLS::integrate ( const JSplineFunction1D< JElement_t, JCollection_t, JResultPDF< typename JElement_t::ordinate_type >, JDistance_t > &  input,
typename JMappable< JElement_t >::map_type &  output 
)
inline

Conversion of data points to integral values.

The integration directly uses the integral values of the input spline interpolating function.

Parameters
inputcollection
outputmappable collection
Returns
integral

Definition at line 833 of file JSpline.hh.

835  {
836  typedef typename JElement_t::ordinate_type ordinate_type;
837  typedef JResultPDF<ordinate_type> result_type;
839 
840  if (input.getSize() > 1) {
841 
842  for (const_iterator i = input.begin(); i != input.end(); ++i) {
843  output.put(i->getX(), i->getIntegral());
844  }
845 
846  return input.rbegin()->getIntegral();
847  }
848 
849  return JMATH::zero;
850  }
collection_type::const_iterator const_iterator
Definition: JSpline.hh:670
static const JZero zero
Function object to assign zero value.
Definition: JZero.hh:105
Data structure for result including value, first derivative and integrals of function.
Definition: JResult.hh:335
template<class JContainer_t , class JKey_t , class JValue_t >
JContainer_t::ordinate_type JTOOLS::makeCDF ( const JContainer_t &  input,
JMappableCollection< JKey_t, JValue_t > &  output,
const typename JContainer_t::ordinate_type  eps = JMATH::zero 
)
inline

Conversion of data points to cumulative probability distribition (CDF).

Note that the data type of the input container should be preserved so that the corresponding method integrate() is used.

Parameters
inputcollection
outputmappable collection
epsminimal step size
Returns
integral value

Definition at line 51 of file JToolsToolkit.hh.

54  {
55  typedef typename JContainer_t::ordinate_type ordinate_type;
56  typedef typename JContainer_t::abscissa_type abscissa_type;
57  typedef JElement2D<abscissa_type, ordinate_type> element_type;
58  typedef JCollection<element_type> buffer_type;
59 
60 
61  if (input.getSize() > 1) {
62 
63  buffer_type buffer;
64 
65  const ordinate_type V = integrate(input, buffer);
66 
67  if (V == ordinate_type(JMATH::zero)) {
68  THROW(JDivisionByZero, "Method makeCDF(): integral equals zero.");
69  }
70 
71  output.clear();
72 
73  typename buffer_type::const_iterator i = buffer.begin();
74 
75  for ( ; i != buffer.end() && i->getY() <= 0.5 * eps * V; ++i) {}
76 
77  if (i != buffer.end()) {
78 
79  // force first point at (0, ymin)
80 
81  JKey_t x = 0.0;
82  JValue_t y = i->getX();
83 
84  output.put(x, y);
85 
86  JKey_t xmax = x;
87  JValue_t ymax = y;
88 
89  for (++i; i != buffer.end(); ++i) {
90 
91  x = i->getY() / V;
92  y = i->getX();
93 
94  if (x > xmax) {
95 
96  ymax = y;
97 
98  if (x > xmax + eps) {
99 
100  output.put(x, y);
101 
102  xmax = x;
103  }
104  }
105  }
106 
107  // force last point at (1, ymax)
108 
109  x = 1.0;
110  y = ymax;
111 
112  output.put(x,y);
113 
114  } else {
115  THROW(JDivisionByZero, "Method makeCDF(): no remaining data.");
116  }
117 
118  return V;
119 
120  } else {
121  THROW(JEmptyCollection, "Method makeCDF(): not sufficient input data.");
122  }
123  }
General purpose class for collection of elements, see: &lt;a href=&quot;JTools.PDF&quot;;&gt;Collection of elements...
Definition: JCollection.hh:72
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
Definition: JException.hh:670
static const JZero zero
Function object to assign zero value.
Definition: JZero.hh:105
void put(typename JClass< key_type >::argument_type key, typename JClass< mapped_type >::argument_type value)
Put pair-wise element (key,value) into collection.
virtual void clear()=0
Clear.
2D Element.
Definition: JElement.hh:44
JElement_t::ordinate_type integrate(const JCollection< JElement_t, JDistance_t > &input, typename JMappable< JElement_t >::map_type &output)
Conversion of data points to integral values.
Definition: JCollection.hh:812
template<class JContainer_t >
JContainer_t::ordinate_type JTOOLS::getIntegral ( const JContainer_t &  input)
inline

Get integral of input data points.

Parameters
inputinput data
Returns
integral value

Definition at line 133 of file JToolsToolkit.hh.

134  {
136 
137  return integrate(input, garbage);
138  }
JElement_t::ordinate_type integrate(const JCollection< JElement_t, JDistance_t > &input, typename JMappable< JElement_t >::map_type &output)
Conversion of data points to integral values.
Definition: JCollection.hh:812
template<class JFunction_t , template< class, class, class > class JMap_t, class JTail_t >
JFunction_t::ordinate_type JTOOLS::getIntegral ( const JMultiMap< typename JFunction_t::abscissa_type, JFunction_t, JMapList< JMap_t, JTail_t >, typename JFunction_t::distance_type > &  input)
inline

Auxiliary method to get integral of input data points.

Parameters
inputinput data
Returns
integral value

Definition at line 151 of file JToolsToolkit.hh.

152  {
153  typedef typename JFunction_t::abscissa_type abscissa_type;
154  typedef typename JFunction_t::ordinate_type ordinate_type;
155  typedef typename JFunction_t::distance_type distance_type;
156  typedef typename JFunctionalMap<JMap_t>::template function_type<abscissa_type,
157  ordinate_type,
158  ordinate_type,
159  distance_type> buffer_type;
160  typedef JMultiMap<abscissa_type, JFunction_t, JMapList<JMap_t, JTail_t>, distance_type> multimap_type;
161 
162  static buffer_type buffer;
163 
164  buffer.configure(input);
165 
166  typename buffer_type::iterator out = buffer.begin();
167 
168  for (typename multimap_type::const_iterator in = input.begin(); in != input.end(); ++in, ++out) {
169  out->getY() = getIntegral(in->getY());
170  }
171 
172  buffer.compile();
173 
174  return getIntegral(buffer);
175  }
esac print_variable DETECTOR INPUT_FILE OUTPUT_FILE CDF for TYPE in
Definition: JSirene.sh:45
Auxiliary class to define corresponding one-dimensional function interpolator function_type.
JContainer_t::ordinate_type getIntegral(const JContainer_t &input)
Get integral of input data points.
Multidimensional map.
Definition: JMultiMap.hh:46
template<class JFunction_t , template< class, class, class > class JMap_t, class JTail_t >
JFunction_t::ordinate_type JTOOLS::getIntegral ( const JMultiFunction< JFunction_t, JMapList< JMap_t, JTail_t >, typename JFunction_t::distance_type > &  input)
inline

Get integral of input data points.

Parameters
inputinput data
Returns
integral value

Definition at line 188 of file JToolsToolkit.hh.

189  {
190  typedef typename JFunction_t::abscissa_type abscissa_type;
191  typedef typename JFunction_t::ordinate_type ordinate_type;
192  typedef typename JFunction_t::distance_type distance_type;
193  typedef typename JFunctionalMap<JMap_t>::template function_type<abscissa_type,
194  ordinate_type,
195  ordinate_type,
196  distance_type> buffer_type;
197  typedef JMultiFunction<JFunction_t, JMapList<JMap_t, JTail_t>, distance_type> multifunction_type;
198 
199  buffer_type buffer;
200 
201  for (typename multifunction_type::const_iterator i = input.begin(); i != input.end(); ++i) {
202  buffer.put(i->getX(), getIntegral(i->getY()));
203  }
204 
205  buffer.compile();
206 
207  return getIntegral(buffer);
208  }
void compile()
Compilation.
Auxiliary class to define corresponding one-dimensional function interpolator function_type.
Multidimensional interpolation method.
JContainer_t::ordinate_type getIntegral(const JContainer_t &input)
Get integral of input data points.
template<class T >
void JTOOLS::reset ( T value)
inline

Reset value.

The value is set to (the equivalent of) zero, see method JMATH::getZero.

Parameters
valuevalue

Definition at line 219 of file JToolsToolkit.hh.

220  {
221  value = JMATH::getZero<T>();
222  }
template<class JElement_t , class JDistance_t >
void JTOOLS::reset ( JCollection< JElement_t, JDistance_t > &  collection)
inline

Recursive reset of collection.

Parameters
collectioncollection

Definition at line 231 of file JToolsToolkit.hh.

232  {
233  typedef typename JCollection<JElement_t, JDistance_t>::iterator iterator;
234 
235  for (iterator i = collection.begin(); i != collection.end(); ++i) {
236  reset(i->getY());
237  }
238  }
container_type::iterator iterator
Definition: JCollection.hh:92
void reset(T &value)
Reset value.
template<class T >
void JTOOLS::copy ( const T input,
T output 
)
inline

Copy of input to output.

The output value is set to the input value.

Parameters
inputinput
outputoutput

Definition at line 250 of file JToolsToolkit.hh.

251  {
252  output = input;
253  }
template<class JElement_t , class JDistance_t , class JKey_t , class JValue_t >
void JTOOLS::copy ( const JCollection< JElement_t, JDistance_t > &  input,
JMappableCollection< JKey_t, JValue_t > &  output 
)
inline

Recursive copy of input collection to output collection.

Parameters
inputinput
outputoutput

Definition at line 263 of file JToolsToolkit.hh.

264  {
265  typedef typename JCollection<JElement_t, JDistance_t>::const_iterator const_iterator;
266 
267  output.clear();
268 
269  for (const_iterator i = input.begin(); i != input.end(); ++i) {
270  copy(i->getY(), output.get(i->getX()));
271  }
272  }
virtual const mapped_type & get(typename JClass< key_type >::argument_type key) const =0
Get mapped value.
virtual void clear()=0
Clear.
void copy(const Head &from, JHead &to)
Copy header from from to to.
Definition: JHead.cc:153
container_type::const_iterator const_iterator
Definition: JCollection.hh:90
template<class T , class JAbscissa_t >
void JTOOLS::configure ( const T value,
const JAbstractCollection< JAbscissa_t > &  bounds,
JBool< false >  option 
)
inline

Configuration of value.

This is a fall-back method; it does nothing.

Parameters
valuevalue
boundsbounds
optionfalse

Definition at line 285 of file JToolsToolkit.hh.

286  {}
template<class JElement_t , class JDistance_t >
void JTOOLS::configure ( JCollection< JElement_t, JDistance_t > &  collection,
const JAbstractCollection< typename JElement_t::abscissa_type > &  bounds,
JBool< true >  option = JBool<true>() 
)
inline

Recursive configuration of collection.

Parameters
collectioncollection
boundsbounds
optiontrue

Definition at line 297 of file JToolsToolkit.hh.

300  {
301  typedef typename JCollection<JElement_t, JDistance_t>::iterator iterator;
302  typedef typename JCollection<JElement_t, JDistance_t>::ordinate_type ordinate_type;
303 
304  collection.configure(bounds);
305 
306  for (iterator i = collection.begin(); i != collection.end(); ++i) {
307  configure(i->getY(), bounds, JBool<JAssembler<ordinate_type>::is_collection>());
308  }
309  }
container_type::iterator iterator
Definition: JCollection.hh:92
void configure(const JAbstractCollection< abscissa_type > &bounds)
Configure collection.
Definition: JCollection.hh:333
void configure(const T &value, const JAbstractCollection< JAbscissa_t > &bounds, JBool< false > option)
Configuration of value.
JElement_t::ordinate_type ordinate_type
Definition: JCollection.hh:82
template<class T >
void JTOOLS::accumulate ( T value,
JBool< false >  option 
)
inline

Accumulation of value.

This is a fall-back method; it does nothing.

Parameters
valuevalue
optionfalse

Definition at line 321 of file JToolsToolkit.hh.

322  {}
template<class JElement_t , class JDistance_t >
void JTOOLS::accumulate ( JCollection< JElement_t, JDistance_t > &  collection,
JBool< true >  option = JBool<true>() 
)
inline

Recursive accumulation of collection.

Parameters
collectioncollection
optiontrue

Definition at line 332 of file JToolsToolkit.hh.

333  {
334  typedef typename JCollection<JElement_t, JDistance_t>::iterator iterator;
335  typedef typename JCollection<JElement_t, JDistance_t>::ordinate_type ordinate_type;
336 
337  for (iterator i = collection.begin(); i != collection.end(); ++i) {
338  accumulate(i->getY(), JBool<JAssembler<ordinate_type>::is_collection>());
339  }
340 
341  if (collection.getSize() > 1) {
342 
343  for (iterator j = collection.begin(), i = j++; j != collection.end(); ++i, ++j) {
344  j->getY() += i->getY();
345  }
346 
347  reset(collection.begin()->getY());
348  }
349  }
virtual int getSize() const
Get number of elements.
Definition: JCollection.hh:196
container_type::iterator iterator
Definition: JCollection.hh:92
const ordinate_type & getY(int index) const
Get ordinate value.
Definition: JCollection.hh:243
void reset(T &value)
Reset value.
JElement_t::ordinate_type ordinate_type
Definition: JCollection.hh:82
int j
Definition: JPolint.hh:634
void accumulate(T &value, JBool< false > option)
Accumulation of value.
template<class JHistogram_t , class JHistogramMaplist_t , class JHistogramDistance_t , class JFunction_t , class JFunctionMaplist_t , class JFunctionDistance_t >
void JTOOLS::makePDF ( const JTransformableMultiHistogram< JHistogram_t, JHistogramMaplist_t, JHistogramDistance_t > &  input,
JTransformableMultiFunction< JFunction_t, JFunctionMaplist_t, JFunctionDistance_t > &  output 
)
inline

Conversion of multidimensional histogram to multidimensional function.

Parameters
inputmultidimensional histogram
outputmultidimensional function

Definition at line 287 of file JTransformableMultiFunction.hh.

289  {
290  output.insert(input);
291  }
void insert(const JTransformableMultiFunction< JPDF_t, JPDFMaplist_t, JPDFDistance_t > &input)
Insert multidimensional input.
template<class JObject_t , class JHead_t , class JTail_t , class T >
JObject_t& JTOOLS::for_each ( JObject_t &  object,
JType< JTypeList< JHead_t, JTail_t > >  typelist,
const JTuple< T > &  tuple 
)

For each data type method.

The given object should provide for the function object operator

   template<class T>
   void object()(JType<T> type, tuple);
Parameters
objectobject
typelisttype list
tupletuple
Returns
object

Definition at line 666 of file JTuple.hh.

667  {
668  for_each(object, JType<JHead_t>(), tuple);
669  for_each(object, JType<JTail_t>(), tuple);
670 
671  return object;
672  }
JObject_t & for_each(JObject_t &object, JType< JTypeList< JHead_t, JTail_t > > typelist)
For each data type method.
Definition: JTypeList.hh:415
template<class JObject_t , class JTypelist_t , class T >
JObject_t& JTOOLS::for_each ( JObject_t &  object,
JType< JTypelist_t >  type,
const JTuple< T > &  tuple 
)

For each data type method.

The given object should provide for the function object operator

   template<class T>
   void object()(JType<T> type, tuple);
Parameters
objectobject
typetype
tupletuple
Returns
object

Definition at line 690 of file JTuple.hh.

691  {
692  object(type, tuple);
693 
694  return object;
695  }
template<class... Args>
JTuple<typename JTYPELIST<Args...>::typelist> JTOOLS::make_tuple ( const Args &...  args)
inline

Helper method for tuple.

Parameters
argsvalues
Returns
tuple

Definition at line 705 of file JTuple.hh.

706  {
707  return JTuple<typename JTYPELIST<Args...>::typelist>(args...);
708  }
Template data structure.
Definition: JTuple.hh:44
template<class JObject_t , class T >
JObject_t& JTOOLS::for_each ( JObject_t &  object,
JType< JNullType >  type,
const JTuple< T > &  tuple 
)

Termination method of for each data type method.

Parameters
objectobject
typenull type
tupletuple
Returns
object

Definition at line 720 of file JTuple.hh.

721  {
722  return object;
723  }
template<class T >
void JTOOLS::inplace_merge ( T  __begin,
const size_t  N,
const size_t *  delimiter 
)

Merge multiple sorted ranges.

Parameters
__beginbegin of data
Nnumber of delimiters (equals number of ranges plus one)
delimiterincremental delimiters

Definition at line 28 of file JMergeSort.cc.

29  {
30  switch (N - 1) {
31 
32  case 0:
33  case 1:
34  break;
35 
36  case 2:
37 
38  std::inplace_merge(__begin + delimiter[0],
39  __begin + delimiter[1],
40  __begin + delimiter[2]);
41 
42  break;
43 
44  default:
45 
46  const size_t n = (N - 1) >> 1;
47 
48  inplace_merge(__begin, n + 1, delimiter);
49  inplace_merge(__begin, N - n, delimiter + n);
50 
51  std::inplace_merge(__begin + delimiter[ 0 ],
52  __begin + delimiter[ n ],
53  __begin + delimiter[N-1]);
54 
55  break;
56  };
57  }
void inplace_merge(T __begin, const size_t N, const size_t *delimiter)
Merge multiple sorted ranges.
Definition: JMergeSort.cc:28
alias put_queue eval echo n
Definition: qlib.csh:19
then usage $script[input file[working directory[option]]] nWhere option can be N
Definition: JMuonPostfit.sh:37
template<class T >
bool JTOOLS::is_sorted ( T  __begin,
T  __end 
)
inline

Test whether range is sorted.

Parameters
__beginbegin of data
__endend of data
Returns
true if sorted; else false

Definition at line 105 of file JMergeSort.cc.

106  {
107  if (std::distance(__begin, __end) > 1) {
108  for (T q = __begin, p = q++; q != __end; ++p, ++q) {
109  if (*p > *q) {
110  return false;
111  }
112  }
113  }
114 
115  return true;
116  }
std::vector< T >::difference_type distance(typename std::vector< T >::const_iterator first, typename PhysicsEvent::const_iterator< T > second)
Specialisation of STL distance.
do set_variable OUTPUT_DIRECTORY $WORKDIR T

Variable Documentation

const double JTOOLS::PI = 3.1415927
static

Constants.

pi

Definition at line 20 of file JConstants.hh.

const double JTOOLS::EULER = 0.577215664901533
static

Euler number.

Definition at line 21 of file JConstants.hh.

const double JTOOLS::C = 0.299792458
static

Speed of light in vacuum [m/ns].

Definition at line 22 of file JConstants.hh.

const double JTOOLS::C_INVERSE = 1.0/C
static

Inverse speed of light in vacuum [ns/m].

Definition at line 23 of file JConstants.hh.

const double JTOOLS::AVOGADRO = 6.0221415e23
static

Avogadro's number [gr^-1].

Definition at line 24 of file JConstants.hh.

const double JTOOLS::H = 4.13566733e-15
static

Planck constant [eV s].

Definition at line 25 of file JConstants.hh.

const double JTOOLS::HBAR = H/(2*PI)
static

Planck constant [eV s].

Definition at line 26 of file JConstants.hh.

const double JTOOLS::HBARC = HBAR*C*1.0e9
static

Planck constant [eV m].

Definition at line 27 of file JConstants.hh.

const double JTOOLS::ALPHA_ELECTRO_MAGNETIC = 1.0/137.036
static

Electro-Magnetic coupling constant.

Definition at line 28 of file JConstants.hh.

const double JTOOLS::THETA_MCS = 13.6e-3
static

Multiple Coulomb scattering constant [GeV].

Definition at line 29 of file JConstants.hh.

const double JTOOLS::DENSITY_SEA_WATER = 1.038
static

Fixed environment values.

Density of sea water [g/cm^3]

Definition at line 34 of file JConstants.hh.

const double JTOOLS::DENSITY_ROCK = 2.65
static

Density of rock [g/cm^3].

Definition at line 35 of file JConstants.hh.

const double JTOOLS::SALINITY_SEA_WATER = 0.035
static

Salinity of sea water.

Definition at line 36 of file JConstants.hh.

const double JTOOLS::INDEX_OF_REFRACTION_WATER = 1.3800851282
static

average index of refraction of water

Definition at line 37 of file JConstants.hh.

const double JTOOLS::X0_WATER_M = 0.36
static

Radiation length pure water [m].

Definition at line 38 of file JConstants.hh.

const double JTOOLS::TAN_THETA_C_WATER = sqrt((INDEX_OF_REFRACTION_WATER - 1.0) * (INDEX_OF_REFRACTION_WATER + 1.0))
static

Derived quantities of optical medium.

Definition at line 43 of file JConstants.hh.

const double JTOOLS::COS_THETA_C_WATER = 1.0 / INDEX_OF_REFRACTION_WATER
static

Definition at line 44 of file JConstants.hh.

const double JTOOLS::SIN_THETA_C_WATER = TAN_THETA_C_WATER * COS_THETA_C_WATER
static

Definition at line 45 of file JConstants.hh.

const double JTOOLS::KAPPA_WATER = 0.96
static

Definition at line 46 of file JConstants.hh.

const double JTOOLS::MASS_PHOTON = 0.0
static

Particle masses.

Note that the neutrino masses are set to zero.photon mass [GeV]

Definition at line 52 of file JConstants.hh.

const double JTOOLS::MASS_ELECTRON_NEUTRINO = 0.0
static

electron neutrino mass [GeV]

Definition at line 54 of file JConstants.hh.

const double JTOOLS::MASS_MUON_NEUTRINO = 0.0
static

muon neutrino mass [GeV]

Definition at line 55 of file JConstants.hh.

const double JTOOLS::MASS_TAU_NEUTRINO = 0.0
static

tau neutrino mass [GeV]

Definition at line 56 of file JConstants.hh.

const double JTOOLS::MASS_ELECTRON = 0.510998946e-3
static

electron mass [GeV]

Definition at line 58 of file JConstants.hh.

const double JTOOLS::MASS_MUON = 0.1056583745
static

muon mass [GeV]

Definition at line 59 of file JConstants.hh.

const double JTOOLS::MASS_TAU = 1.77682
static

tau mass [GeV]

Definition at line 60 of file JConstants.hh.

const double JTOOLS::MASS_NEUTRAL_PION = 0.1349766
static

pi_0 mass [GeV]

Definition at line 62 of file JConstants.hh.

const double JTOOLS::MASS_CHARGED_PION = 0.13957018
static

pi^+/- mass [GeV]

Definition at line 63 of file JConstants.hh.

const double JTOOLS::MASS_NEUTRAL_KAON = 0.497614
static

K_0 mass [GeV].

Definition at line 64 of file JConstants.hh.

const double JTOOLS::MASS_CHARGED_KAON = 0.493677
static

K^+/- mass [GeV].

Definition at line 65 of file JConstants.hh.

const double JTOOLS::MASS_PROTON = 0.9382720813
static

proton mass [GeV]

Definition at line 67 of file JConstants.hh.

const double JTOOLS::MASS_NEUTRON = 0.9395654133
static

neutron mass [GeV]

Definition at line 68 of file JConstants.hh.

const double JTOOLS::MASS_LAMBDA = 1.115683
static

Lambda mass [GeV].

Definition at line 69 of file JConstants.hh.

const double JTOOLS::MASS_NEUTRAL_SIGMA = 1.192642
static

Sigma_0 mass [GeV].

Definition at line 70 of file JConstants.hh.

const double JTOOLS::MASS_CHARGED_SIGMA = 1.18937
static

Sigma^+/- mass [GeV].

Definition at line 71 of file JConstants.hh.

const double JTOOLS::MASS_NEUTRAL_XI = 1.31486
static

Xi_0 mass [GeV].

Definition at line 72 of file JConstants.hh.

const double JTOOLS::MASS_CHARGED_XI = 1.32171
static

Xi^+/- mass [GeV].

Definition at line 73 of file JConstants.hh.

const double JTOOLS::MASS_CHARGED_OMEGA = 1.67245
static

Omega^+/- mass [GeV].

Definition at line 74 of file JConstants.hh.

const long long int JTOOLS::KILOBYTE = 1024
static

Computing quantities.

Definition at line 79 of file JConstants.hh.

const long long int JTOOLS::MEGABYTE = KILOBYTE*KILOBYTE
static

Number of bytes in a kilobyte.

Definition at line 80 of file JConstants.hh.

const long long int JTOOLS::GIGABYTE = KILOBYTE*KILOBYTE*KILOBYTE
static

Number of bytes in a megabyte.

Definition at line 81 of file JConstants.hh.

const JCompiler JTOOLS::compiler
static

Function object for functional object compilation.

Definition at line 369 of file JFunctional.hh.

const JCumulator JTOOLS::cumulator
static

Function object for functional object compilation.

Definition at line 231 of file JHistogram.hh.

JTOOLS::pX

Definition at line 625 of file JPolint.hh.

const int JTOOLS::n = std::min((int) (N + 1), (int) this->size())

Definition at line 628 of file JPolint.hh.

JTOOLS::j = 0

Definition at line 634 of file JPolint.hh.

result_type JTOOLS::result
mutable

Definition at line 695 of file JPolint.hh.

double JTOOLS::u[N+1]
mutable

Definition at line 706 of file JPolint.hh.

data_type JTOOLS::v[N+1][M+1]
mutable

Definition at line 707 of file JPolint.hh.

data_type JTOOLS::w[N+1][M+1]
mutable

Definition at line 708 of file JPolint.hh.

data_type JTOOLS::r[M+1]
mutable

Definition at line 709 of file JPolint.hh.