Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Macros | Typedefs | Functions
templates.hh File Reference
#include <limits>
#include <climits>

Go to the source code of this file.

Macros

#define HIGH_PRECISION   1
 
#define DBL_MIN   std::numeric_limits<double>::min()
 
#define DBL_DIG   std::numeric_limits<double>::digits10
 
#define DBL_MAX   std::numeric_limits<double>::max()
 
#define DBL_EPSILON   std::numeric_limits<double>::epsilon()
 
#define FLT_MIN   std::numeric_limits<float>::min()
 
#define FLT_DIG   std::numeric_limits<float>::digits10
 
#define FLT_MAX   std::numeric_limits<float>::max()
 
#define FLT_EPSILON   std::numeric_limits<float>::epsilon()
 
#define MAXFLOAT   std::numeric_limits<float>::max()
 
#define INT_MAX   std::numeric_limits<int>::max()
 
#define INT_MIN   std::numeric_limits<int>::min()
 
#define G4_SQR_DEFINED
 

Typedefs

typedef double Float
 

Functions

template<class T >
void G4SwapPtr (T *&a, T *&b)
 
template<class T >
void G4SwapObj (T *a, T *b)
 
template<class T >
sqr (const T &x)
 
int G4lrint (double ad)
 
int G4lint (double ad)
 
int G4rint (double ad)
 

Macro Definition Documentation

#define DBL_DIG   std::numeric_limits<double>::digits10

Definition at line 79 of file templates.hh.

#define DBL_EPSILON   std::numeric_limits<double>::epsilon()
#define DBL_MAX   std::numeric_limits<double>::max()

Definition at line 83 of file templates.hh.

