Example program to test JGEOMETRY3D::JOmega3D 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 "JGeometry3D/JOmega3D.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 JGEOMETRY3D::JOmega3D class. 
- Author
 - mdejong 
 
Definition in file JOmega3D.cc.
 
◆ main()
      
        
          | int main  | 
          ( | 
          int  | 
          argc,  | 
        
        
           | 
           | 
          char **  | 
          argv  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Definition at line 29 of file JOmega3D.cc.
   41     JParser<> zap(
"Example program to test JOmega3D class.");
 
   50   catch(
const exception &error) {
 
   51     FATAL(error.what() << endl);
 
   65   for (
int i = 1; i <= h0.GetNbinsX(); ++i) {
 
   67     const Double_t 
x = h0.GetBinCenter(i);
 
   74   for (
int i = 0; i != numberOfEvents; ++i) {
 
   76     STATUS(
"event: " << setw(10) << i << 
'\r'); 
DEBUG(endl);
 
   78     const double   theta = gRandom->Uniform(0.0, 
PI);
 
   79     const double   phi   = gRandom->Uniform(0.0, 2*
PI);
 
   83     for (
size_t j = 0; 
j != omega.size(); ++
j) {
 
   85       const int      pos = omega[
j].find(angle);
 
   86       const double   dot = angle.getDot(omega[
j][pos]);
 
   88       quantile[
j].put(acos(dot) * 180.0/
PI); 
 
   94   for (
int i = 1; i <= h0.GetNbinsX(); ++i) {
 
   95     h0.SetBinContent(i, omega   [i-1].size());
 
   96     h1.SetBinContent(i, quantile[i-1].getSTDev());
 
   97     h2.SetBinContent(i, quantile[i-1].getDeviation());
 
  104     out << h0 << h1 << h2;
 
  110   for (
int i = 1; i <= h2.GetNbinsX(); ++i) {
 
  112     const Double_t 
x = h2.GetBinCenter (i);
 
  113     const Double_t 
y = h2.GetBinContent(i);
 
  115     NOTICE(
"Grid test " << 
x << 
" [deg]: " << 
y << 
" [deg]." << endl); 
 
#define DEBUG(A)
Message macros.
 
#define ASSERT(A,...)
Assert macro.
 
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
 
Data structure for angles in three dimensions.
 
Direction set covering (part of) solid angle.
 
Utility class to parse command line options.
 
static const double PI
Mathematical constants.
 
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).