Jpp test-rotations-old
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 &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

◆ 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 & 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;
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 }
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.
JTimeRange T_ns
Time window with respect to Cherenkov hypothesis [ns].
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 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

PDF types.

Definition at line 153 of file JEnergyRegressor.hh.

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