Jpp 20.0.0-rc.9-29-gccc23c492-D
the software that should make you happy
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Public Attributes | Static Public Attributes | Private Attributes | List of all members
JFIT::JRegressorStorage< JEnergy > Struct Reference

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

#include <JEnergyRegressor.hh>

Inheritance diagram for JFIT::JRegressorStorage< JEnergy >:
JFIT::JRegressor< JEnergy >

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 &T_ns=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.
 

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

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

typedef JTOOLS::JMAPLIST<JTOOLS::JPolint1FunctionalMap,JTOOLS::JPolint1FunctionalGridMap,JTOOLS::JPolint1FunctionalGridMap>::maplist JFIT::JRegressorStorage< JEnergy >::JNPEMaplist_t

Definition at line 55 of file JEnergyRegressor.hh.

◆ JNPE_t

typedef JPHYSICS::JNPETable<double, double, JNPEMaplist_t> JFIT::JRegressorStorage< JEnergy >::JNPE_t

time integrated PDF

Definition at line 56 of file JEnergyRegressor.hh.

◆ JNPEs_t

typedef std::vector<JNPE_t> JFIT::JRegressorStorage< JEnergy >::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 & T_ns = 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
T_nstime range [ns]

Definition at line 79 of file JEnergyRegressor.hh.

79 :
80 T_ns(T_ns)
81 {
82 using namespace std;
83 using namespace JPP;
84
85 typedef JSplineFunction1D_t JFunction1D_t;
86 typedef JPDFTable<JFunction1D_t, JNPEMaplist_t> JPDF_t;
87
88 const JPDF_t::JSupervisor supervisor(new JPDF_t::JDefaultResult(JMATH::zero));
89
90 for (int i = 0; i != NUMBER_OF_PDFS; ++i) {
91
92 JPDF_t pdf;
93
94 const JPDFType_t type = pdf_t[i];
95 const string file_name = getFilename(fileDescriptor, type);
96
97 pdf.load(file_name.c_str());
98
99 pdf.setExceptionHandler(supervisor);
100
101 if (is_bremsstrahlung(type))
102 _YB.push_back(JNPE_t(pdf, T_ns));
103 else if (is_deltarays(type))
104 _YA.push_back(JNPE_t(pdf, T_ns));
105 else
106 _Y1.push_back(JNPE_t(pdf, T_ns));
107 }
108
109 // Add PDFs
110
111 if (_Y1.size() == 2) { _Y1[1].add(_Y1[0]); _Y1.erase(_Y1.begin()); }
112 if (_YA.size() == 2) { _YA[1].add(_YA[0]); _YA.erase(_YA.begin()); }
113 if (_YB.size() == 2) { _YB[1].add(_YB[0]); _YB.erase(_YB.begin()); }
114 }
JNPEs_t _YB
light from EM showers
JPHYSICS::JNPETable< double, double, JNPEMaplist_t > JNPE_t
time integrated PDF
JNPEs_t _YA
light from delta-rays
static const int NUMBER_OF_PDFS
Number of PDFs.
static const JPDFType_t pdf_t[NUMBER_OF_PDFS]
PDF types.
JTimeRange T_ns
Time window with respect to Cherenkov hypothesis [ns].

Member Function Documentation

◆ getY1()

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

Get light from muon.

Returns
NPEs

Definition at line 122 of file JEnergyRegressor.hh.

123 {
124 return _Y1;
125 }

◆ getYA()

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

Get light from delta-rays.

Returns
NPEs

Definition at line 133 of file JEnergyRegressor.hh.

134 {
135 return _YA;
136 }

◆ getYB()

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

Get light from EM showers.

Returns
NPEs

Definition at line 144 of file JEnergyRegressor.hh.

145 {
146 return _YB;
147 }

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

const JPDFType_t JFIT::JRegressorStorage< JEnergy >::pdf_t
static
Initial value:
= { DIRECT_LIGHT_FROM_MUON,
SCATTERED_LIGHT_FROM_MUON,
DIRECT_LIGHT_FROM_DELTARAYS,
SCATTERED_LIGHT_FROM_DELTARAYS,
DIRECT_LIGHT_FROM_EMSHOWERS,
SCATTERED_LIGHT_FROM_EMSHOWERS }

PDF types.

Definition at line 153 of file JEnergyRegressor.hh.

◆ T_ns

JTimeRange JFIT::JRegressorStorage< JEnergy >::T_ns

Time window with respect to Cherenkov hypothesis [ns].

Definition at line 155 of file JEnergyRegressor.hh.

◆ _Y1

light from muon

Definition at line 158 of file JEnergyRegressor.hh.

◆ _YA

light from delta-rays

Definition at line 159 of file JEnergyRegressor.hh.

◆ _YB

light from EM showers

Definition at line 160 of file JEnergyRegressor.hh.


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