Jpp 19.3.0-rc.1
the software that should make you happy
Loading...
Searching...
No Matches
JTransitTimeProbablity.cc File Reference

Example program to determine PMT transit time probability. More...

#include <string>
#include <iostream>
#include <iomanip>
#include "JDetector/JTimeRange.hh"
#include "JDetector/JPMTTransitTimeGenerator.hh"
#include "Jeep/JParser.hh"
#include "Jeep/JMessage.hh"

Go to the source code of this file.

Functions

int main (int argc, char **argv)
 

Detailed Description

Example program to determine PMT transit time probability.

Author
mdejong

Definition in file JTransitTimeProbablity.cc.

Function Documentation

◆ main()

int main ( int argc,
char ** argv )

Definition at line 19 of file JTransitTimeProbablity.cc.

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}
#define NOTICE(A)
Definition JMessage.hh:64
#define FATAL(A)
Definition JMessage.hh:67
int debug
debug level
Definition JSirene.cc:72
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Definition JParser.hh:2142
Utility class to parse command line options.
Definition JParser.hh:1698
T getLowerLimit() const
Get lower limit.
Definition JRange.hh:202
T getUpperLimit() const
Get upper limit.
Definition JRange.hh:213
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
double getProbability(const double t_ns) const
Get integrated probablity from to given time.