Jpp  18.5.0
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Public Attributes | List of all members
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_t
JPDF_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. More...
 
result_type calculate (const double E, const double R, const double theta, const double phi, const double t1) const
 Get PDF. More...
 

Public Attributes

JPDF_t pdf
 PDF. More...
 
int type
 PDF type. More...
 

Detailed Description

Auxiliary data structure for muon PDF.

Definition at line 26 of file JPDF_t.hh.

Member Typedef Documentation

Definition at line 30 of file JPDF_t.hh.

Definition at line 34 of file JPDF_t.hh.

Definition at line 35 of file JPDF_t.hh.

Definition at line 36 of file JPDF_t.hh.

Constructor & Destructor Documentation

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 
74 
75  cout << "OK" << endl;
76 
77  } else if (TTS < 0.0) {
78 
79  THROW(JValueOutOfRange, "Illegal value of TTS [ns]: " << TTS);
80  }
81  }
void load(const char *file_name)
Load from input file.
JPDF_t pdf
PDF.
Definition: JPDF_t.hh:127
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
Definition: JException.hh:712
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
static const JZero zero
Function object to assign zero value.
Definition: JZero.hh:105
int getPDFType(const std::string &file_name)
Get PDF type.
Definition: JPDFTypes.hh:77
void setExceptionHandler(const typename function_type::supervisor_type &supervisor)
Set the supervisor for handling of exceptions.
int numberOfPoints
Definition: JResultPDF.cc:22
int type
PDF type.
Definition: JPDF_t.hh:128
const double epsilon
Definition: JQuadrature.cc:21

Member Function Documentation

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  }
then usage $script< input file >[option[primary[working directory]]] nWhere option can be E
Definition: JMuonPostfit.sh:40
JPDF_t pdf
PDF.
Definition: JPDF_t.hh:127
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
then JCookie sh JDataQuality D $DETECTOR_ID R
Definition: JDataQuality.sh:41
bool is_deltarays(const int pdf)
Test if given PDF type corresponds to Cherenkov light from delta-rays.
Definition: JPDFTypes.hh:151
double getDeltaRaysFromMuon(const double E)
Equivalent EM-shower energy due to delta-rays per unit muon track length.
Definition: JPDFToolkit.hh:67
int type
PDF type.
Definition: JPDF_t.hh:128

Member Data Documentation

JPDF_t JPDF::pdf

PDF.

Definition at line 127 of file JPDF_t.hh.

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: