Example program to histogram photon emission profile from showers using JPHYSICS::JGeanx.
More...
#include <string>
#include <iostream>
#include "TROOT.h"
#include "TFile.h"
#include "TH1D.h"
#include "JPhysics/JGeanx.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 histogram photon emission profile from showers using JPHYSICS::JGeanx.
- Author
- mdejong
Definition in file JGeanx.cc.
◆ main()
int main |
( |
int | argc, |
|
|
char * | argv[] ) |
Definition at line 20 of file JGeanx.cc.
21{
23
26
27 try {
28
29 JParser<> zap(
"Example program to histogram photon emission profile from showers.");
30
33
34 zap(argc, argv);
35 }
36 catch(const exception &error) {
37 FATAL(error.what() << endl);
38 }
39
41
42
44
45 TH1D h1("Probability", NULL, 1000, -1.0, +1.0);
46 TH1D h2("Integral", NULL, 1000, -1.0, +1.0);
47
48 for(int i = 1; i <= h1.GetNbinsX(); ++i) {
49
50 const double x = h1.GetBinCenter(i);
51
52 h1.SetBinContent(i, geanx(x));
53 h2.SetBinContent(i, geanx(-1.0,x));
54 }
55
56 h1.Sumw2(kFALSE);
57 h2.Sumw2(kFALSE);
58
59 out.Write();
60 out.Close();
61}
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Utility class to parse command line options.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).