JAPAn
Just Another Parity Analyzer
|
Enumerations | |
enum | EQwColor { kBlack , kRed , kGreen , kBrown , kBlue , kMagenta , kCyan , kWhite , kDefaultForeground , kBold , kBoldRed , kBoldGreen , kBoldBrown , kBoldBlue , kBoldMagenta , kBoldCyan , kBoldWhite , kBackRed , kBackGreen , kBackBlue , kDefaultBackground , kNormal } |
Variables | |
static const double | mm = 1.0 |
Length units: base unit is mm. | |
static const double | um = 1.0e-3 * mm |
static const double | cm = 1.0e1 * mm |
static const double | m = 1.0e2 * cm |
static const double | km = 1.0e3 * m |
static const double | in = 2.54 * cm |
static const double | mil = 0.001 * in |
static const double | ms = 1.0 |
Time units: base unit is ms. | |
static const double | us = 1.0e-3 * ms |
static const double | ns = 1.0e-6 * ms |
static const double | sec = 1.0e3 * ms |
static const double | min = 60.0 * sec |
static const double | hour = 60.0 * min |
static const double | day = 24.0 * hour |
static const double | Hz = 1.0 / sec |
Frequency units: base unit is kHz. | |
static const double | kHz = 1.0 / ms |
static const double | MHz = 1.0e3 * kHz |
static const double | V = 1.0 |
Energy: base unit is MeV. | |
static const double | e = 1.0e-6 |
static const double | eV = 1.0e-6 |
static const double | keV = 1.0e-3 |
static const double | MeV = 1.0 |
static const double | GeV = 1.0e3 |
static const double | MeV2 = MeV * MeV |
static const double | GeV2 = GeV * GeV |
static const double | pi = 3.14159265 |
Angles: base unit is radian. | |
static const double | deg2rad = pi / 180.0 |
static const double | rad2deg = 180.0 / pi |
static const double | rad = 1.0 |
static const double | deg = deg2rad |
static const double | T = V * sec / (m * m) |
Magnetic field: base unit is T. | |
static const double | G = 1.0e-4 * T |
static const double | kG = 1.0e3 * G |
static const double | uA = 1.0 |
Beam current: base unit is microamp. | |
static const double | V_uA = V/uA |
Signal levels: base unit is volt, and is already defined above. | |
static const double | mV_uA = 1.0e-3 * V_uA |
Signal volts per microamp. | |
static const double | c = 299792458. * m / sec |
Physical constants. | |
static const double | Mp = 938.272013 * MeV |
Mass of the proton. | |
static const double | ppm =1e-6 |
static const double | ppb =1e-9 |
As more and more analyzers start contributing code to the Qweak analysis code, it is important to use some conventions to avoid confusion. One of the conventions is the use of a standard system of coordinates. The other is a unified set of units. This way we will avoid errors when angles are not converted from degrees to radians, or centimeters and inches are in mixed up.
The basic units in the QwAnalysis framework are:
How are these units to be used? Any variable that is being used inside subsystems and especially when passing information to other subsystems should have values in these units.
This does not mean that every single constant has to be defined in these units, or that output has to use these units. A set of conversion constants is defined to make life easier.
Take as an example the magnetic field map. The values stored in the map file by the external program are in kG. To convert those values, we would write:
From now on, the values in bx, by, bz are in standard Qweak units (T). To write out the values in Gauss we write:
For Tesla we would write
If there are hard-coded values in the analyzer (which should be avoided), we should use these units to define them:
enum Qw::EQwColor |
|
static |
Frequency units: base unit is kHz.
Definition at line 88 of file QwUnits.h.
Referenced by MQwMockable::LoadMockDataParameters().
|
static |
Length units: base unit is mm.
Definition at line 65 of file QwUnits.h.
Referenced by PromptSummaryElement::Set().
|
static |
|
static |
Time units: base unit is ms.
Definition at line 77 of file QwUnits.h.
Referenced by QwSubsystemArrayParity::LoadMockDataParameters().
|
static |
Signal volts per microamp.
Definition at line 129 of file QwUnits.h.
Referenced by PromptSummaryElement::Set().
|
static |
Angles: base unit is radian.
Definition at line 107 of file QwUnits.h.
Referenced by QwADC18_Channel::RandomizeEventData(), QwMollerADC_Channel::RandomizeEventData(), QwVQWK_Channel::RandomizeEventData(), and VQwScaler_Channel::RandomizeEventData().
|
static |
Definition at line 140 of file QwUnits.h.
Referenced by PromptSummaryElement::Set().
|
static |
Definition at line 80 of file QwUnits.h.
Referenced by QwCombinedBCM< T >::LoadMockDataParameters(), QwSubsystemArrayParity::LoadMockDataParameters(), and QwIntegrationPMT::RandomizeMollerEvent().
|
static |
Beam current: base unit is microamp.
Definition at line 123 of file QwUnits.h.
Referenced by PromptSummaryElement::Set().
|
static |
Definition at line 66 of file QwUnits.h.
Referenced by PromptSummaryElement::Set().