Referenced by G4KDTree::__NearestInRange(), G4CollisionManager::AddCollision(), G4VAtomDeexcitation::AlongStepDeexcitation(), G4CoupledTransportation::AlongStepDoIt(), G4NuclearStopping::AlongStepGetPhysicalInteractionLength(), G4WeightCutOffProcess::AlongStepGetPhysicalInteractionLength(), G4ParallelWorldProcess::AlongStepGetPhysicalInteractionLength(), G4ScoreSplittingProcess::AlongStepGetPhysicalInteractionLength(), G4ImportanceProcess::AlongStepGetPhysicalInteractionLength(), G4ParallelWorldScoringProcess::AlongStepGetPhysicalInteractionLength(), G4WeightWindowProcess::AlongStepGetPhysicalInteractionLength(), G4FastSimulationManagerProcess::AlongStepGetPhysicalInteractionLength(), G4BiasingProcessInterface::AlongStepGetPhysicalInteractionLength(), G4VEnergyLossProcess::AlongStepGetPhysicalInteractionLength(), G4ScoreSplittingProcess::AtRestGetPhysicalInteractionLength(), G4ParallelWorldScoringProcess::AtRestGetPhysicalInteractionLength(), G4ParallelWorldProcess::AtRestGetPhysicalInteractionLength(), G4FastSimulationManagerProcess::AtRestGetPhysicalInteractionLength(), RunAction::BeginOfRunAction(), G4PAIPhotonModel::BuildLambdaVector(), G4RDVCrossSectionHandler::BuildMeanFreePathForMaterials(), G4VCrossSectionHandler::BuildMeanFreePathForMaterials(), G4DNAMoleculeEncounterStepper::CalculateStep(), G4HadronicProcess::CheckEnergyMomentumConservation(), G4ITStepProcessor::CleanProcessor(), G4NeutronHPVector::CleanUp(), G4BetheBlochNoDeltaModel::ComputeDEDXPerVolume(), G4ICRU73NoDeltaModel::ComputeDEDXPerVolume(), G4BraggNoDeltaModel::ComputeDEDXPerVolume(), G4WentzelVIModel::ComputeGeomPathLength(), G4WentzelVIRelModel::ComputeGeomPathLength(), G4GammaConversionToMuons::ComputeMeanFreePath(), G4EmCalculator::ComputeMeanFreePath(), G4VEmModel::ComputeMeanFreePath(), Run::ComputeStatistics(), G4ErrorPropagationNavigator::ComputeStep(), G4DNABrownianTransportation::ComputeStep(), G4VMscModel::ComputeTruePathLengthLimit(), G4WentzelVIModel::ComputeTrueStepLength(), G4WentzelVIRelModel::ComputeTrueStepLength(), F06DetectorConstruction::Construct(), DMXDetectorConstruction::Construct(), G4IonParametrisedLossModel::CorrectionsAlongStep(), G4DNAScreenedRutherfordElasticModel::CrossSectionPerVolume(), G4DNAChampionElasticModel::CrossSectionPerVolume(), G4DNATransformElectronModel::CrossSectionPerVolume(), G4DNAOneStepSolvatationModel::CrossSectionPerVolume(), G4BOptnChangeCrossSection::DistanceToApplyOperation(), G4BOptnForceFreeFlight::DistanceToApplyOperation(), G4BOptnForceCommonTruncatedExp::DistanceToApplyOperation(), DMXDetectorConstruction::DMXDetectorConstruction(), G4ITStepProcessor::DoDefinePhysicalStepLength(), G4ScoringCylinder::Draw(), G4ScoringBox::Draw(), G4ScoringCylinder::DrawColumn(), G4ScoringBox::DrawColumn(), HistoManager::EndOfRun(), G4GMocrenFileSceneHandler::EndSavingGdd(), F04ElementField::F04ElementField(), F04PhysicsList::F04PhysicsList(), G4EmModelManager::FillDEDXVector(), G4EmModelManager::FillLambdaVector(), G4Absorber::FindAbsorbers(), G4ITStepProcessor::FindTransportationStep(), G4ChordFinder::G4ChordFinder(), G4eeToHadronsMultiModel::G4eeToHadronsMultiModel(), G4GammaConversionToMuons::G4GammaConversionToMuons(), G4ITStepProcessor::G4ITStepProcessor(), G4LFission::G4LFission(), G4NeutronHPVector::G4NeutronHPVector(), G4NeutronKiller::G4NeutronKiller(), G4PhotonEvaporation::G4PhotonEvaporation(), G4SteppingManager::G4SteppingManager(), G4UniversalFluctuation::G4UniversalFluctuation(), G4VEmProcess::G4VEmProcess(), G4VEnergyLossProcess::G4VEnergyLossProcess(), G4VGammaDeexcitation::G4VGammaDeexcitation(), G4VMscModel::G4VMscModel(), G4VXTRenergyLoss::G4VXTRenergyLoss(), G4WentzelOKandVIxSection::G4WentzelOKandVIxSection(), G4XAnnihilationChannel::G4XAnnihilationChannel(), G4XMesonBaryonElastic::G4XMesonBaryonElastic(), G4VAtomDeexcitation::GenerateParticles(), GFlashHomoShowerParameterisation::GenerateRadius(), GFlashSamplingShowerParameterisation::GenerateRadius(), G4PrimaryTransformer::GenerateSingleTrack(), G4NeutronHPVector::Get15percentBorder(), G4NeutronHPVector::Get50percentBorder(), G4DensityEffectData::GetAdensity(), G4DensityEffectData::GetAdjustmentFactor(), G4NeutronHPFFFissionFS::GetAFissionFragment(), G4PAIPhotonModel::GetAlongStepTransfer(), G4ITStepProcessor::GetAtRestIL(), G4DensityEffectData::GetCdensity(), G4MesonAbsorption::GetCollisions(), G4Scatterer::GetCollisions(), G4ErrorEnergyLoss::GetContinuousStepLimit(), G4AdjointAlongStepWeightCorrection::GetContinuousStepLimit(), G4ContinuousGainOfEnergy::GetContinuousStepLimit(), G4VEnergyLossProcess::GetContinuousStepLimit(), G4LossTableManager::GetCSDARange(), G4VEnergyLossProcess::GetCSDARange(), G4DensityEffectData::GetDelta0density(), G4ErrorTarget::GetDistanceFromPoint(), G4ErrorTrackLengthTarget::GetDistanceFromPoint(), G4tgrUtils::GetDouble(), G4TheoFSGenerator::GetEnergyMomentumCheckLevels(), GFlashParticleBounds::GetEneToKill(), G4DensityEffectData::GetErrorDensity(), G4NeutronHPElastic::GetFatalEnergyCheckLevels(), G4NeutronHPCapture::GetFatalEnergyCheckLevels(), G4NeutronHPFission::GetFatalEnergyCheckLevels(), G4NeutronHPThermalScattering::GetFatalEnergyCheckLevels(), G4NeutronHPInelastic::GetFatalEnergyCheckLevels(), G4NuclideTable::GetIsotope(), G4DensityEffectData::GetMdensity(), G4PhononReflection::GetMeanFreePath(), XrayFluoStepMax::GetMeanFreePath(), StepLimiter::GetMeanFreePath(), StepMax::GetMeanFreePath(), G4VTransitionRadiation::GetMeanFreePath(), G4TransitionRadiation::GetMeanFreePath(), G4SynchrotronRadiation::GetMeanFreePath(), G4OpMieHG::GetMeanFreePath(), G4LowEnergyRayleigh::GetMeanFreePath(), G4LowEnergyCompton::GetMeanFreePath(), G4LowEnergyGammaConversion::GetMeanFreePath(), G4SynchrotronRadiationInMat::GetMeanFreePath(), G4ForwardXrayTR::GetMeanFreePath(), G4eplusPolarizedAnnihilation::GetMeanFreePath(), G4GammaConversionToMuons::GetMeanFreePath(), G4NeutronKiller::GetMeanFreePath(), G4ElectronCapture::GetMeanFreePath(), G4AnnihiToMuPair::GetMeanFreePath(), G4hImpactIonisation::GetMeanFreePath(), G4VXTRenergyLoss::GetMeanFreePath(), G4ePolarizedIonisation::GetMeanFreePath(), G4LowEnergyPolarizedCompton::GetMeanFreePath(), G4LowEnergyPhotoElectric::GetMeanFreePath(), G4PolarizedCompton::GetMeanFreePath(), G4OpAbsorption::GetMeanFreePath(), G4OpRayleigh::GetMeanFreePath(), G4OpWLS::GetMeanFreePath(), G4HadronicProcess::GetMeanFreePath(), G4Scintillation::GetMeanFreePath(), G4Decay::GetMeanFreePath(), G4EmCalculator::GetMeanFreePath(), G4OpBoundaryProcess::GetMeanFreePath(), G4ScreenedNuclearRecoil::GetMeanFreePath(), G4VMultipleScattering::GetMeanFreePath(), G4RadioactiveDecay::GetMeanFreePath(), G4Scintillation::GetMeanLifeTime(), G4RadioactiveDecay::GetMeanLifeTime(), GFlashParticleBounds::GetMinEneToParametrise(), G4SampleResonance::GetMinimumMass(), G4CollisionManager::GetNextCollision(), G4PAIxSection::GetPhotonRange(), G4NeutronHPPhotonDist::GetPhotons(), G4DensityEffectData::GetPlasmaEnergy(), G4EnergyLossTables::GetPreciseEnergyFromRange(), G4NuclearShellModelDensity::GetRadius(), G4NuclearFermiDensity::GetRadius(), G4LossTableManager::GetRange(), G4EnergyLossTables::GetRange(), G4LossTableManager::GetRangeFromRestricteDEDX(), G4MolecularDecayChannel::GetRMSRadialDisplacementOfProduct(), G4EmBiasingManager::GetStepLimit(), G4Scatterer::GetTimeToInteraction(), G4VMscModel::GetTransportMeanFreePath(), G4DensityEffectData::GetX0density(), G4DensityEffectData::GetX1density(), G4VCrossSectionSource::HighLimit(), G4WentzelVIRelXSection::Initialise(), G4WentzelOKandVIxSection::Initialise(), G4IonCoulombCrossSection::Initialise(), G4ScreeningMottCrossSection::Initialise(), G4EmModelManager::Initialise(), G4VEmModel::InitialiseElementSelectors(), G4ITStepProcessor::Initialize(), G4VEmProcess::MeanFreePath(), G4VEnergyLossProcess::MeanFreePath(), G4KDTree::Nearest(), operator<<(), G4DNASecondOrderReaction::PostStepDoIt(), G4VEmProcess::PostStepDoIt(), G4VEnergyLossProcess::PostStepDoIt(), Em10StepCut::PostStepGetPhysicalInteractionLength(), F03StepCut::PostStepGetPhysicalInteractionLength(), F02StepCut::PostStepGetPhysicalInteractionLength(), F01StepCut::PostStepGetPhysicalInteractionLength(), G4StepLimiter::PostStepGetPhysicalInteractionLength(), DMXMinEkineCuts::PostStepGetPhysicalInteractionLength(), G4MinEkineCuts::PostStepGetPhysicalInteractionLength(), G4UserSpecialCuts::PostStepGetPhysicalInteractionLength(), F04StepMax::PostStepGetPhysicalInteractionLength(), HadrontherapyStepMax::PostStepGetPhysicalInteractionLength(), DMXSpecialCuts::PostStepGetPhysicalInteractionLength(), G4SpecialCuts::PostStepGetPhysicalInteractionLength(), G4MaxTimeCuts::PostStepGetPhysicalInteractionLength(), WLSStepMax::PostStepGetPhysicalInteractionLength(), DMXMaxTimeCuts::PostStepGetPhysicalInteractionLength(), IORTStepMax::PostStepGetPhysicalInteractionLength(), G4DNASecondOrderReaction::PostStepGetPhysicalInteractionLength(), ML2StepMax::PostStepGetPhysicalInteractionLength(), G4VITRestDiscreteProcess::PostStepGetPhysicalInteractionLength(), G4VContinuousDiscreteProcess::PostStepGetPhysicalInteractionLength(), XrayTelStepCut::PostStepGetPhysicalInteractionLength(), G4VRestDiscreteProcess::PostStepGetPhysicalInteractionLength(), G4VRestContinuousDiscreteProcess::PostStepGetPhysicalInteractionLength(), G4VDiscreteProcess::PostStepGetPhysicalInteractionLength(), G4HadronStoppingProcess::PostStepGetPhysicalInteractionLength(), G4ElectronCapture::PostStepGetPhysicalInteractionLength(), G4NeutronKiller::PostStepGetPhysicalInteractionLength(), G4Transportation::PostStepGetPhysicalInteractionLength(), G4WeightCutOffProcess::PostStepGetPhysicalInteractionLength(), G4ePolarizedIonisation::PostStepGetPhysicalInteractionLength(), G4ImportanceProcess::PostStepGetPhysicalInteractionLength(), G4CoupledTransportation::PostStepGetPhysicalInteractionLength(), G4eplusPolarizedAnnihilation::PostStepGetPhysicalInteractionLength(), G4MonopoleTransportation::PostStepGetPhysicalInteractionLength(), G4WeightWindowProcess::PostStepGetPhysicalInteractionLength(), G4ITTransportation::PostStepGetPhysicalInteractionLength(), G4PolarizedCompton::PostStepGetPhysicalInteractionLength(), G4ParallelWorldProcess::PostStepGetPhysicalInteractionLength(), G4FastSimulationManagerProcess::PostStepGetPhysicalInteractionLength(), G4Cerenkov::PostStepGetPhysicalInteractionLength(), G4ScoreSplittingProcess::PostStepGetPhysicalInteractionLength(), G4Decay::PostStepGetPhysicalInteractionLength(), G4ParallelWorldScoringProcess::PostStepGetPhysicalInteractionLength(), G4VEmProcess::PostStepGetPhysicalInteractionLength(), G4BiasingProcessInterface::PostStepGetPhysicalInteractionLength(), G4VMultipleScattering::PostStepGetPhysicalInteractionLength(), G4VEnergyLossProcess::PostStepGetPhysicalInteractionLength(), G4VEmProcess::PreparePhysicsTable(), G4VEnergyLossProcess::PreparePhysicsTable(), G4IonParametrisedLossModel::PrintDEDXTable(), G4CoulombScattering::PrintInfo(), G4eBremsstrahlung::PrintInfo(), G4BOptnForceCommonTruncatedExp::ProposeAlongStepLimit(), G4VBiasingOperation::ProposeAlongStepLimit(), HepGeom::BasicVector3D< T >::pseudoRapidity(), G4AnalyticalPolSolver::QuarticRoots(), RE01Trajectory::RE01Trajectory(), G4VoxelSafety::SafetyForVoxelHeader(), G4VoxelSafety::SafetyForVoxelNode(), G4NeutronHPLegendreStore::Sample(), G4ILawForceFreeFlight::SampleInteractionLength(), G4InteractionLawPhysical::SampleInteractionLength(), G4WentzelVIRelModel::SampleScattering(), G4WentzelVIModel::SampleScattering(), G4ChargeState::SetChargeAndMoments(), G4PrimaryTransformer::SetDecayProducts(), F04ElementField::SetGlobalPoint(), G4VEnergyLossProcess::SetLambdaTable(), G4UniversalFluctuation::SetParticleAndCharge(), CLHEP::RandStudentT::shoot(), G4VEmProcess::StartTracking(), G4VEnergyLossProcess::StartTracking(), StepMax::StepMax(), G4RKPropagation::Transport(), G4ILawForceFreeFlight::UpdateInteractionLengthForStep(), G4VBiasingInteractionLaw::UpdateInteractionLengthForStep(), and G4VEmModel::Value().

