Jpp  18.2.0
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Functions
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

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 }
Utility class to parse command line options.
Definition: JParser.hh:1514
JDETECTOR::getTransitionTime getTransitionTime
Function object to generate transition time.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Definition: JParser.hh:1989
#define NOTICE(A)
Definition: JMessage.hh:64
double getProbability(const double t_ns) const
Get integrated probablity from to given time.
#define FATAL(A)
Definition: JMessage.hh:67
int debug
debug level
JTOOLS::JRange< double > JTimeRange
Type definition for time range (unit [s]).