Functions
test_units.C File Reference
#include "../..//Conventions/Units.h"

Go to the source code of this file.

Functions

void test_units (void)
 

Function Documentation

void test_units ( void  )

Definition at line 12 of file test_units.C.

References genie::units::cm, genie::units::cm2, om::cout, E, allTimeWatchdog::endl, genie::units::fm, genie::units::fm2, genie::units::GeV, genie::units::m, genie::units::mb, and genie::units::MeV.

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 constexpr Double_t cm2
Definition: Munits.h:141
static constexpr Double_t MeV
Definition: Munits.h:290
Float_t E
Definition: plot.C:20
static constexpr Double_t GeV
Definition: Munits.h:291
static const double fm
Definition: Units.h:83
OStream cout
Definition: OStream.cxx:6
static const double fm2
Definition: Units.h:84
static constexpr Double_t cm
Definition: Munits.h:140