Jpp
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Public Attributes | List of all members
JMuonPDF_t Struct Reference

#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

 JMuonPDF_t (const std::string &fileDescriptor, 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 pdfA
 PDF for minimum ionisong particle. More...
 
JPDF_t pdfB
 PDF for average energy losses. More...
 
JPDF_t pdfC
 PDF for delta-rays. More...
 

Detailed Description

Definition at line 22 of file JPDF_t.hh.

Member Typedef Documentation

Definition at line 26 of file JPDF_t.hh.

Definition at line 30 of file JPDF_t.hh.

Definition at line 31 of file JPDF_t.hh.

Definition at line 32 of file JPDF_t.hh.

Constructor & Destructor Documentation

JMuonPDF_t::JMuonPDF_t ( 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::WILD_CARD.
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 46 of file JPDF_t.hh.

50  {
51  using namespace std;
52  using namespace JPP;
53 
54  const JPDFType_t pdf_t[] = { DIRECT_LIGHT_FROM_MUON,
60 
61  const int N = sizeof(pdf_t) / sizeof(pdf_t[0]);
62 
63  JPDF_t pdf[N];
64 
65  const JPDF_t::JSupervisor supervisor(new JPDF_t::JDefaultResult(zero));
66 
67  for (int i = 0; i != N; ++i) {
68 
69  const string file_name = getFilename(fileDescriptor, pdf_t[i]);
70 
71  cout << "loading input from file " << file_name << "... " << flush;
72 
73  pdf[i].load(file_name.c_str());
74 
75  pdf[i].setExceptionHandler(supervisor);
76 
77  cout << "OK" << endl;
78  }
79 
80  // Add PDFs
81 
82  cout << "adding PDFs... " << flush;
83 
84  pdfA = pdf[1]; pdfA.add(pdf[0]);
85  pdfB = pdf[3]; pdfB.add(pdf[2]);
86  pdfC = pdf[5]; pdfC.add(pdf[4]);
87 
88  cout << "OK" << endl;
89 
90  if (TTS > 0.0) {
91 
92  cout << "bluring PDFs... " << flush;
93 
94  pdfA.blur(TTS, numberOfPoints, epsilon);
95  pdfB.blur(TTS, numberOfPoints, epsilon);
96  pdfC.blur(TTS, numberOfPoints, epsilon);
97 
98  cout << "OK" << endl;
99 
100  } else if (TTS < 0.0) {
101 
102  THROW(JValueOutOfRange, "Illegal value of TTS [ns]: " << TTS);
103  }
104  }
JPP::JPDFTable< JFunction1D_t, JPDFMaplist_t > JPDF_t
Definition: JPDF_t.hh:31
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
Definition: JException.hh:670
direct light from EM showers
Definition: JPDFTypes.hh:32
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:110
static const JZero zero
Function object to assign zero value.
Definition: JZero.hh:105
direct light from muon
Definition: JPDFTypes.hh:29
scattered light from muon
Definition: JPDFTypes.hh:30
JPDF_t pdfB
PDF for average energy losses.
Definition: JPDF_t.hh:147
void add(const JMultiFunction_t &input)
Add function.
scattered light from delta-rays
Definition: JPDFTypes.hh:36
scattered light from EM showers
Definition: JPDFTypes.hh:33
JPDFType_t
PDF types.
Definition: JPDFTypes.hh:27
JPDF_t pdfC
PDF for delta-rays.
Definition: JPDF_t.hh:148
direct light from delta-rays
Definition: JPDFTypes.hh:35
int numberOfPoints
Definition: JResultPDF.cc:22
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:88
JPDF_t pdfA
PDF for minimum ionisong particle.
Definition: JPDF_t.hh:146
then usage $script[input file[working directory[option]]] nWhere option can be N
Definition: JMuonPostfit.sh:37

Member Function Documentation

result_type JMuonPDF_t::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 120 of file JPDF_t.hh.

125  {
126  using namespace JPP;
127 
128  result_type h1 = (pdfA(R, theta, phi, t1) +
129  pdfB(R, theta, phi, t1) * E +
130  pdfC(R, theta, phi, t1) * getDeltaRaysFromMuon(E));
131 
132  // safety measures
133 
134  if (h1.f <= 0.0) {
135  h1.f = 0.0;
136  h1.fp = 0.0;
137  }
138 
139  if (h1.v <= 0.0) {
140  h1.v = 0.0;
141  }
142 
143  return h1;
144  }
then for HISTOGRAM in h0 h1
Definition: JMatrixNZ.sh:69
JFunction1D_t::result_type result_type
Definition: JPDF_t.hh:32
JPDF_t pdfB
PDF for average energy losses.
Definition: JPDF_t.hh:147
then usage $script[distance] fi case set_variable R
Definition: JDrawLED.sh:40
JPDF_t pdfC
PDF for delta-rays.
Definition: JPDF_t.hh:148
double getDeltaRaysFromMuon(const double E)
Equivalent EM-shower energy due to delta-rays per unit muon track length.
Definition: JPDFToolkit.hh:75
JPDF_t pdfA
PDF for minimum ionisong particle.
Definition: JPDF_t.hh:146
then usage $script[input file[working directory[option]]] nWhere option can be E
Definition: JMuonPostfit.sh:37

Member Data Documentation

JPDF_t JMuonPDF_t::pdfA

PDF for minimum ionisong particle.

Definition at line 146 of file JPDF_t.hh.

JPDF_t JMuonPDF_t::pdfB

PDF for average energy losses.

Definition at line 147 of file JPDF_t.hh.

JPDF_t JMuonPDF_t::pdfC

PDF for delta-rays.

Definition at line 148 of file JPDF_t.hh.


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