Jpp test-rotations-old
the software that should make you happy
Loading...
Searching...
No Matches
JPDF Struct Reference

Auxiliary data structure for muon PDF. More...

#include <JPDF_t.hh>

Public Types

typedef JPP::JSplineFunction1D< JPP::JSplineElement2S< double, double >, JPP::JCollection, JPP::JResultPDF< double > > JFunction1D_t
 
typedef JPP::JMAPLIST< JPP::JPolint1FunctionalMap, JPP::JPolint0FunctionalGridMap, JPP::JPolint0FunctionalGridMap >::maplist JPDFMaplist_t
 
typedef JPP::JPDFTable< JFunction1D_t, JPDFMaplist_tJPDF_t
 
typedef JFunction1D_t::result_type result_type
 

Public Member Functions

 JPDF (const std::string &file_name, const double TTS, const int numberOfPoints=25, const double epsilon=1.0e-10)
 Constructor.
 
result_type calculate (const double E, const double R, const double theta, const double phi, const double t1) const
 Get PDF.
 

Public Attributes

JPDF_t pdf
 PDF.
 
int type
 PDF type.
 

Detailed Description

Auxiliary data structure for muon PDF.

Definition at line 26 of file JPDF_t.hh.

Member Typedef Documentation

◆ JFunction1D_t

◆ JPDFMaplist_t

◆ JPDF_t

◆ result_type

Constructor & Destructor Documentation

◆ JPDF()

JPDF::JPDF ( const std::string & file_name,
const double TTS,
const int numberOfPoints = 25,
const double epsilon = 1.0e-10 )
inline

Constructor.

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

Parameters
file_namefile name
TTSTTS [ns]
numberOfPointsnumber of points for Gauss-Hermite integration of TTS
epsilonprecision for Gauss-Hermite integration of TTS

Definition at line 49 of file JPDF_t.hh.

53 {
54 using namespace std;
55 using namespace JPP;
56
57 const JPDF_t::JSupervisor supervisor(new JPDF_t::JDefaultResult(zero));
58
59 cout << "loading input from file " << file_name << "... " << flush;
60
61 pdf.load(file_name.c_str());
62
63 pdf.setExceptionHandler(supervisor);
64
65 cout << "OK" << endl;
66
67 type = getPDFType(file_name);
68
69 if (TTS > 0.0) {
70
71 cout << "bluring PDFs... " << flush;
72
73 pdf.blur(TTS, numberOfPoints, epsilon);
74
75 cout << "OK" << endl;
76
77 } else if (TTS < 0.0) {
78
79 THROW(JValueOutOfRange, "Illegal value of TTS [ns]: " << TTS);
80 }
81 }
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
int numberOfPoints
Definition JResultPDF.cc:22
Exception for accessing a value in a collection that is outside of its range.
void blur(const double TTS, const int numberOfPoints=25, const double epsilon=1.0e-10, const double quantile=0.99)
Blur PDF.
Definition JPDFTable.hh:111
void setExceptionHandler(const typename function_type::supervisor_type &supervisor)
Set the supervisor for handling of exceptions.
int getPDFType(const std::string &file_name)
Get PDF type.
Definition JPDFTypes.hh:77
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
void load(const char *file_name)
Load from input file.
JPDF_t pdf
PDF.
Definition JPDF_t.hh:127
int type
PDF type.
Definition JPDF_t.hh:128

Member Function Documentation

◆ calculate()

result_type JPDF::calculate ( const double E,
const double R,
const double theta,
const double phi,
const double t1 ) const
inline

Get PDF.

The orientation of the PMT should be defined according this documentation.
In this, the zenith and azimuth angles are limited to

\[\left[0, \pi\right]\]

.

Parameters
Emuon energy at minimum distance of approach [GeV]
Rminimum distance of approach [m]
thetaPMT zenith angle [rad]
phiPMT azimuth angle [rad]
t1arrival time relative to Cherenkov hypothesis [ns]
Returns
hypothesis value

Definition at line 97 of file JPDF_t.hh.

102 {
103 using namespace JPP;
104
105 result_type h1 = pdf(R, theta, phi, t1);
106
107 if (is_bremsstrahlung(type)) {
108 h1 *= E;
109 } else if (is_deltarays(type)) {
110 h1 *= getDeltaRaysFromMuon(E);
111 }
112
113 // safety measures
114
115 if (h1.f <= 0.0) {
116 h1.f = 0.0;
117 h1.fp = 0.0;
118 }
119
120 if (h1.v <= 0.0) {
121 h1.v = 0.0;
122 }
123
124 return h1;
125 }
double getDeltaRaysFromMuon(const double E, const JRange< double > T_GeV=JRange< double >(DELTARAY_TMIN, DELTARAY_TMAX))
Equivalent EM-shower energy due to delta-rays per unit muon track length.
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
JFunction1D_t::result_type result_type
Definition JPDF_t.hh:36

Member Data Documentation

◆ pdf

JPDF_t JPDF::pdf

PDF.

Definition at line 127 of file JPDF_t.hh.

◆ type

int JPDF::type

PDF type.

Definition at line 128 of file JPDF_t.hh.


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