1 #ifndef __JPHYSICS__JCDFTABLE__
2 #define __JPHYSICS__JCDFTABLE__
23 namespace JPP {
using namespace JPHYSICS; }
47 template<
class JFunction1D_t,
52 public JObjectBinaryIO< JCDFTable<JFunction1D_t, JMaplist_t, JDistance_t> >,
89 template<
class JPDF_t,
class JPDFMaplist_t,
class JPDFDistance_t>
91 const typename JPDF_t::ordinate_type eps =
JMATH::zero) :
97 this->
insert((*i).getKey(), (*i).getValue(), eps);
110 template<
class JHistogram1D_t,
class JHistogramMap_t,
class JHistogramDistance_t>
128 template<
class JFunctionTransformer_t>
136 const double W1 = this->transformer->getWeight(array);
137 const double W2 = transformer .getWeight(array);
144 this->transformer.reset(transformer.clone());
155 template<
class ...Args>
161 const double npe =
intensity.evaluate(buffer.data());
173 template<
class ...Args>
204 intensity.setExceptionHandler(
new typename JMultiQuantile_t::function_type::JDefaultResult(
JMATH::zero));
205 function .setExceptionHandler(
new typename JMultiFunction_t::function_type::JDefaultResult(
JMATH::zero));
249 template<
class JPDF_t>
252 const typename JPDF_t::ordinate_type eps)
258 JFunction1D_t buffer;
264 function .insert(key, buffer);
279 template<
unsigned int N,
class JKey_t,
class JValue_t,
class JHistogramMaplist_t,
class JHistogramDistance_t>
282 const typename JValue_t::contents_type eps)
284 if (histogram.getSize() > 1) {
288 const JKey_t x = 0.5 * (i->first +
j->first);
Interface for binary output.
Multi-dimensional CDF table for arrival time of Cherenkov light.
double getNPE(const Args &...args) const
Get number of photo-electrons.
Auxiliary base class for storing and loading a single object to and from a binary file...
JTOOLS::JMultiFunction< JConstantFunction1D_t, JMaplist_t, JDistance_t > JMultiQuantile_t
void transform(const JFunctionTransformer_t &transformer)
Application of weight function.
JLANG::JSharedPointer< transformer_type > transformer
double getTime(const Args &...args) const
Generate arrival time.
esac print_variable DETECTOR INPUT_FILE OUTPUT_FILE CDF for TYPE in
JCDFTable(const JTransformableMultiFunction< JPDF_t, JPDFMaplist_t, JPDFDistance_t > &input, const typename JPDF_t::ordinate_type eps=JMATH::zero)
Constructor.
static const JZero zero
Function object to assign zero value.
Definition of zero value for any class.
void insert(const JMultiKey< N, JKey_t > &key, const JMultiMap< JKey_t, JValue_t, JHistogramMaplist_t, JHistogramDistance_t > &histogram, const typename JValue_t::contents_type eps)
Insert multi-dimensional histogram at multi-dimensional key.
JTOOLS::JMultiFunction< JFunction1D_t, JMaplist_t, JDistance_t > JMultiFunction_t
Forward declaration of binary output.
virtual void do_compile()
Function compilation.
JFunction1D_t::argument_type argument_type
The template JSharedPointer class can be used to share a pointer to an object.
JFunction1D_t::value_type value_type
JMultiKey< NUMBER_OF_DIMENSIONS-1, argument_type > multikey_t
JCDFTable(const JTransformableMultiHistogram< JHistogram1D_t, JHistogramMap_t, JHistogramDistance_t > &input, const typename JHistogram1D_t::ordinate_type eps=JMATH::zero)
Constructor.
Interface for binary input.
transformablemultifunction_t::transformer_type transformer_type
JCDFTable()
Default constructor.
transformablemultifunction_t::multimap_type multimap_type
JTOOLS::JConstantFunction1D< double, argument_type > JConstantFunction1D_t
JFunction1D_t::result_type result_type
void insert(const multikey_t &key, const JPDF_t &value, const typename JPDF_t::ordinate_type eps)
Insert value at given multidimensional key.
JReader & read(JReader &in)
Read CDF from input.
JTransformableMultiFunction< JFunction1D_t, JMaplist_t, JDistance_t > transformablemultifunction_t
JMultiQuantile_t intensity
virtual JWriter & write(JWriter &out) const
Write CDF to output.