QwAnalysis
|
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 | cm = 1.0 |
Length units: base unit is mm. More... | |
static const double | mm = 0.1 * cm |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
static const double | G = 1.0e-4 * T |
static const double | kG = 1.0e3 * G |
static const double | c = 299792458. * m / sec |
Physical constants. More... | |
static const double | Mp = 938.272013 * MeV |
Mass of the proton. More... | |
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 |
Definition at line 72 of file QwColor.h.
Physical constants.
Speed of light
Definition at line 118 of file QwUnits.h.
Referenced by DrawTreeLineVDC(), QwTrackingTreeSort::globalconnectiv(), and QwRayTracer::IntegrateRK().
|
static |
Length units: base unit is mm.
Definition at line 61 of file QwUnits.h.
Referenced by QwMatrixLookup::Bridge(), QwEvent::CalculateKinematics(), QwTreeEventBuffer::CreatePartialTracks(), QwBridgingTrackFilter::Filter(), QwDetectorInfo::LoadGeometryDefinition(), main(), operator<<(), QwDetectorInfo::Print(), QwRayTracer::ProcessOptions(), QwMagneticField::ProcessOptions(), QwBridgingTrackFilter::QwBridgingTrackFilter(), QwMatrixLookup::QwMatrixLookup(), QwMagneticField::ReadFieldMapStream(), QwMagneticField::TestFieldMap(), and QwMatrixLookup::WriteTrajMatrix().
|
static |
Definition at line 106 of file QwUnits.h.
Referenced by QwMatrixLookup::Bridge(), QwEvent::CalculateKinematics(), QwBridgingTrackFilter::Filter(), QwDetectorInfo::GetDetectorPitchInDeg(), QwDetectorInfo::GetDetectorRollInDeg(), QwDetectorInfo::GetDetectorYawInDeg(), QwDetectorInfo::GetElementAngleInDeg(), QwDetectorInfo::GetRotatorPitchInDeg(), QwDetectorInfo::GetRotatorRollInDeg(), QwDetectorInfo::GetRotatorYawInDeg(), QwDetectorInfo::LoadGeometryDefinition(), QwDetectorInfo::Print(), QwMagneticField::ProcessOptions(), QwTreeEventBuffer::pxGlobalToLocal(), QwTreeEventBuffer::pyGlobalToLocal(), QwBridgingTrackFilter::QwBridgingTrackFilter(), QwMatrixLookup::QwMatrixLookup(), QwMagneticField::ReadFieldMapStream(), Uv2xy::SetAngleUVinXY(), QwMagneticField::SetRotation(), QwTreeEventBuffer::xGlobalToLocal(), and QwTreeEventBuffer::yGlobalToLocal().
|
static |
Definition at line 91 of file QwUnits.h.
Referenced by QwRayTracer::DefineOptions(), QwLumi::DoNormalization(), QwMainCerenkovDetector::DoNormalization(), QwDetectorInfo::GetElementEfficiency(), QwRayTracer::IntegrateRK(), main(), QwClock< T >::operator+=(), QwBCM< T >::operator+=(), QwClock< T >::operator-=(), QwBCM< T >::operator-=(), QwClock< T >::operator=(), QwBCM< T >::operator=(), QwOptions::ParseCommandLine(), QwOptions::ParseConfigFile(), QwOptions::ParseEnvironment(), QwRaster::ProcessEvBuffer(), QwSciFiDetector::ProcessEvBuffer(), QwTriggerScintillator::ProcessEvBuffer(), QwDriftChamber::ProcessEvBuffer(), QwMainDetector::ProcessEvBuffer(), QwScanner::ProcessEvBuffer(), QwHelicityPattern::QwHelicityPattern(), PromptSummaryElement::Set(), QwDetectorInfo::SetElementEfficiency(), QwInterpolator< float, 4 >::SetMinimumMaximumStep(), QwCombinedPMT::UpdateErrorFlag(), QwBCM< T >::UpdateErrorFlag(), QwQPD::UpdateErrorFlag(), QwBPMCavity::UpdateErrorFlag(), QwLinearDiodeArray::UpdateErrorFlag(), QwIntegrationPMT::UpdateErrorFlag(), QwCombinedBPM< T >::UpdateErrorFlag(), QwBPMStripline< T >::UpdateErrorFlag(), and QwDatabase::ValidateConnection().
|
static |
Definition at line 112 of file QwUnits.h.
Referenced by QwTrackingTreeCombine::r2_TreelineFit(), and QwTrackingTreeCombine::r3_TreelineFit().
|
static |
Definition at line 95 of file QwUnits.h.
Referenced by QwMatrixLookup::Bridge(), QwEvent::CalculateKinematics(), VQwBridgingMethod::EstimateInitialMomentum(), QwTreeEventBuffer::GetSpecificEvent(), QwEvent::LoadBeamProperty(), and QwRayTracer::ProcessOptions().
Definition at line 97 of file QwUnits.h.
Referenced by QwEvent::CalculateKinematics(), and QwTreeEventBuffer::GetSpecificEvent().
|
static |
|
static |
|
static |
Definition at line 66 of file QwUnits.h.
Referenced by QwEPICSEvent::ExtractEPICSValues(), QwTreeEventBuffer::LoadDriftTimeDistance(), QwMagneticField::ReadFieldMapFile(), PromptSummaryElement::SetAsymmetry(), PromptSummaryElement::SetAsymmetryError(), PromptSummaryElement::SetAsymmetryUnit(), PromptSummaryElement::SetAsymmetryWidth(), QwDBInterface::SetDetectorName(), QwErrDBInterface::SetDeviceName(), PromptSummaryElement::SetDifference(), PromptSummaryElement::SetDifferenceError(), PromptSummaryElement::SetDifferenceUnit(), PromptSummaryElement::SetDifferenceWidth(), QwDBInterface::SetError(), QwErrDBInterface::SetErrorCodeId(), MeanTimeContainer::SetEventId(), QwDBInterface::SetN(), QwErrDBInterface::SetN(), PromptSummaryElement::SetName(), MeanTime::SetPlane(), MeanTimeContainer::SetPlane(), QwRunCondition::SetROCFlagsFileName(), QwPromptSummary::SetRunletNumber(), QwPromptSummary::SetRunNumber(), QwDBInterface::SetSubblock(), MQwF1TDC::SetTDCMaxChannels(), QwDBInterface::SetValue(), PromptSummaryElement::SetYield(), PromptSummaryElement::SetYieldError(), PromptSummaryElement::SetYieldUnit(), and PromptSummaryElement::SetYieldWidth().
|
static |
Definition at line 113 of file QwUnits.h.
Referenced by main(), QwMagneticField::ReadFieldMapStream(), and QwMagneticField::TestFieldMap().
|
static |
Definition at line 63 of file QwUnits.h.
Referenced by QwCombinedBPM< T >::CalculateFixedParameter(), QwTrackingTree::consistent(), QwCombinedBPM< T >::InitializeChannel(), M_A_times_b(), QwComptonElectronDetector::ProcessEvBuffer(), and UNorm().
|
static |
Definition at line 94 of file QwUnits.h.
Referenced by QwEvent::CalculateKinematics(), QwTreeEventBuffer::CreatePartialTracks(), QwEvent::EnergyLossHydrogen(), QwTreeEventBuffer::GetSpecificEvent(), QwEvent::LoadBeamProperty(), QwRayTracer::ProcessOptions(), and QwMatrixLookup::QwMatrixLookup().
|
static |
Definition at line 76 of file QwUnits.h.
Referenced by QwSIS3320_Samples::GetMin(), M_Cholesky(), QwTrackingTree::marklin(), QwTrackingTreeSearch::SearchTreeLines(), QwInterpolator< float, 4 >::SetMinimumMaximumStep(), and VQwHardwareChannel::SetSingleEventCuts().
|
static |
Mass of the proton.
Definition at line 119 of file QwUnits.h.
Referenced by QwEvent::CalculateKinematics(), VQwBridgingMethod::EstimateInitialMomentum(), and QwTreeEventBuffer::GetSpecificEvent().
|
static |
Time units: base unit is ms.
Definition at line 72 of file QwUnits.h.
Referenced by QwParameterFile::GetParameterFileContents(), and main().
|
static |
Angles: base unit is radian.
Definition at line 102 of file QwUnits.h.
Referenced by QwTreeEventBuffer::CreateHitRegion2(), QwTreeEventBuffer::CreateHitRegion3(), QwMagneticField::GetCylindricalFieldValue(), QwMagneticField::GetFieldValue(), QwTrackingTreeCombine::r3_PartialTrackFit(), VQwScaler_Channel::RandomizeEventData(), QwVQWK_Channel::RandomizeEventData(), QwMagneticField::ReadFieldMapStream(), Uv2xy::SetAngleUVinXY(), Uv2xy::Uv2xy(), and QwMatrixLookup::WriteTrajMatrix().
|
static |
Definition at line 105 of file QwUnits.h.
Referenced by QwDetectorInfo::GetDetectorPitchInRad(), QwDetectorInfo::GetDetectorRollInRad(), QwDetectorInfo::GetDetectorYawInRad(), QwMagneticField::GetRotation(), QwDetectorInfo::GetRotatorPitchInRad(), QwDetectorInfo::GetRotatorRollInRad(), QwDetectorInfo::GetRotatorYawInRad(), QwRayTracer::ProcessOptions(), and QwMagneticField::SetRotation().
|
static |
Magnetic field: base unit is T.
Definition at line 111 of file QwUnits.h.
Referenced by VQwTrackingElementContainer< T >::Add(), VQwTrackingElementContainer< T >::AddList(), QwDBInterface::AddThisEntryToList(), QwErrDBInterface::AddThisEntryToList(), QwParameterFile::ConvertValue(), VQwTrackingElementContainer< T >::CreateNew(), QwOptions::GetValue(), QwCombinedBPM< T >::LeastSquareFit(), QwCombinedBPM< T >::MakeBPMComboList(), QwBPMStripline< T >::MakeBPMList(), QwCombinedBCM< T >::ProcessEvent(), QwCombinedBPM< T >::ProcessEvent(), QwBPMStripline< T >::ProcessEvent(), QwDBInterface::TypedDBClone(), and QwErrDBInterface::TypedDBClone().