A namespace containing the MINOS system of units. More...
Functions | |
double | ToCelcius (double temperature) |
Convert from Munits temperature to Celcius. More... | |
double | ToKelvin (double temperature) |
Convert from Munits temperature to Kelvin. More... | |
double | ToFahrenheit (double temperature) |
Convert from Munits temperature to Fahrenheit. More... | |
double | FromCelcius (double degrees_celcius) |
Convert from Celcius temperature to Munits. More... | |
double | FromKelvin (double degrees_kelvin) |
Convert from Kelvin temperature to Munits. More... | |
double | FromFahrenheit (double degrees_fahrenheit) |
Convert from Fahrenheit temperature to Munits. More... | |
Variables | |
static const Char_t *const | base_length_name = "meter" |
static constexpr Double_t | meter = 1. |
static constexpr Double_t | meter2 = meter*meter |
static constexpr Double_t | meter3 = meter*meter*meter |
static constexpr Double_t | millimeter = 0.001*meter |
static constexpr Double_t | millimeter2 = millimeter*millimeter |
static constexpr Double_t | millimeter3 = millimeter*millimeter*millimeter |
static constexpr Double_t | centimeter = 10.*millimeter |
static constexpr Double_t | centimeter2 = centimeter*centimeter |
static constexpr Double_t | centimeter3 = centimeter*centimeter*centimeter |
static constexpr Double_t | kilometer = 1000.*meter |
static constexpr Double_t | kilometer2 = kilometer*kilometer |
static constexpr Double_t | kilometer3 = kilometer*kilometer*kilometer |
static constexpr Double_t | micrometer = 1.e-6 *meter |
static constexpr Double_t | nanometer = 1.e-9 *meter |
static constexpr Double_t | angstrom = 1.e-10*meter |
static constexpr Double_t | fermi = 1.e-15*meter |
static constexpr Double_t | inch = 2.54*centimeter |
static constexpr Double_t | mil = 0.001*inch |
static constexpr Double_t | foot = 12*inch |
static constexpr Double_t | barn = 1.e-28*meter2 |
static constexpr Double_t | millibarn = 1.e-3 *barn |
static constexpr Double_t | microbarn = 1.e-6 *barn |
static constexpr Double_t | nanobarn = 1.e-9 *barn |
static constexpr Double_t | picobarn = 1.e-12*barn |
static constexpr Double_t | nm = nanometer |
static constexpr Double_t | micron = micrometer |
static constexpr Double_t | mm = millimeter |
static constexpr Double_t | mm2 = millimeter2 |
static constexpr Double_t | mm3 = millimeter3 |
static constexpr Double_t | cm = centimeter |
static constexpr Double_t | cm2 = centimeter2 |
static constexpr Double_t | cm3 = centimeter3 |
static constexpr Double_t | m = meter |
static constexpr Double_t | m2 = meter2 |
static constexpr Double_t | m3 = meter3 |
static constexpr Double_t | km = kilometer |
static constexpr Double_t | km2 = kilometer2 |
static constexpr Double_t | km3 = kilometer3 |
static constexpr Double_t | radian = 1. |
static constexpr Double_t | milliradian = 1.e-3*radian |
static constexpr Double_t | degree = (3.14159265358979323846/180.0)*radian |
static constexpr Double_t | steradian = 1. |
static constexpr Double_t | rad = radian |
static constexpr Double_t | mrad = milliradian |
static constexpr Double_t | sr = steradian |
static constexpr Double_t | deg = degree |
static const Char_t *const | base_time_name = "second" |
static constexpr Double_t | second = 1. |
static constexpr Double_t | nanosecond = 1.e-9 *second |
static constexpr Double_t | millisecond = 1.e-3 *second |
static constexpr Double_t | microsecond = 1.e-6 *second |
static constexpr Double_t | picosecond = 1.e-12*second |
static constexpr Double_t | hertz = 1./second |
static constexpr Double_t | kilohertz = 1.e+3*hertz |
static constexpr Double_t | megahertz = 1.e+6*hertz |
static constexpr Double_t | minute = 60*second |
static constexpr Double_t | hour = 60*minute |
static constexpr Double_t | day = 24*hour |
static constexpr Double_t | year = 365.2422*day |
static constexpr Double_t | snowmass_year = 1.0E7*second |
static constexpr Double_t | ns = nanosecond |
static constexpr Double_t | s = second |
static constexpr Double_t | ms = millisecond |
static const Char_t *const | base_mass_name = "kilogram" |
static constexpr Double_t | kilogram = 1. |
static constexpr Double_t | gram = 1.e-3*kilogram |
static constexpr Double_t | milligram = 1.e-3*gram |
static constexpr Double_t | tonne = 1000.*kilogram |
static constexpr Double_t | kilotonne = 1000.*tonne |
static constexpr Double_t | pound = 0.45359237*kilogram |
static constexpr Double_t | kg = kilogram |
static constexpr Double_t | g = gram |
static constexpr Double_t | mg = milligram |
static constexpr Double_t | kt = kilotonne |
static const Char_t *const | base_current_name = "Ampere" |
static constexpr Double_t | ampere = 1. |
static constexpr Double_t | milliampere = 1.e-3*ampere |
static constexpr Double_t | microampere = 1.e-6*ampere |
static constexpr Double_t | nanoampere = 1.e-9*ampere |
static const Char_t *const | base_charge_name = "Coulomb" |
static constexpr Double_t | coulomb = ampere*second |
static constexpr Double_t | e_SI = 1.602176462e-19 |
static constexpr Double_t | eplus = e_SI*coulomb |
static constexpr Double_t | femptocoloumb = coulomb*1e-15 |
static constexpr Double_t | picocoloumb = coulomb*1e-12 |
static constexpr Double_t | fC = femptocoloumb |
static constexpr Double_t | pC = picocoloumb |
static constexpr Double_t | c_light = 2.99792458e+8 * m/s |
static constexpr Double_t | c_squared = c_light * c_light |
static constexpr Double_t | c_2 = c_squared |
static constexpr Double_t | c_4 = c_2 * c_2 |
static const Char_t *const | base_energy_name = "GeV" |
static constexpr Double_t | electronvolt = 1.e-9 |
static constexpr Double_t | kiloelectronvolt = 1.e-6 |
static constexpr Double_t | megaelectronvolt = 1.e-3 |
static constexpr Double_t | gigaelectronvolt = 1 |
static constexpr Double_t | teraelectronvolt = 1.e+3 |
static constexpr Double_t | petaelectronvolt = 1.e+6 |
static constexpr Double_t | joule = kg*m*m/(s*s) |
static constexpr Double_t | hep2baseEnergy = e_SI*1.e+9 |
static constexpr Double_t | hep2baseMomentum = hep2baseEnergy / c_light |
static constexpr Double_t | hep2baseMass = hep2baseEnergy / c_squared |
static constexpr Double_t | eV = electronvolt |
static constexpr Double_t | keV = kiloelectronvolt |
static constexpr Double_t | MeV = megaelectronvolt |
static constexpr Double_t | GeV = gigaelectronvolt |
static constexpr Double_t | TeV = teraelectronvolt |
static constexpr Double_t | PeV = petaelectronvolt |
static constexpr Double_t | watt = joule/second |
static constexpr Double_t | newton = joule/meter |
static constexpr Double_t | hep_pascal = newton/m2 |
static constexpr Double_t | bar = 100000*hep_pascal |
static constexpr Double_t | atmosphere = 101325*hep_pascal |
static const Char_t *const | base_epotential_name = "volt" |
static constexpr Double_t | volt = kg*m*m/(ampere*s*s*s) |
static constexpr Double_t | kilovolt = 1.e+3*volt |
static constexpr Double_t | megavolt = 1.e+6*volt |
static constexpr Double_t | millivolt = 1.e-3*volt |
static constexpr Double_t | microvolt = 1.e-6*volt |
static constexpr Double_t | ohm = volt/ampere |
static constexpr Double_t | farad = coulomb/volt |
static constexpr Double_t | millifarad = 1.e-3*farad |
static constexpr Double_t | microfarad = 1.e-6*farad |
static constexpr Double_t | nanofarad = 1.e-9*farad |
static constexpr Double_t | picofarad = 1.e-12*farad |
static constexpr Double_t | weber = volt*second |
static const Char_t *const | base_bfield_name = "Tesla" |
static constexpr Double_t | tesla = volt*second/meter2 |
static constexpr Double_t | gauss = 1.e-4*tesla |
static constexpr Double_t | kilogauss = 1.e-1*tesla |
static constexpr Double_t | henry = weber/ampere |
static constexpr Double_t | kelvin = 1. |
static constexpr Double_t | standard_temperature = 273.15 |
Triple point. More... | |
static constexpr Double_t | mole = 1. |
static constexpr Double_t | becquerel = 1./second |
static constexpr Double_t | curie = 3.7e+10 * becquerel |
static constexpr Double_t | gray = joule/kilogram |
static constexpr Double_t | candela = 1. |
static constexpr Double_t | lumen = candela*steradian |
static constexpr Double_t | lux = lumen/meter2 |
static constexpr Double_t | perCent = 0.01 |
static constexpr Double_t | perThousand = 0.001 |
static constexpr Double_t | perMillion = 0.000001 |
A namespace containing the MINOS system of units.
This system of units is a modified version of GEANT4's G4UnitsTest (which is itself a modified version of SystemOfUnits.h)
The basic units are those of the International System:
meter second kilogram ampere degree kelvin the amount of substance (mole) luminous intensity (candela) radian steradian
The SI numerical value of the positron charge is defined here, as it is needed for conversion factor : positron charge = e_SI (coulomb)
But, you shouldn't care what the basic MINOS units are. Instead learn these rules to deal with values that have units:
0) All variables are assumed hold values with Munits already applied. NEVER multiply a variable by an Munit.
1) To store or pass a literal value, ALWAYS multiply by an Munit:
2) To express a value with a given unit, divide by an Munit. NEVER store the result.
double Munits::FromCelcius | ( | double | degrees_celcius | ) |
Convert from Celcius temperature to Munits.
Definition at line 19 of file Munits.cxx.
References standard_temperature.
Referenced by FromFahrenheit().
double Munits::FromFahrenheit | ( | double | degrees_fahrenheit | ) |
Convert from Fahrenheit temperature to Munits.
Definition at line 29 of file Munits.cxx.
References FromCelcius().
double Munits::FromKelvin | ( | double | degrees_kelvin | ) |
Convert from Kelvin temperature to Munits.
Definition at line 24 of file Munits.cxx.
double Munits::ToCelcius | ( | double | temperature | ) |
Convert from Munits temperature to Celcius.
Definition at line 9 of file Munits.cxx.
References standard_temperature.
Referenced by ToFahrenheit().
double Munits::ToFahrenheit | ( | double | temperature | ) |
Convert from Munits temperature to Fahrenheit.
Definition at line 14 of file Munits.cxx.
References ToCelcius().
double Munits::ToKelvin | ( | double | temperature | ) |
Convert from Munits temperature to Kelvin.
Definition at line 4 of file Munits.cxx.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Definition at line 245 of file Munits.h.
Referenced by calibrationconstants().
|
static |
|
static |
|
static |
|
static |
|
static |
Definition at line 140 of file Munits.h.
Referenced by calib::CosmicCalib::endSubRun(), genie::flux::GDk2NuFlux::LengthUnits(), genie::flux::GNuMIFlux::LengthUnits(), calib::ResizeDetector::produce(), genie::flux::GDk2NuFlux::SetLengthUnits(), genie::flux::GNuMIFlux::SetLengthUnits(), calib::MakeAttenuationProfiles::writeResults(), and genie::flux::GDk2NuFluxXMLHelper::~GDk2NuFluxXMLHelper().
|
static |
Definition at line 141 of file Munits.h.
Referenced by CheckUnitarityLimit(), and genie::ReinSehgalRESXSecFast::Integrate().
|
static |
|
static |
|
static |
Definition at line 165 of file Munits.h.
Referenced by modify_metadata_with_upmu_sample_type::getSampleType(), and sg_coeff().
|
static |
Definition at line 157 of file Munits.h.
Referenced by PolyDef::FixTerms().
|
static |
|
static |
Definition at line 236 of file Munits.h.
Referenced by novaddt::utils::Atten::Eval(), and ana::Var3DFunc< T >::operator()().
|
static |
Definition at line 360 of file Munits.h.
Referenced by rsim::MakeNoiseSpectrumFile::analyze(), rsim::ReadoutSim::beginRun(), rsim::ReadoutSim::CreateRawDigits(), evgen::SupernovaGen::Generate(), rsim::NoiseMaker::GetNoise(), rsim::ReadoutSim::GetSmearedPE(), photrans::PhotonTransport::produce(), fuzz::FuzzyKVertex::produce(), evgen::IsoGen::Sample(), and evgen::SingleGen::Sample().
|
static |
Definition at line 291 of file Munits.h.
Referenced by upmuana::UpMuRecoAna::analyze().
Definition at line 390 of file Munits.h.
Referenced by genie::utils::style::SetDefaultStyle().
|
static |
|
static |
|
static |
|
static |
|
static |
Definition at line 148 of file Munits.h.
Referenced by genie::utils::prem::Density().
|
static |
|
static |
|
static |
Definition at line 145 of file Munits.h.
Referenced by stan::math::add(), genie::NievesQELCCPXSec::deltaLindhard(), stan::math::diag_post_multiply(), stan::math::diag_pre_multiply(), stan::math::elt_divide(), stan::math::elt_multiply(), FOMPlot(), genie::utils::phys::FormationZone(), stan::math::multiply(), genie::utils::print::P4AsString(), plot_max(), rwgt::GENIEReweightTable::Plus2Sigma(), jmshower::JMClusterMerge::produce(), genie::NievesQELCCPXSec::ruLinRelX(), rwgt::GENIEReweightTable::SetWeights(), stan::math::subtract(), TEST(), and genie::KPhaseSpace::Threshold().
|
static |
|
static |
Definition at line 210 of file Munits.h.
Referenced by slid::LIDTraining::analyze(), and jmshower::RecoJMShower::GetCellDistToTrk().
|
static |
|
static |
|
static |
Definition at line 332 of file Munits.h.
Referenced by ifdb::IFDBSpillInfo::GetGaussFit().
|
static |
Definition at line 136 of file Munits.h.
Referenced by ifdb::IFDBSpillInfo::BpmProjection(), FitValues(), ifdb::IFDBSpillInfo::GetGaussFit(), ifdb::IFDBSpillInfo::ProfileProjection(), lem::LEMMixer::respondToOpenInputFile(), and TEST().
|
static |
|
static |
|
static |
|
static |
Definition at line 192 of file Munits.h.
Referenced by lem::UnTranspose::beginRun(), lem::FindMatchesTranspose::endRun(), FitValues(), GetSystConcat(), GetSystConcats(), median_contours(), lem::MergeMatches::produce(), ShmRdWr::set_expire_time(), and TEST().
|
static |
Definition at line 133 of file Munits.h.
Referenced by ana::best_spline(), om::HistoSet::CopyAndResetOne(), om::HistogramBrowser::DoubleClicked(), draw_michel_plots(), om::PlotClickHandler::FEButcInfo(), FindCells(), FindPlanes(), geo::GeometryBase::FindPlanes(), genie::NuclearModelMap::GenerateNucleon(), om::HistoSet::GetTH1F(), om::HistoSet::GetTH2F(), genie::geometry::ROOTGeomAnalyzer::GetWeight(), om::PlotClickHandler::HwDCMHistogramInfo(), MakePlots(), genie::NuclearModelMap::ModelType(), evdb::parse_pset_string(), genie::utils::intranuke::PhaseSpaceDecay(), genie::utils::intranuke2018::PhaseSpaceDecay(), genie::NuclearModelMap::Prob(), evdb::Colors::Scale(), om::CurrentHistogram::Set(), evdb::ColorScale::SetBounds(), om::GUIModel::SetDetector(), genie::geometry::ROOTGeomAnalyzer::SetWeightWithDensity(), geo::GeometryBase::TotalMass(), evdb::Colors::UnpackColorScale(), and om::HistoSourceBase::~HistoSourceBase().
|
static |
|
static |
Definition at line 237 of file Munits.h.
Referenced by geo::ClosestApproach().
|
static |
|
static |
|
static |
|
static |
Definition at line 162 of file Munits.h.
Referenced by calc_enuwgt(), bsim::calcEnuWgt(), genie::flux::GNuMIFluxPassThroughInfo::CalcEnuWgt(), GetDetectorVertex(), genie::FermiMover::KickHitNucleon(), genie::flux::operator<<(), ana::IConstrainedFitVar::Penalty(), slid::ParticleIDAlg::PlaneRadius(), slid::ParticleIDAlg::Radius(), jmshower::RecoJMShower::Radius(), and jmshower::RecoJMShower::RadiusV().
|
static |
|
static |
Triple point.
Definition at line 374 of file Munits.h.
Referenced by FromCelcius(), and ToCelcius().
|
static |
|
static |
Definition at line 185 of file Munits.h.
Referenced by novaddt::DAQHeaderAna::analyze(), AnaPlotMaker(), caf::Proxy< caf::SRHeader >::CheckEquals(), CheckTrueDate(), flat::Flat< caf::SRHeader >::Clear(), novadaq::timeutils::convertUnixTimeToNovaTime(), DDTOnMonPlotMaker(), drawLongTerm(), drawVsPOT(), flat::Flat< caf::SRHeader >::Fill(), getYearAndMonth(), shadow::NOVASLocate::JulianDate(), lastUpdated(), evtsum::EventSummary::MakeOutput(), Nearline_Watchdog_Plots(), OnMonPlotMaker(), caf::Proxy< caf::SRHeader >::operator=(), PaintReachCanvas(), PlotDeltaFractionVsSignificance(), pots(), nova::dbi::RunHistoryService::preBeginRun(), TB_Nearline_Watchdog_Plots(), TimingUtilitiesTests::testSecMinHourDayMonYear(), evd::HeaderDrawer::Text(), om::RawEventUnpacker::UnpackRawEvent(), and uptime().