Jpp 19.3.0-rc.2
the software that should make you happy
Loading...
Searching...
No Matches
JFIT::JRegressorStorage< JShower3EZ, JGandalf > Struct Reference

Template specialisation for storage of PDF tables. More...

#include <JShower3EZRegressor.hh>

Public Types

typedef JTOOLS::JPolint1Function1D_t JFunction1D_t
 
typedef JTOOLS::JMapList< JTOOLS::JPolint0FunctionalMap, JTOOLS::JMapList< JTOOLS::JPolint0FunctionalMap, JTOOLS::JMapList< JTOOLS::JPolint0FunctionalGridMap, JTOOLS::JMapList< JTOOLS::JPolint0FunctionalGridMap > > > > JPDFMaplist_t
 
typedef JPHYSICS::JPDFTable< JFunction1D_t, JPDFMaplist_tJPDF_t
 
typedef JTOOLS::JMapList< JTOOLS::JPolint1FunctionalMap, JTOOLS::JMapList< JTOOLS::JPolint1FunctionalMapH, JTOOLS::JMapList< JTOOLS::JPolint1FunctionalGridMap, JTOOLS::JMapList< JTOOLS::JPolint1FunctionalGridMap > > > > JNPEMaplist_t
 
typedef JPHYSICS::JNPETable< double, double, JNPEMaplist_tJNPE_t
 
typedef std::array< JNPE_t, NUMBER_OF_PDFSJNPEs_t
 NPEs.
 

Public Member Functions

 JRegressorStorage ()
 Default constructor.
 
 JRegressorStorage (const std::string &fileDescriptor)
 Parameterized constructor.
 
const JNPEs_tgetNPE () const
 Get NPEs.
 

Static Public Attributes

static const int NUMBER_OF_PDFS = 2
 
static const JPDFType_t pdf_t [NUMBER_OF_PDFS]
 PDF types.
 

Private Attributes

JNPEs_t _npe
 PDFs.
 

Detailed Description

Template specialisation for storage of PDF tables.

Definition at line 344 of file JShower3EZRegressor.hh.

Member Typedef Documentation

◆ JFunction1D_t

◆ JPDFMaplist_t

◆ JPDF_t

◆ JNPEMaplist_t

◆ JNPE_t

◆ JNPEs_t

Constructor & Destructor Documentation

◆ JRegressorStorage() [1/2]

JFIT::JRegressorStorage< JShower3EZ, JGandalf >::JRegressorStorage ( )
inline

Default constructor.

Definition at line 367 of file JShower3EZRegressor.hh.

368 {}

◆ JRegressorStorage() [2/2]

JFIT::JRegressorStorage< JShower3EZ, JGandalf >::JRegressorStorage ( const std::string & fileDescriptor)
inline

Parameterized constructor.

The PDF file descriptor should contain the wild card character JPHYSICS::WILDCARD which will be replaced by the corresponding PDF types listed in JRegressorStorage<JShower3Z, JGandalf>::pdf_t.

Parameters
fileDescriptorPDF file descriptor

Definition at line 379 of file JShower3EZRegressor.hh.

380 {
381 using namespace std;
382 using namespace JPP;
383
384 const JPDF_t::JSupervisor supervisor(new JPDF_t::JDefaultResult(JMATH::zero));
385
386 for (int i = 0; i != NUMBER_OF_PDFS; ++i) {
387
388 const string file_name = getFilename(fileDescriptor, pdf_t[i]);
389
390 JPDF_t _pdf;
391 _pdf.load(file_name.c_str());
392
393 _pdf.setExceptionHandler(supervisor);
394
395 _npe[i] = JNPE_t(_pdf);
396
397 }
398
399 // Add PDFs
400 for (int i = 1; i < NUMBER_OF_PDFS; i += 2) {
401
402 _npe[ i ].add(_npe[i-1]);
403
404 JNPE_t buffer;
405
406 _npe[i-1].swap(buffer);
407 }
408 }
static const JZero zero
Function object to assign zero value.
Definition JZero.hh:105
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
static const JPDFType_t pdf_t[NUMBER_OF_PDFS]
PDF types.
JPHYSICS::JPDFTable< JFunction1D_t, JPDFMaplist_t > JPDF_t
JPHYSICS::JNPETable< double, double, JNPEMaplist_t > JNPE_t
void load(const char *file_name)
Load from input file.

Member Function Documentation

◆ getNPE()

const JNPEs_t & JFIT::JRegressorStorage< JShower3EZ, JGandalf >::getNPE ( ) const
inline

Get NPEs.

Returns
PDFs

Definition at line 416 of file JShower3EZRegressor.hh.

417 {
418 return _npe;
419 }

Member Data Documentation

◆ NUMBER_OF_PDFS

const int JFIT::JRegressorStorage< JShower3EZ, JGandalf >::NUMBER_OF_PDFS = 2
static

Definition at line 360 of file JShower3EZRegressor.hh.

◆ pdf_t

PDF types.

Definition at line 424 of file JShower3EZRegressor.hh.

◆ _npe

PDFs.

Definition at line 427 of file JShower3EZRegressor.hh.


The documentation for this struct was generated from the following file: