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

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

#include <JRegressorHelper.hh>

Inheritance diagram for JFIT::JRegressorStorage< JLine3Z, JGandalf >:
JFIT::JRegressorHelper< JLine3Z, JGandalf >

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 double TTS, 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.
 
void setRmax (const double Rmax)
 Set maximal road width of PDF.
 

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 for PDF tables.

Definition at line 106 of file JRegressorHelper.hh.

Member Typedef Documentation

◆ JFunction1D_t

Definition at line 57 of file JRegressorHelper.hh.

◆ JPDFMaplist_t

◆ JPDF_t

time dependent PDF

Definition at line 61 of file JRegressorHelper.hh.

◆ JNPEMaplist_t

◆ JNPE_t

time integrated PDF

Definition at line 66 of file JRegressorHelper.hh.

◆ transformer_type

Definition at line 68 of file JRegressorHelper.hh.

◆ JPDFs_t

PDFs.

Definition at line 72 of file JRegressorHelper.hh.

◆ JNPEs_t

NPEs.

Definition at line 73 of file JRegressorHelper.hh.

Constructor & Destructor Documentation

◆ JRegressorStorage() [1/2]

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

Default constructor.

Definition at line 112 of file JRegressorHelper.hh.

113 {}

◆ JRegressorStorage() [2/2]

JFIT::JRegressorStorage< JLine3Z, JGandalf >::JRegressorStorage ( const std::string & fileDescriptor,
const double TTS,
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 corresponding PDF types listed in JRegressor<JLine3Z, JGandalf>::pdf_t.

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

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

Definition at line 129 of file JRegressorHelper.hh.

133 {
134 using namespace std;
135 using namespace JPP;
136
137 const JPDF_t::JSupervisor supervisor(new JPDF_t::JDefaultResult(JMATH::zero));
138
139 for (int i = 0; i != NUMBER_OF_PDFS; ++i) {
140
141 const string file_name = getFilename(fileDescriptor, pdf_t[i]);
142
143 _pdf[i].load(file_name.c_str());
144
145 _pdf[i].setExceptionHandler(supervisor);
146 }
147
148 // Add PDFs
149
150 for (int i = 1; i < NUMBER_OF_PDFS; i += 2) {
151
152 _pdf[ i ].add(_pdf[i-1]);
153
154 JPDF_t buffer;
155
156 _pdf[i-1].swap(buffer);
157
158 if (TTS > 0.0) {
159 _pdf[i].blur(TTS, numberOfPoints, epsilon);
160 }
161
162 _npe[ i ] = JNPE_t(_pdf[i]);
163 }
164 }
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
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 172 of file JRegressorHelper.hh.

173 {
174 return _pdf;
175 }

◆ getNPE()

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

Get NPEs.

Returns
NPEs

Definition at line 183 of file JRegressorHelper.hh.

184 {
185 return _npe;
186 }

◆ transform()

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

Transform PDFs and NPEs.

Parameters
transformertransformer

Definition at line 194 of file JRegressorHelper.hh.

195 {
196 for (int i = 0; i != NUMBER_OF_PDFS; ++i) {
197 _pdf[i].transform(transformer);
198 _npe[i].transform(transformer);
199 }
200 }

◆ setRmax()

void JFIT::JRegressorStorage< JLine3Z, JGandalf >::setRmax ( const double Rmax)
inline

Set maximal road width of PDF.

Parameters
Rmaxroad width [m]

Definition at line 208 of file JRegressorHelper.hh.

209 {
211
212 for (int i = 0; i != NUMBER_OF_PDFS; ++i) {
213 if (!_pdf[i].empty()) {
214 _pdf[i].compress(range);
215 }
216 }
217 }
Range of values.
Definition JRange.hh:42

Member Data Documentation

◆ _pdf

PDFs.

Definition at line 221 of file JRegressorHelper.hh.

◆ _npe

NPEs.

Definition at line 222 of file JRegressorHelper.hh.

◆ NUMBER_OF_PDFS

const int JFIT::JRegressorHelper< JLine3Z, JGandalf >::NUMBER_OF_PDFS = 6
staticinherited

Number of PDFs.

Definition at line 70 of file JRegressorHelper.hh.

◆ pdf_t

PDF types.

Definition at line 79 of file JRegressorHelper.hh.


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