Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
Generator
src
contrib
test
gtestPREM.cxx
Go to the documentation of this file.
1
//____________________________________________________________________________
2
/*!
3
4
\program gtestPREM
5
6
\brief Test tehe PREM model
7
8
\author Costas Andreopoulos <constantinos.andreopoulos \at cern.ch>
9
University of Liverpool & STFC Rutherford Appleton Laboratory
10
11
\created Aug 25, 2009
12
13
\cpright Copyright (c) 2003-2020, The GENIE Collaboration
14
For the full text of the license visit http://copyright.genie-mc.org
15
16
*/
17
//____________________________________________________________________________
18
19
#include <TFile.h>
20
#include <TNtuple.h>
21
22
#include "
Framework/Conventions/Constants.h
"
23
#include "
Framework/Conventions/Units.h
"
24
#include "
Framework/Utils/PREM.h
"
25
26
using namespace
genie
;
27
28
//____________________________________________________________________________
29
int
main
(
int
/*argc*/
,
char
**
/*argv*/
)
30
{
31
TNtuple * earth_density =
new
TNtuple(
"earth_density"
,
""
,
"r:rho"
);
32
33
const
double
dr = 1. *
units::km
;
34
const
double
rmax =
constants::kREarth
;
35
36
double
r
= 0;
37
while
(r < rmax) {
38
double
rho
=
utils::prem::Density
(r);
39
earth_density->Fill(r/
units::km
, rho/
units::g_cm3
);
40
r += dr;
41
}
42
43
TFile
f
(
"./prem.root"
,
"recreate"
);
44
earth_density->Write();
45
f.Close();
46
47
return
0;
48
}
49
//____________________________________________________________________________
PREM.h
keras_to_tensorflow.f
f
Definition:
keras_to_tensorflow.py:162
genie
THE MAIN GENIE PROJECT NAMESPACE
Definition:
AlgCmp.h:25
Constants.h
genie::units::km
static constexpr double km
Definition:
Units.h:64
pionana::rho
double rho
Definition:
TruthAnalyzer_module.cc:42
genie::units::g_cm3
static constexpr double g_cm3
Definition:
Units.h:153
Units.h
genie::constants::kREarth
static const double kREarth
Definition:
Constants.h:110
main
int main(int, char **)
Definition:
gtestPREM.cxx:29
genie::utils::prem::Density
double Density(double r)
Definition:
PREM.cxx:18
plot_model.r
r
Definition:
plot_model.py:57
Generated by
1.8.11