Example program to test JGEOMETRY2D::JOmega2D class.
More...
#include <string>
#include <iostream>
#include <iomanip>
#include <cmath>
#include "TROOT.h"
#include "TFile.h"
#include "TH1D.h"
#include "TRandom3.h"
#include "JMath/JConstants.hh"
#include "JTools/JQuantile.hh"
#include "JTools/JRange.hh"
#include "JROOT/JRootToolkit.hh"
#include "JGeometry2D/JOmega2D.hh"
#include "Jeep/JParser.hh"
#include "Jeep/JMessage.hh"
Go to the source code of this file.
|
| int | main (int argc, char **argv) |
| |
Example program to test JGEOMETRY2D::JOmega2D class.
- Author
- mdejong
Definition in file JOmega2D.cc.
◆ main()
| int main |
( |
int | argc, |
|
|
char ** | argv ) |
Definition at line 29 of file JOmega2D.cc.
30{
33
35 int numberOfEvents;
38
39 try {
40
41 JParser<> zap(
"Example program to test JOmega2D class.");
42
47
49 }
50 catch(const exception &error) {
52 }
53
54
55 const int N = 10;
56
60
61
64
65 for (int i = 1; i <= h0.GetNbinsX(); ++i) {
66
68
69 omega .push_back(
JOmega2D(x * PI/180.0));
71 }
72
73
74 for (int i = 0; i != numberOfEvents; ++i) {
75
77
78 const double phi =
gRandom->Uniform(0.0, 2*PI);
79
81
82 for (
size_t j = 0;
j != omega.size(); ++
j) {
83
84 const int pos = omega[
j].find(
angle);
85 const double dot =
angle.getDot(omega[j][pos]);
86
88 }
89 }
91
92
93 for (int i = 1; i <= h0.GetNbinsX(); ++i) {
94 h0.SetBinContent(i, omega [i-1].size());
95 h1.SetBinContent(i,
quantile[i-1].getSTDev());
96 h2.SetBinContent(i,
quantile[i-1].getDeviation());
97 }
98
100
102
103 out << h0 << h1 << h2;
104
105 out.Write();
106 out.Close();
107 }
108
109 for (int i = 1; i <= h2.GetNbinsX(); ++i) {
110
113
114 NOTICE(
"Grid test " << x <<
" [deg]: " << y <<
" [deg]." <<
endl);
116 }
117
118 return 0;
119}
#define DEBUG(A)
Message macros.
#define ASSERT(A,...)
Assert macro.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Data structure for angle in two dimensions.
Direction set covering (part of) circle.
Template definition of a multi-dimensional oscillation probability interpolation table.
Utility class to parse command line options.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).