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

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

#include <JEnergyRegressor.hh>

Public Types

typedef JTOOLS::JMAPLIST< JTOOLS::JPolint1FunctionalMap, JTOOLS::JPolint1FunctionalGridMap, JTOOLS::JPolint1FunctionalGridMap >::maplist JNPEMaplist_t
 
typedef JPHYSICS::JNPETable< double, double, JNPEMaplist_tJNPE_t
 time integrated PDF
 
typedef std::vector< JNPE_tJNPEs_t
 NPEs.
 

Public Member Functions

 JRegressorStorage ()
 Default constructor.
 
 JRegressorStorage (const std::string &fileDescriptor, const JTimeRange &range=JTimeRange())
 Constructor.
 
const JNPEs_tgetY1 () const
 Get light from muon.
 
const JNPEs_tgetYA () const
 Get light from delta-rays.
 
const JNPEs_tgetYB () const
 Get light from EM showers.
 

Static Public Attributes

static const int NUMBER_OF_PDFS = 6
 Number of PDFs.
 
static const JPDFType_t pdf_t [NUMBER_OF_PDFS]
 PDF types.
 

Private Attributes

JNPEs_t _Y1
 light from muon
 
JNPEs_t _YA
 light from delta-rays
 
JNPEs_t _YB
 light from EM showers
 

Detailed Description

Template specialisation for storage of PDF tables.

Definition at line 51 of file JEnergyRegressor.hh.

Member Typedef Documentation

◆ JNPEMaplist_t

◆ JNPE_t

time integrated PDF

Definition at line 56 of file JEnergyRegressor.hh.

◆ JNPEs_t

NPEs.

Definition at line 60 of file JEnergyRegressor.hh.

Constructor & Destructor Documentation

◆ JRegressorStorage() [1/2]

JFIT::JRegressorStorage< JEnergy >::JRegressorStorage ( )
inline

Default constructor.

Definition at line 66 of file JEnergyRegressor.hh.

67 {}

◆ JRegressorStorage() [2/2]

JFIT::JRegressorStorage< JEnergy >::JRegressorStorage ( const std::string & fileDescriptor,
const JTimeRange & range = JTimeRange() )
inline

Constructor.

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

Parameters
fileDescriptorPDF file descriptor
rangetime range [ns]

Definition at line 79 of file JEnergyRegressor.hh.

80 {
81 using namespace std;
82 using namespace JPP;
83
84 typedef JSplineFunction1D_t JFunction1D_t;
86
87 const JPDF_t::JSupervisor supervisor(new JPDF_t::JDefaultResult(JMATH::zero));
88
89 for (int i = 0; i != NUMBER_OF_PDFS; ++i) {
90
91 JPDF_t pdf;
92
93 const JPDFType_t type = pdf_t[i];
94 const string file_name = getFilename(fileDescriptor, type);
95
96 pdf.load(file_name.c_str());
97
98 pdf.setExceptionHandler(supervisor);
99
100 if (is_bremsstrahlung(type))
101 _YB.push_back(JNPE_t(pdf, range));
102 else if (is_deltarays(type))
103 _YA.push_back(JNPE_t(pdf, range));
104 else
105 _Y1.push_back(JNPE_t(pdf, range));
106 }
107
108 // Add PDFs
109
110 if (_Y1.size() == 2) { _Y1[1].add(_Y1[0]); _Y1.erase(_Y1.begin()); }
111 if (_YA.size() == 2) { _YA[1].add(_YA[0]); _YA.erase(_YA.begin()); }
112 if (_YB.size() == 2) { _YB[1].add(_YB[0]); _YB.erase(_YB.begin()); }
113 }
Multi-dimensional PDF table for arrival time of Cherenkov light.
Definition JPDFTable.hh:44
static const JZero zero
Function object to assign zero value.
Definition JZero.hh:105
bool is_deltarays(const int pdf)
Test if given PDF type corresponds to Cherenkov light from delta-rays.
Definition JPDFTypes.hh:151
bool is_bremsstrahlung(const int pdf)
Test if given PDF type corresponds to Cherenkov light from Bremsstrahlung.
Definition JPDFTypes.hh:137
JPDFType_t
PDF types.
Definition JPDFTypes.hh:24
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
JNPEs_t _YB
light from EM showers
JNPEs_t _YA
light from delta-rays
static const JPDFType_t pdf_t[NUMBER_OF_PDFS]
PDF types.
static const int NUMBER_OF_PDFS
Number of PDFs.
JPHYSICS::JNPETable< double, double, JNPEMaplist_t > JNPE_t
time integrated PDF
Type definition of a spline interpolation method based on a JCollection with double result type.

Member Function Documentation

◆ getY1()

const JNPEs_t & JFIT::JRegressorStorage< JEnergy >::getY1 ( ) const
inline

Get light from muon.

Returns
NPEs

Definition at line 121 of file JEnergyRegressor.hh.

122 {
123 return _Y1;
124 }

◆ getYA()

const JNPEs_t & JFIT::JRegressorStorage< JEnergy >::getYA ( ) const
inline

Get light from delta-rays.

Returns
NPEs

Definition at line 132 of file JEnergyRegressor.hh.

133 {
134 return _YA;
135 }

◆ getYB()

const JNPEs_t & JFIT::JRegressorStorage< JEnergy >::getYB ( ) const
inline

Get light from EM showers.

Returns
NPEs

Definition at line 143 of file JEnergyRegressor.hh.

144 {
145 return _YB;
146 }

Member Data Documentation

◆ NUMBER_OF_PDFS

const int JFIT::JRegressorStorage< JEnergy >::NUMBER_OF_PDFS = 6
static

Number of PDFs.

Definition at line 58 of file JEnergyRegressor.hh.

◆ pdf_t

PDF types.

Definition at line 152 of file JEnergyRegressor.hh.

◆ _Y1

light from muon

Definition at line 155 of file JEnergyRegressor.hh.

◆ _YA

light from delta-rays

Definition at line 156 of file JEnergyRegressor.hh.

◆ _YB

light from EM showers

Definition at line 157 of file JEnergyRegressor.hh.


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