#define DBL_MIN   std::numeric_limits<double>::min()

Definition at line 75 of file templates.hh.

Referenced by HistoManager::AddTargetStep(), G4ITStepProcessor::ApplyProductionCut(), G4Hype::ApproxDistInside(), G4Hype::ApproxDistOutside(), G4Decay::AtRestGetPhysicalInteractionLength(), G4DecayProducts::Boost(), G4PAIPhotonModel::BuildLambdaVector(), G4PAIPhotonModel::BuildPAIonisationTable(), G4PolyconeSide::CalculateExtent(), G4Track::CalculateVelocity(), G4GammaConversionToMuons::ComputeMeanFreePath(), G4VEmModel::ComputeMeanFreePath(), RunAction::ComputeMscHighland(), Run::ComputeMscHighland(), G4ITStepProcessor::DealWithSecondaries(), G4BOptnForceFreeFlight::DenyProcessPostStepDoIt(), UPolyconeSide::Distance(), G4EllipticalTube::DistanceToIn(), G4Hype::DistanceToIn(), G4EllipticalTube::DistanceToOut(), G4Hype::DistanceToOut(), G4TwistTubsSide::DistanceToSurface(), G4TwistTubsHypeSide::DistanceToSurface(), UPolyhedraSide::Extent(), UPolyconeSide::Extent(), G4PolyconeSide::Extent(), G4PolyhedraSide::Extent(), G4PolyPhiFace::G4PolyPhiFace(), G4TwistedTubs::G4TwistedTubs(), G4tgrUtils::GetDouble(), G4TripathiCrossSection::GetElementCrossSection(), G4EnergyRangeManager::GetHadronicInteraction(), G4AnnihiToMuPair::GetMeanFreePath(), G4VXTRenergyLoss::GetMeanFreePath(), G4UnknownDecay::GetMeanFreePath(), G4Decay::GetMeanFreePath(), G4RadioactiveDecay::GetMeanFreePath(), G4PAIxSection::GetPhotonRange(), G4IonCoulombCrossSection::Initialise(), G4ScreeningMottCrossSection::Initialise(), G4BOptnForceCommonTruncatedExp::Initialize(), G4TwistTubsHypeSide::Inside(), G4PolyconeSide::Intersect(), G4Hype::IntersectHype(), G4EllipticalTube::IntersectXY(), G4ITStepProcessor::InvokeAlongStepDoItProcs(), G4DecayProducts::IsChecked(), G4VXResonance::IsospinCorrection(), operator<<(), UPolyconeSide::PointOnCone(), G4PolyconeSide::PointOnCone(), G4UserSpecialCuts::PostStepGetPhysicalInteractionLength(), G4UnknownDecay::PostStepGetPhysicalInteractionLength(), G4Decay::PostStepGetPhysicalInteractionLength(), MyKleinNishinaCompton::SampleSecondaries(), G4PolarizedMollerBhabhaModel::SampleSecondaries(), G4HeatedKleinNishinaCompton::SampleSecondaries(), G4PolarizedComptonModel::SampleSecondaries(), G4KleinNishinaCompton::SampleSecondaries(), G4PolarizedAnnihilationModel::SampleSecondaries(), DetectorConstruction::SetAbsorSizeYZ(), DetectorConstruction::SetAbsorThickness(), G4ReactionProduct::SetDefinitionAndUpdateE(), DetectorConstruction::SetMaxStepLength(), DetectorConstruction::SetMaxStepSize(), G4RPGInelastic::SetUpChange(), and UPolyPhiFace::UPolyPhiFace().

