Jpp
18.1.0
the software that should make you happy
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
examples
JDetector
JTransitTimeProbablity.cc
Go to the documentation of this file.
1
2
#include <string>
3
#include <iostream>
4
#include <iomanip>
5
6
#include "
JDetector/JTimeRange.hh
"
7
#include "
JDetector/JPMTTransitTimeGenerator.hh
"
8
9
#include "
Jeep/JParser.hh
"
10
#include "
Jeep/JMessage.hh
"
11
12
13
/**
14
* \file
15
*
16
* Example program to determine PMT transit time probability.
17
* \author mdejong
18
*/
19
int
main
(
int
argc,
char
**argv)
20
{
21
using namespace
std;
22
using namespace
JPP;
23
24
JTimeRange
T_ns;
25
int
debug
;
26
27
try
{
28
29
JParser<>
zap(
"Example program to determine PMT transit time probability."
);
30
31
zap[
'T'
] =
make_field
(T_ns);
32
zap[
'd'
] =
make_field
(
debug
) = 3;
33
34
zap(argc, argv);
35
}
36
catch
(
const
exception &error) {
37
FATAL
(error.what() << endl);
38
}
39
40
41
const
double
Plower =
getTransitionTime
.
getProbability
(T_ns.getLowerLimit());
42
const
double
Pupper =
getTransitionTime
.
getProbability
(T_ns.getUpperLimit());
43
44
NOTICE
(
"Lower probability "
<< Plower << endl);
45
NOTICE
(
"Upper probability "
<< Pupper << endl);
46
}
JPARSER::JParser
Utility class to parse command line options.
Definition:
JParser.hh:1514
main
int main(int argc, char *argv[])
Definition:
Main.cc:15
JDETECTOR::getTransitionTime
JDETECTOR::getTransitionTime getTransitionTime
Function object to generate transition time.
make_field
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Definition:
JParser.hh:1989
NOTICE
#define NOTICE(A)
Definition:
JMessage.hh:64
JDETECTOR::JTransitionTimeGenerator_t::getProbability
double getProbability(const double t_ns) const
Get integrated probablity from to given time.
Definition:
JPMTTransitTimeGenerator.hh:37
JMessage.hh
General purpose messaging.
FATAL
#define FATAL(A)
Definition:
JMessage.hh:67
JPMTTransitTimeGenerator.hh
JParser.hh
Utility class to parse command line options.
debug
int debug
debug level
Definition:
archive-put-wiki-detectors.sh:92
JACOUSTICS::JTimeRange
JTOOLS::JRange< double > JTimeRange
Type definition for time range (unit [s]).
Definition:
JAcoustics/JTimeRange.hh:19
JTimeRange.hh
Generated by
1.8.5