Jpp  debug
the software that should make you happy
Public Types | Public Member Functions | Static Public Attributes | Private Attributes | List of all members
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 > JFIT::JRegressor< 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 More...
 
typedef JTOOLS::JMAPLIST< JTOOLS::JPolint1FunctionalMapH, JTOOLS::JPolint1FunctionalGridMap, JTOOLS::JPolint1FunctionalGridMap >::maplist JNPEMaplist_t
 
typedef JPHYSICS::JNPETable< double, double, JNPEMaplist_tJNPE_t
 time integrated PDF More...
 
typedef JPDF_t::transformer_type transformer_type
 
typedef std::array< JPDF_t, NUMBER_OF_PDFSJPDFs_t
 PDFs. More...
 
typedef std::array< JNPE_t, NUMBER_OF_PDFSJNPEs_t
 NPEs. More...
 

Public Member Functions

 JRegressorStorage ()
 Default constructor. More...
 
 JRegressorStorage (const std::string &fileDescriptor, const double TTS, const int numberOfPoints=25, const double epsilon=1.0e-10)
 Constructor. More...
 
const JPDFs_tgetPDF () const
 Get PDFs. More...
 
const JNPEs_tgetNPE () const
 Get NPEs. More...
 
void transform (const transformer_type &transformer)
 Transform PDFs and NPEs. More...
 
void setRmax (const double Rmax)
 Set maximal road width of PDF. More...
 

Static Public Attributes

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

Private Attributes

JPDFs_t _pdf
 PDFs. More...
 
JNPEs_t _npe
 NPEs. More...
 

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

Definition at line 60 of file JRegressorHelper.hh.

◆ JPDF_t

time dependent PDF

Definition at line 61 of file JRegressorHelper.hh.

◆ JNPEMaplist_t

Definition at line 65 of file JRegressorHelper.hh.

◆ 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]

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
const double epsilon
Definition: JQuadrature.cc:21
std::string getFilename(const std::string &file_name)
Get file name part, i.e. part after last JEEP::PATHNAME_SEPARATOR if any.
Definition: JeepToolkit.hh:128
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).
Definition: JSTDTypes.hh:14
static const JPDFType_t pdf_t[NUMBER_OF_PDFS]
PDF types.
static const int NUMBER_OF_PDFS
Number of PDFs.
JPHYSICS::JPDFTable< JFunction1D_t, JPDFMaplist_t > JPDF_t
time dependent PDF
JPHYSICS::JNPETable< double, double, JNPEMaplist_t > JNPE_t
time integrated PDF

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

const JPDFType_t JFIT::JRegressorHelper< JLine3Z, JGandalf >::pdf_t
staticinherited
Initial value:
@ SCATTERED_LIGHT_FROM_DELTARAYS
scattered light from delta-rays
Definition: JPDFTypes.hh:33
@ DIRECT_LIGHT_FROM_EMSHOWERS
direct light from EM showers
Definition: JPDFTypes.hh:29
@ SCATTERED_LIGHT_FROM_EMSHOWERS
scattered light from EM showers
Definition: JPDFTypes.hh:30
@ SCATTERED_LIGHT_FROM_MUON
scattered light from muon
Definition: JPDFTypes.hh:27
@ DIRECT_LIGHT_FROM_DELTARAYS
direct light from delta-rays
Definition: JPDFTypes.hh:32
@ DIRECT_LIGHT_FROM_MUON
direct light from muon
Definition: JPDFTypes.hh:26

PDF types.

Definition at line 79 of file JRegressorHelper.hh.


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