#define FLT_DIG   std::numeric_limits<float>::digits10

Definition at line 95 of file templates.hh.

#define FLT_EPSILON   std::numeric_limits<float>::epsilon()

Definition at line 103 of file templates.hh.

#define FLT_MAX   std::numeric_limits<float>::max()
#define FLT_MIN   std::numeric_limits<float>::min()

Definition at line 91 of file templates.hh.

Referenced by G4tgrUtils::GetDouble().

#define G4_SQR_DEFINED

Definition at line 139 of file templates.hh.

#define HIGH_PRECISION   1

Definition at line 62 of file templates.hh.

#define INT_MAX   std::numeric_limits<int>::max()
#define INT_MIN   std::numeric_limits<int>::min()

Definition at line 115 of file templates.hh.

Referenced by G4tgrUtils::GetDouble().

#define MAXFLOAT   std::numeric_limits<float>::max()

Definition at line 107 of file templates.hh.

Typedef Documentation

typedef double Float

Definition at line 66 of file templates.hh.

Function Documentation

int G4lint ( double  ad)
inline

Definition at line 168 of file templates.hh.

169 {
170  return (ad>0) ? static_cast<int>(ad) : static_cast<int>(ad-1.);
171 }
int G4lrint ( double  ad)
inline

Definition at line 163 of file templates.hh.

