1 #ifndef __JSIRENE__JCDFTABLE2D__
2 #define __JSIRENE__JCDFTABLE2D__
22 namespace JPP {
using namespace JPHYSICS; }
39 template<
class JArgument_t,
class JResult_t>
41 public JMultiFunction<JPolintFunction1D<1, JElement2D<JArgument_t,JResult_t>, JGridCollection>,
42 JMapList<JPolint1FunctionalGridMap> >
71 template<
class JCDF_t,
class JCDFMaplist_t,
class JCDFDistance_t>
73 const int number_of_bins,
74 const double safety_factor = 2.0) :
85 const JPDFTransformer_t&
object =
dynamic_cast<const JPDFTransformer_t&
>(*(cdf.
transformer));
89 catch(
const std::exception& error) {
102 i->getY().configure(
make_grid(number_of_bins, -1.0, +1.0));
106 const double D = i->getX();
107 const double cd =
j->getX();
112 for (JOmega3D::const_iterator dir = omega.begin(); dir != omega.end(); ++dir) {
113 y += cdf.
getNPE(D, cd, dir->getTheta(), fabs(dir->getPhi()));
118 j->getY() = safety_factor * y / W;
134 const double cd)
const
136 const double buffer[] = {
D, cd };
138 const double y = this->evaluate(buffer);
139 const double W = this->
transformer->getWeight(D, cd);
Custom class for CDF table in 2 dimensions.
do echo Generating $dir eval D
Multi-dimensional CDF table for arrival time of Cherenkov light.
double getNPE(const Args &...args) const
Get number of photo-electrons.
JLANG::JSharedPointer< transformer_type > transformer
JLANG::JSharedPointer< transformer_type > transformer
JMultiFunction< JFunction1D_t, JMaplist_t > JFunction2D_t
std::pair< double, double > range_type
Various implementations of functional maps.
JPolintFunction1D< 1, JElement2D_t, JGridCollection > JFunction1D_t
The template JSharedPointer class can be used to share a pointer to an object.
JCDFTable2D()
Default constructor.
static const double PI
Mathematical constants.
JMapList< JPolint1FunctionalGridMap > JMaplist_t
then for FUNCTION in pdf npe cdf
JMultiQuantile_t intensity
double getNPE(const double D, const double cd) const
Get number of photo-electrons.
JCDFTable2D(const JCDFTable< JCDF_t, JCDFMaplist_t, JCDFDistance_t > &cdf, const int number_of_bins, const double safety_factor=2.0)
Constructor.
JElement2D< argument_type, result_type > JElement2D_t
JArgument_t argument_type
JMultiMapTransformer< 2, argument_type > transformer_type