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

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

#include <JLine3ZRegressor.hh>

Public Types

typedef JTOOLS::JSplineFunction1S_t JFunction1D_t
 
typedef JTOOLS::JMAPLIST< JTOOLS::JPolint1FunctionalMap, JTOOLS::JPolint0FunctionalGridMap, JTOOLS::JPolint0FunctionalGridMap >::maplist JPDFMaplist_t
 
typedef JPHYSICS::JPDFTable< JFunction1D_t, JPDFMaplist_tJPDF_t
 time dependent PDF
 
typedef JTOOLS::JMAPLIST< JTOOLS::JPolint1FunctionalMapH, JTOOLS::JPolint1FunctionalGridMap, JTOOLS::JPolint1FunctionalGridMap >::maplist JNPEMaplist_t
 
typedef JPHYSICS::JNPETable< double, double, JNPEMaplist_tJNPE_t
 time integrated PDF
 
typedef JPDF_t::transformer_type transformer_type
 
typedef std::array< JPDF_t, NUMBER_OF_PDFSJPDFs_t
 PDFs.
 
typedef std::array< JNPE_t, NUMBER_OF_PDFSJNPEs_t
 NPEs.
 

Public Member Functions

 JRegressorStorage ()
 Default constructor.
 
 JRegressorStorage (const std::string &fileDescriptor, const JTimeRange &T_ns, const double TTS_ns, const int numberOfPoints=25, const double epsilon=1.0e-10)
 Constructor.
 
const JPDFs_tgetPDF () const
 Get PDFs.
 
const JNPEs_tgetNPE () const
 Get NPEs.
 
void transform (const transformer_type &transformer)
 Transform PDFs and NPEs.
 

Public Attributes

JTimeRange T_ns
 Time window with respect to Cherenkov hypothesis [ns].
 

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

JPDFs_t _pdf
 PDFs.
 
JNPEs_t _npe
 NPEs.
 

Detailed Description

Template specialisation for storage of PDF tables.

Definition at line 112 of file JLine3ZRegressor.hh.

Member Typedef Documentation

◆ JFunction1D_t

◆ JPDFMaplist_t

◆ JPDF_t

time dependent PDF

Definition at line 118 of file JLine3ZRegressor.hh.

◆ JNPEMaplist_t

◆ JNPE_t

time integrated PDF

Definition at line 123 of file JLine3ZRegressor.hh.

◆ transformer_type

Definition at line 125 of file JLine3ZRegressor.hh.

◆ JPDFs_t

◆ JNPEs_t

Constructor & Destructor Documentation

◆ JRegressorStorage() [1/2]

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

Default constructor.

Definition at line 136 of file JLine3ZRegressor.hh.

137 {}

◆ JRegressorStorage() [2/2]

JFIT::JRegressorStorage< JLine3Z, JGandalf >::JRegressorStorage ( const std::string & fileDescriptor,
const JTimeRange & T_ns,
const double TTS_ns,
const int numberOfPoints = 25,
const double epsilon = 1.0e-10 )
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<JLine3Z, JGandalf>::pdf_t.

The TTS_ns corresponds to the additional time smearing applied to the PDFs.

Parameters
fileDescriptorPDF file descriptor
T_nstime range [ns]
TTS_nsTTS [ns]
numberOfPointsnumber of points for Gauss-Hermite integration of TTS
epsilonprecision for Gauss-Hermite integration of TTS

Definition at line 154 of file JLine3ZRegressor.hh.

158 :
159 T_ns(T_ns)
160 {
161 using namespace std;
162 using namespace JPP;
163
164 const JPDF_t::JSupervisor supervisor(new JPDF_t::JDefaultResult(JMATH::zero));
165
166 for (int i = 0; i != NUMBER_OF_PDFS; ++i) {
167
168 const string file_name = getFilename(fileDescriptor, pdf_t[i]);
169
170 _pdf[i].load(file_name.c_str());
171
172 _pdf[i].setExceptionHandler(supervisor);
173 }
174
175 // Add PDFs
176
177 for (int i = 1; i < NUMBER_OF_PDFS; i += 2) {
178
179 _pdf[ i ].add(_pdf[i-1]);
180
181 JPDF_t buffer;
182
183 _pdf[i-1].swap(buffer);
184
185 if (TTS_ns > 0.0) {
186 _pdf[i].blur(TTS_ns, numberOfPoints, epsilon);
187 }
188
189 _npe[ i ] = JNPE_t(_pdf[i]);
190 }
191 }
int numberOfPoints
Definition JResultPDF.cc:22
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).
JPHYSICS::JNPETable< double, double, JNPEMaplist_t > JNPE_t
time integrated PDF
static const JPDFType_t pdf_t[NUMBER_OF_PDFS]
PDF types.
JPHYSICS::JPDFTable< JFunction1D_t, JPDFMaplist_t > JPDF_t
time dependent PDF
JTimeRange T_ns
Time window with respect to Cherenkov hypothesis [ns].
static const int NUMBER_OF_PDFS
Number of PDFs.

Member Function Documentation

◆ getPDF()

const JPDFs_t & JFIT::JRegressorStorage< JLine3Z, JGandalf >::getPDF ( ) const
inline

Get PDFs.

Returns
PDFs

Definition at line 199 of file JLine3ZRegressor.hh.

200 {
201 return _pdf;
202 }

◆ getNPE()

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

Get NPEs.

Returns
NPEs

Definition at line 210 of file JLine3ZRegressor.hh.

211 {
212 return _npe;
213 }

◆ transform()

void JFIT::JRegressorStorage< JLine3Z, JGandalf >::transform ( const transformer_type & transformer)
inline

Transform PDFs and NPEs.

Parameters
transformertransformer

Definition at line 221 of file JLine3ZRegressor.hh.

222 {
223 for (int i = 0; i != NUMBER_OF_PDFS; ++i) {
224 _pdf[i].transform(transformer);
225 _npe[i].transform(transformer);
226 }
227 }

Member Data Documentation

◆ NUMBER_OF_PDFS

const int JFIT::JRegressorStorage< JLine3Z, JGandalf >::NUMBER_OF_PDFS = 6
static

Number of PDFs.

Definition at line 127 of file JLine3ZRegressor.hh.

◆ pdf_t

PDF types.

Definition at line 233 of file JLine3ZRegressor.hh.

◆ T_ns

Time window with respect to Cherenkov hypothesis [ns].

Definition at line 235 of file JLine3ZRegressor.hh.

◆ _pdf

PDFs.

Definition at line 238 of file JLine3ZRegressor.hh.

◆ _npe

NPEs.

Definition at line 239 of file JLine3ZRegressor.hh.


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