Referenced by G4EmBiasingManager::ActivateSecondaryBiasing(), G4Material::AddElement(), G4Material::AddMaterial(), G4VAtomDeexcitation::AlongStepDeexcitation(), G4BinaryLightIonReaction::ApplyYourself(), G4LowEIonFragmentation::ApplyYourself(), G4VEnergyLossProcess::BuildLambdaTable(), G4CrossSectionPairGG::BuildPhysicsTable(), G4NeutronInelasticXS::BuildPhysicsTable(), G4BGGNucleonInelasticXS::BuildPhysicsTable(), G4BGGPionElasticXS::BuildPhysicsTable(), G4BGGNucleonElasticXS::BuildPhysicsTable(), G4BGGPionInelasticXS::BuildPhysicsTable(), G4HadronicProcess::CheckEnergyMomentumConservation(), G4Clebsch::ClebschGordan(), G4VCrossSectionDataSet::ComputeCrossSection(), G4LivermorePolarizedPhotoElectricModel::ComputeCrossSectionPerAtom(), G4LivermoreRayleighModel::ComputeCrossSectionPerAtom(), G4LivermorePhotoElectricModel::ComputeCrossSectionPerAtom(), G4LivermoreComptonModel::ComputeCrossSectionPerAtom(), G4WentzelVIModel::ComputeCrossSectionPerAtom(), G4WentzelVIRelModel::ComputeCrossSectionPerAtom(), G4UrbanMscModel::ComputeCrossSectionPerAtom(), G4EmCalculator::ComputeCrossSectionPerAtom(), G4MuBremsstrahlungModel::ComputeDMicroscopicCrossSection(), G4SeltzerBergerModel::ComputeDXSectionPerAtom(), G4LivermoreBremsstrahlungModel::ComputeDXSectionPerAtom(), G4MonopolePhysics::ConstructProcess(), G4KineticTrack::Decay(), G4Fissioner::deExcite(), G4PreCompoundModel::DeExcite(), G4Element::G4Element(), G4mplIonisationWithDeltaModel::G4mplIonisationWithDeltaModel(), G4CrossSectionDataStore::GetCrossSection(), G4ComponentSAIDTotalXS::GetElasticElementCrossSection(), G4TripathiCrossSection::GetElementCrossSection(), G4HadronInelasticDataSet::GetElementCrossSection(), G4HadronElasticDataSet::GetElementCrossSection(), G4IonsKoxCrossSection::GetElementCrossSection(), G4IonsSihverCrossSection::GetElementCrossSection(), G4IonsShenCrossSection::GetElementCrossSection(), G4GGNuclNuclCrossSection::GetElementCrossSection(), G4NeutronElasticXS::GetElementCrossSection(), G4CrossSectionPairGG::GetElementCrossSection(), G4IonProtonCrossSection::GetElementCrossSection(), G4NeutronInelasticXS::GetElementCrossSection(), G4TripathiLightCrossSection::GetElementCrossSection(), G4GeneralSpaceNNCrossSection::GetElementCrossSection(), G4ComponentGGNuclNuclXsc::GetElementCrossSection(), G4PionMinusField::GetField(), G4MesonAbsorption::GetFinalState(), G4GlauberGribovCrossSection::GetHadronNucleonXsc(), G4GGNuclNuclCrossSection::GetHadronNucleonXsc(), G4ComponentGGHadronNucleusXsc::GetHadronNucleonXsc(), G4ComponentGGNuclNuclXsc::GetHadronNucleonXsc(), G4GlauberGribovCrossSection::GetHadronNucleonXscNS(), G4ComponentGGHadronNucleusXsc::GetHadronNucleonXscNS(), G4GlauberGribovCrossSection::GetHadronNucleonXscPDG(), G4ComponentGGHadronNucleusXsc::GetHadronNucleonXscPDG(), G4GlauberGribovCrossSection::GetHNinelasticXsc(), G4ComponentGGHadronNucleusXsc::GetHNinelasticXsc(), G4ComponentSAIDTotalXS::GetInelasticElementCrossSection(), G4IonsShenCrossSection::GetIsoCrossSection(), G4GlauberGribovCrossSection::GetNucleusRadius(), G4ComponentGGHadronNucleusXsc::GetNucleusRadius(), G4ProtonInelasticCrossSection::GetProtonCrossSection(), G4CollisionInitialState::GetTargetBaryonNumber(), G4CollisionInitialState::GetTargetCharge(), G4ComponentSAIDTotalXS::GetTotalElementCrossSection(), G4LivermoreRayleighModel::Initialise(), G4LivermoreComptonModel::Initialise(), G4VAtomDeexcitation::InitialiseAtomicDeexcitation(), G4hhIonisation::InitialiseEnergyLossProcess(), G4mplIonisation::InitialiseEnergyLossProcess(), G4VEmModel::InitialiseForMaterial(), G4HadronNucleonXsc::IsApplicable(), G4TripathiLightCrossSection::IsElementApplicable(), G4VXResonance::IsospinCorrection(), G4MuPairProductionModel::MaxSecondaryEnergyForElement(), G4eCoulombScatteringModel::MinPrimaryEnergy(), G4NeutronHPChannel::Register(), G4ElectronIonPair::SampleNumberOfIonsAlongStep(), G4WentzelVIModel::SampleScattering(), G4WentzelVIRelModel::SampleScattering(), G4LivermorePolarizedPhotoElectricModel::SampleSecondaries(), G4LivermoreRayleighModel::SampleSecondaries(), G4LivermorePhotoElectricModel::SampleSecondaries(), G4LivermoreComptonModel::SampleSecondaries(), G4KleinNishinaModel::SampleSecondaries(), G4PEEffectFluoModel::SampleSecondaries(), G4eBremsstrahlungRelModel::SampleSecondaries(), G4PAIPhotModel::SampleSecondaries(), G4eBremParametrizedModel::SampleSecondaries(), G4PAIModel::SampleSecondaries(), G4CrossSectionDataStore::SampleZandA(), G4Scatterer::Scatter(), G4QuasiElasticChannel::Scatter(), HistoManager::ScoreNewTrack(), G4NeutronCaptureXS::SelectIsotope(), G4NeutronInelasticXS::SelectIsotope(), G4ElementSelector::SelectZandA(), G4Fragment::SetA(), G4KM_OpticalEqRhs::SetFactor(), G4VEmProcess::SetMaxKinEnergy(), G4VEmProcess::SetMinKinEnergy(), G4Nucleus::SetParameters(), G4Fragment::SetZ(), HadrontherapyDetectorConstruction::UpdateGeometry(), IORTDetectorConstruction::UpdateGeometry(), and G4Clebsch::Wigner3J().

