#include <string>
#include <iostream>
#include <iomanip>
#include "TROOT.h"
#include "TFile.h"
#include "TH1D.h"
#include "JPhysics/JRadiation.hh"
#include "JROOT/JManager.hh"
#include "JROOT/JRootToolkit.hh"
#include "Jeep/JParser.hh"
#include "Jeep/JMessage.hh"
Go to the source code of this file.
|
| int | main (int argc, char **argv) |
| | Example application to display theta RMS of muon energy loss.
|
| |
◆ main()
| int main |
( |
int | argc, |
|
|
char ** | argv ) |
Example application to display theta RMS of muon energy loss.
Definition at line 20 of file JGinneken.cc.
21{
24
27
28 try {
29
31
34
36 }
37 catch(const exception &error) {
39 }
40
41
43
44 JManager<double, TH1D>
HA(
new TH1D(
"Brems1 [% GeV]",
NULL, 10000, -7.5,
log10(0.5)));
45 JManager<double, TH1D> HB(
new TH1D(
"Brems2 [% GeV]",
NULL, 10000, -3.2,
log10(0.5)));
46 JManager<double, TH1D>
HC(
new TH1D(
"EErad [% GeV]",
NULL, 10000, -7.8, 0.0));
47
48 for (const double E : { 1.0e2, 1.0e3 }) {
49
53
54 for (
int i = 1; i <=
ha->GetNbinsX(); ++i) {
55
56 const double x =
ha->GetBinCenter(i);
57 const double v =
pow(10.0, x);
58 const double y =
radiation.ThetaRMSfromBrems(E, v);
59
60 ha->SetBinContent(i, y);
61 }
62
63 for (
int i = 1; i <=
hb->GetNbinsX(); ++i) {
64
65 const double x =
hb->GetBinCenter(i);
66 const double v = 1.0 -
pow(10.0, x);
67 const double y =
radiation.ThetaRMSfromBrems(E, v);
68
69 hb->SetBinContent(i, y);
70 }
71
72 for (
int i = 1; i <=
hc->GetNbinsX(); ++i) {
73
74 const double x =
hc->GetBinCenter(i);
75 const double v =
pow(10.0, x);
76 const double y =
radiation.ThetaRMSfromEErad(E, v);
77
78 hc->SetBinContent(i, y);
79 }
80 }
81
83
84 out <<
HA << HB <<
HC;
85
86 out.Write();
87 out.Close();
88}
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Template definition of a multi-dimensional oscillation probability interpolation table.
Utility class to parse command line options.
Auxiliary class for the calculation of the muon radiative cross sections.
T pow(const T &x, const double y)
Power .
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).