Jpp
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:1500
JPHYSICS::JTimeRange
JTOOLS::JRange< double > JTimeRange
Type definition for time range (unit [ns]).
Definition:
JPhysics/JTimeRange.hh:19
make_field
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Definition:
JParser.hh:1961
JDETECTOR::getTransitionTime
getTransitionTime
Function object to generate transition time.
NOTICE
#define NOTICE(A)
Definition:
JMessage.hh:64
debug
int debug
debug level
Definition:
JSirene.cc:63
JMessage.hh
General purpose messaging.
FATAL
#define FATAL(A)
Definition:
JMessage.hh:67
JPMTTransitTimeGenerator.hh
JParser.hh
Utility class to parse command line options.
JTimeRange.hh
main
int main(int argc, char *argv[])
Definition:
Main.cpp:15
Generated by
1.8.5