164 {
165  return (ad>0) ? static_cast<int>(ad+.5) : static_cast<int>(ad-.5);
166 }
int G4rint ( double  ad)
inline

Definition at line 173 of file templates.hh.

174 {
175  return (ad>0) ? static_cast<int>(ad+1) : static_cast<int>(ad);
176 }
template<class T >
void G4SwapObj ( T *  a,
T *  b 
)
inline

Definition at line 129 of file templates.hh.

References test::a, and test::b.

Referenced by G4KineticTrack::G4KineticTrack(), and G4MesonSplitter::SplitMeson().

130 {
131  T tmp= *a;
132  *a = *b;
133  *b = tmp;
134 }
template<class T >
void G4SwapPtr ( T *&  a,
T *&  b 
)
inline

Definition at line 121 of file templates.hh.

References test::a, and test::b.

122 {
123  T* tmp= a;
124  a = b;
125  b = tmp;
126 }
template<class T >
T sqr ( const T &  x)
inline

Definition at line 145 of file templates.hh.

References test::x.

Referenced by G4KDTree::__NearestInRange(), G4KDTree::__NearestToNode(), G4KDTree::__NearestToPosition(), G4Transportation::AlongStepGetPhysicalInteractionLength(), G4CoupledTransportation::AlongStepGetPhysicalInteractionLength(), G4MonopoleTransportation::AlongStepGetPhysicalInteractionLength(), G4ITTransportation::AlongStepGetPhysicalInteractionLength(), G4FTFAnnihilation::Annihilate(), G4KineticTrackVector::BoostBeam(), G4PairProductionRelModel::CalcLPMFunctions(), G4Ellipsoid::CalculateExtent(), CalculatePointSafety(), HyperRect::CompareDistSqr(), G4PolarizedComptonModel::ComputeAsymmetryPerAtom(), G4AngularDistributionNP::CosTheta(), G4AngularDistributionPP::CosTheta(), G4DiffractiveExcitation::CreateStrings(), G4Parton::DefineMomentumInZ(), G4GHEKinematicsVector::Defs1(), G4AngularDistribution::DifferentialCrossSection(), G4PolyconeSide::DistanceAway(), G4Ellipsoid::DistanceToIn(), G4Paraboloid::DistanceToIn(), G4EllipticalCone::DistanceToIn(), G4Ellipsoid::DistanceToOut(), G4Paraboloid::DistanceToOut(), G4EllipticalCone::DistanceToOut(), G4PathFinder::DoNextLinearStep(), G4ElasticHNScattering::ElasticScattering(), G4BrentLocator::EstimateIntersectionPoint(), G4MultiLevelLocator::EstimateIntersectionPoint(), G4SimpleLocator::EstimateIntersectionPoint(), G4ErrorMag_UsualEqRhs::EvaluateRhsGivenB(), G4Mag_SpinEqRhs::EvaluateRhsGivenB(), G4DiffractiveExcitation::ExciteParticipants(), G4SingleDiffractiveExcitation::ExciteParticipants(), ExN04Field::ExN04Field(), G4FTFParameters::G4FTFParameters(), G4NuclearFermiDensity::G4NuclearFermiDensity(), G4PolarizedComptonCrossSection::G4PolarizedComptonCrossSection(), MedicalBeam::GeneratePrimaries(), G4ReactionDynamics::GenerateXandPt(), G4NuclearFermiDensity::GetDeriv(), H02Field::GetFieldValue(), ExN04Field::GetFieldValue(), RE01Field::GetFieldValue(), RE05Field::GetFieldValue(), G4MesonAbsorption::GetFinalState(), G4VKinkyStringDecay::GetLightConeGluonZ(), G4FTFParticipants::GetList(), G4PolarizationHelper::GetParticleFrameX(), G4PolarizationHelper::GetParticleFrameY(), G4Polycone::GetPointOnCone(), G4EllipticalTube::GetPointOnSurface(), G4Polycone::GetPointOnSurface(), G4Orb::GetPointOnSurface(), G4Ellipsoid::GetPointOnSurface(), G4Polyhedra::GetPointOnSurface(), G4Paraboloid::GetPointOnSurface(), G4Hype::GetPointOnSurface(), G4EllipticalCone::GetPointOnSurface(), G4Cons::GetPointOnSurface(), G4Sphere::GetPointOnSurface(), G4TwistedTubs::GetPointOnSurface(), G4CSGSolid::GetRadiusInRing(), UUtils::GetRadiusInRing(), G4PolarizationHelper::GetSpinInPRF(), G4GHEKinematicsVector::Impu(), G4PolarizedAnnihilationCrossSection::Initialize(), G4PolarizedComptonCrossSection::Initialize(), G4Ellipsoid::Inside(), G4Paraboloid::Inside(), G4EllipticalCone::Inside(), G4VLongitudinalStringDecay::LightFragmentationTest(), G4IntersectingCone::LineHitsCone1(), G4IntersectingCone::LineHitsCone2(), G4GHEKinematicsVector::Lor(), G4KDTree::NearestInRange(), G4MagInt_Driver::OneGoodStep(), ExN04MuonSD::ProcessHits(), RE05MuonSD::ProcessHits(), pyvacu(), G4MagInt_Driver::QuickAdvance(), RE01Field::RE01Field(), RE05Field::RE05Field(), G4SafetyHelper::ReLocateWithinVolume(), G4AntiNuclElastic::SampleInvariantT(), G4VLongitudinalStringDecay::SampleQuarkPt(), G4PolarizedMollerBhabhaModel::SampleSecondaries(), G4PolarizedComptonModel::SampleSecondaries(), G4PolarizedAnnihilationModel::SampleSecondaries(), G4QuasiElasticChannel::Scatter(), G4QGSParticipants::SelectInteractions(), G4EqEMFieldWithSpin::SetChargeMomentumMass(), G4RepleteEofM::SetChargeMomentumMass(), G4EqEMFieldWithEDM::SetChargeMomentumMass(), G4Mag_SpinEqRhs::SetChargeMomentumMass(), G4QGSDiffractiveExcitation::String(), G4PolyconeSide::SurfaceArea(), G4Paraboloid::SurfaceNormal(), G4EllipticalCone::SurfaceNormal(), G4PolarizedAnnihilationCrossSection::TotalXSection(), G4PolarizedComptonCrossSection::TotalXSection(), G4RKPropagation::Transport(), G4KineticTrack::Update4Momentum(), and G4KineticTrack::UpdateTrackingMomentum().

146 {
147  return x*x;
148 }