test_units.C
Go to the documentation of this file.
1 //
2 // Test Units.h
3 //
4 // Costas Andreopoulos
5 //
6 //
7 
8 #include "../..//Conventions/Units.h"
9 
10 using namespace genie;
11 
12 void test_units(void)
13 {
14  cout << "1 m in GeV^-1 = " << units::m << endl;
15  cout << "1 F in GeV^-1 = " << units::fm << endl;
16 
17  const double cm2m = units::cm / units::m;
18  const double mev2gev = units::MeV / units::GeV;
19  const double to1E_38cm2 = 1. / (1E-38 * units::cm2);
20  const double fm2tomb = units::fm2 / units::mb;
21 
22  cout << "cm -> m ? => x" << cm2m << endl;
23  cout << "MeV -> GeV ? => x" << mev2gev << endl;
24  cout << "GeV^-2 -> 1E-38 cm^2 ? => x" << to1E_38cm2 << endl;
25  cout << "fm^2 -> mbarn ? => x" << fm2tomb << endl;
26  cout << "MeV -> GeV ? => x" << units::MeV << endl;
27 }
static const double m
Definition: Units.h:79
THE MAIN GENIE PROJECT NAMESPACE
Definition: GeneratorBase.h:8
static const double MeV
Definition: Units.h:130
static const double cm2
Definition: Units.h:77
Float_t E
Definition: plot.C:20
static const double fm
Definition: Units.h:83
void test_units(void)
Definition: test_units.C:12
OStream cout
Definition: OStream.cxx:6
static const double fm2
Definition: Units.h:84
static const double cm
Definition: Units.h:76
static const double mb
Definition: Units.h:87
static const double GeV
Definition: Units.h:29