Import Geant4 7.0.0 source tree
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4CashKarpRKF45.cc,v 1.13 2003/10/31 14:35:53 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00-patch-01 $
|
||||
// GEANT4 tag $Name: geant4-07-00-cand-01 $
|
||||
//
|
||||
// The Cash-Karp Runge-Kutta-Fehlberg 4/5 method is an embedded fourth
|
||||
// order method (giving fifth-order accuracy) for the solution of an ODE.
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ChordFinder.cc,v 1.45 2003/11/13 19:46:56 japost Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00-patch-01 $
|
||||
// $Id: G4ChordFinder.cc,v 1.46 2004/12/02 09:55:19 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-00-cand-03 $
|
||||
//
|
||||
//
|
||||
// 25.02.97 John Apostolakis, design and implimentation
|
||||
@@ -350,11 +350,11 @@ G4double G4ChordFinder::NewStep(G4double stepTrialOld,
|
||||
|
||||
#if 1
|
||||
// const G4double threshold = 1.21, multiplier = 0.9;
|
||||
// 0.9 < 1 / sqrt(1.21)
|
||||
// 0.9 < 1 / std::sqrt(1.21)
|
||||
|
||||
if (dChordStep > 0.0)
|
||||
{
|
||||
stepEstimate_Unconstrained = stepTrialOld*sqrt( fDeltaChord / dChordStep );
|
||||
stepEstimate_Unconstrained = stepTrialOld*std::sqrt( fDeltaChord / dChordStep );
|
||||
// stepTrial = 0.98 * stepEstimate_Unconstrained;
|
||||
stepTrial = fFractionNextEstimate * stepEstimate_Unconstrained;
|
||||
}
|
||||
@@ -529,7 +529,7 @@ G4ChordFinder::TestChordPrint( G4int noTrials,
|
||||
G4int oldprec= G4cout.precision(5);
|
||||
G4cout << " ChF/fnc: notrial " << std::setw( 3) << noTrials
|
||||
<< " this_step= " << std::setw(10) << lastStepTrial;
|
||||
if( fabs( (dChordStep / fDeltaChord) - 1.0 ) < 0.001 ){
|
||||
if( std::fabs( (dChordStep / fDeltaChord) - 1.0 ) < 0.001 ){
|
||||
G4cout.precision(8);
|
||||
}else{ G4cout.precision(6); }
|
||||
G4cout << " dChordStep= " << std::setw(12) << dChordStep;
|
||||
|
||||
@@ -95,7 +95,7 @@ CalculatePointSafety(G4ThreeVector safetyOrigin,
|
||||
G4ThreeVector OriginShift = point - safetyOrigin ;
|
||||
G4double MagSqShift = OriginShift.mag2() ;
|
||||
if( MagSqShift < sqr(safetyRadius) ){
|
||||
pointSafety = safetyRadius - sqrt(MagSqShift) ;
|
||||
pointSafety = safetyRadius - std::sqrt(MagSqShift) ;
|
||||
}
|
||||
|
||||
return pointSafety;
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4ClassicalRK4.cc,v 1.11 2003/11/05 16:31:48 japost Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00-patch-01 $
|
||||
// GEANT4 tag $Name: geant4-07-00-cand-01 $
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4DELPHIMagField.cc,v 1.4 2003/10/31 14:35:53 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00-patch-01 $
|
||||
// $Id: G4DELPHIMagField.cc,v 1.5 2004/12/02 09:55:20 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-00-cand-03 $
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
#include "G4DELPHIMagField.hh"
|
||||
@@ -50,7 +50,7 @@ void G4DELPHIMagField::GetFieldValue( const G4double yTrack[7],
|
||||
G4double x2 = x*x, y2 = y*y, z2 = z*z, r2 = x2 + y2 ;
|
||||
G4double r4 = r2*r2, z4 = z2*z2, r6 = r4*r2, z6 = z4*z2 ;
|
||||
G4double r8 = r4*r4, z8 = z4*z4, r10 = r8*r2, z10 = z8*z2 ;
|
||||
G4double rz = z*sqrt(r2), r = sqrt(r2+a*a) ;
|
||||
G4double rz = z*std::sqrt(r2), r = std::sqrt(r2+a*a) ;
|
||||
G4double Br ;
|
||||
G4double P[8], Q[8] ;
|
||||
static G4double c[8] = {
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4ElectricField.cc,v 1.1 2003/11/05 10:40:59 japost Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00-patch-01 $
|
||||
// GEANT4 tag $Name: geant4-07-00-cand-01 $
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4ElectroMagneticField.cc,v 1.2 2003/11/05 10:41:00 japost Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00-patch-01 $
|
||||
// GEANT4 tag $Name: geant4-07-00-cand-01 $
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4EqMagElectricField.cc,v 1.11 2003/11/05 17:31:59 japost Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00-patch-01 $
|
||||
// $Id: G4EqMagElectricField.cc,v 1.12 2004/12/02 09:55:20 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-00-cand-03 $
|
||||
//
|
||||
//
|
||||
// This is the standard right-hand side for equation of motion.
|
||||
@@ -61,10 +61,10 @@ G4EqMagElectricField::EvaluateRhsGivenB(const G4double y[],
|
||||
|
||||
G4double pSquared = y[3]*y[3] + y[4]*y[4] + y[5]*y[5] ;
|
||||
|
||||
G4double Energy = sqrt( pSquared + fMassCof );
|
||||
G4double Energy = std::sqrt( pSquared + fMassCof );
|
||||
G4double cof2 = Energy/c_light ;
|
||||
|
||||
G4double pModuleInverse = 1.0/sqrt(pSquared) ;
|
||||
G4double pModuleInverse = 1.0/std::sqrt(pSquared) ;
|
||||
|
||||
// G4double inverse_velocity = Energy * c_light * pModuleInverse;
|
||||
G4double inverse_velocity = Energy * pModuleInverse / c_light;
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4EquationOfMotion.cc,v 1.8 2003/10/31 14:35:53 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00-patch-01 $
|
||||
// GEANT4 tag $Name: geant4-07-00-cand-01 $
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4ExplicitEuler.cc,v 1.7 2003/11/05 16:31:49 japost Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00-patch-01 $
|
||||
// GEANT4 tag $Name: geant4-07-00-cand-01 $
|
||||
//
|
||||
//
|
||||
// Explicit Euler: x_1 = x_0 + h * dx_0
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4FieldManager.cc,v 1.13 2003/11/08 04:08:13 japost Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00-patch-01 $
|
||||
// GEANT4 tag $Name: geant4-07-00-cand-01 $
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4FieldTrack.cc,v 1.6 2003/10/31 14:35:54 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00-patch-01 $
|
||||
// GEANT4 tag $Name: geant4-07-00-cand-01 $
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4HarmonicPolMagField.cc,v 1.5 2003/10/31 14:35:54 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00-patch-01 $
|
||||
// GEANT4 tag $Name: geant4-07-00-cand-01 $
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4HelixExplicitEuler.cc,v 1.5 2003/10/31 14:35:54 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00-patch-01 $
|
||||
// GEANT4 tag $Name: geant4-07-00-cand-01 $
|
||||
//
|
||||
//
|
||||
// Helix Explicit Euler: x_1 = x_0 + helix(h)
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4HelixHeum.cc,v 1.5 2003/10/31 14:35:54 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00-patch-01 $
|
||||
// GEANT4 tag $Name: geant4-07-00-cand-01 $
|
||||
//
|
||||
//
|
||||
// Simple Heum:
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4HelixImplicitEuler.cc,v 1.5 2003/10/31 14:35:54 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00-patch-01 $
|
||||
// GEANT4 tag $Name: geant4-07-00-cand-01 $
|
||||
//
|
||||
//
|
||||
// Helix Implicit Euler:
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4HelixSimpleRunge.cc,v 1.6 2003/10/31 14:35:54 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00-patch-01 $
|
||||
// GEANT4 tag $Name: geant4-07-00-cand-01 $
|
||||
//
|
||||
//
|
||||
// Simple Runge:
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4ImplicitEuler.cc,v 1.8 2003/11/05 16:31:49 japost Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00-patch-01 $
|
||||
// GEANT4 tag $Name: geant4-07-00-cand-01 $
|
||||
//
|
||||
//
|
||||
// Implicit Euler:
|
||||
|
||||
@@ -20,8 +20,8 @@
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4LineCurrentMagField.cc,v 1.4 2003/10/31 14:35:54 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00-patch-01 $
|
||||
// $Id: G4LineCurrentMagField.cc,v 1.5 2004/12/02 09:55:20 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-00-cand-03 $
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
#include "G4LineCurrentMagField.hh"
|
||||
@@ -47,7 +47,7 @@ void G4LineCurrentMagField::GetFieldValue( const G4double yTrack[7],
|
||||
G4double a = 1.00*mm ; // mm -> m
|
||||
G4double x = a*yTrack[0], y = a*yTrack[1] ;
|
||||
G4double x2 = x*x, y2 = y*y, r2 = x2 + y2 ;
|
||||
G4double r = sqrt(r2+a*a) ;
|
||||
G4double r = std::sqrt(r2+a*a) ;
|
||||
G4double Br = fFieldConstant/r;
|
||||
B[0] = -Br*y/r ;
|
||||
B[1] = Br*x/r ;
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4LineSection.cc,v 1.8 2003/10/31 14:35:54 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00-patch-01 $
|
||||
// $Id: G4LineSection.cc,v 1.9 2004/12/02 09:55:20 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-00-cand-03 $
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
@@ -93,7 +93,7 @@ G4double G4LineSection::Dist( G4ThreeVector OtherPnt ) const
|
||||
}
|
||||
if( dist_sq < 0.0 ) dist_sq = 0.0 ;
|
||||
|
||||
return sqrt(dist_sq) ;
|
||||
return std::sqrt(dist_sq) ;
|
||||
}
|
||||
|
||||
G4double G4LineSection::Distline( const G4ThreeVector& OtherPnt,
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4MagErrorStepper.cc,v 1.12 2003/10/31 14:35:54 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00-patch-01 $
|
||||
// GEANT4 tag $Name: geant4-07-00-cand-01 $
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4MagHelicalStepper.cc,v 1.13 2003/10/31 14:35:54 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00-patch-01 $
|
||||
// $Id: G4MagHelicalStepper.cc,v 1.14 2004/12/02 09:55:20 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-00-cand-03 $
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
@@ -95,7 +95,7 @@ G4MagHelicalStepper::AdvanceHelix( const G4double yIn[],
|
||||
vpar = B_d_P * Bnorm; // the component parallel to B
|
||||
vperp= initTangent - vpar; // the component perpendicular to B
|
||||
|
||||
// B_v_P = sqrt( 1 - B_d_P * B_d_P); // Fraction of P perp to B
|
||||
// B_v_P = std::sqrt( 1 - B_d_P * B_d_P); // Fraction of P perp to B
|
||||
|
||||
// calculate the radius^-1 of the helix and the stepping angle
|
||||
|
||||
@@ -103,7 +103,7 @@ G4MagHelicalStepper::AdvanceHelix( const G4double yIn[],
|
||||
R_1 = - fCoefficient * Bmag; // / B_v_P - but this cancels
|
||||
|
||||
// again in Theta - so we don't need it.
|
||||
if( fabs(R_1) < 1e-10 ) {
|
||||
if( std::fabs(R_1) < 1e-10 ) {
|
||||
LinearStep( yIn, h, yHelix );
|
||||
} else {
|
||||
|
||||
@@ -111,11 +111,11 @@ G4MagHelicalStepper::AdvanceHelix( const G4double yIn[],
|
||||
|
||||
// Trigonometrix
|
||||
|
||||
if( fabs(Theta) > approc_limit ) {
|
||||
SinT2 = sin(0.5 * Theta);
|
||||
CosT2 = cos(0.5 * Theta);
|
||||
// SinT = sin(Theta);
|
||||
// CosT = cos(Theta);
|
||||
if( std::fabs(Theta) > approc_limit ) {
|
||||
SinT2 = std::sin(0.5 * Theta);
|
||||
CosT2 = std::cos(0.5 * Theta);
|
||||
// SinT = std::sin(Theta);
|
||||
// CosT = std::cos(Theta);
|
||||
SinT = 2.0 * SinT2 * CosT2;
|
||||
CosT = 1.0 - 2.0 * SinT2 * SinT2;
|
||||
} else {
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4MagIntegratorDriver.cc,v 1.41 2003/10/31 14:35:55 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00-patch-01 $
|
||||
// $Id: G4MagIntegratorDriver.cc,v 1.42 2004/12/02 09:55:20 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-00-cand-03 $
|
||||
//
|
||||
//
|
||||
//
|
||||
@@ -273,12 +273,12 @@ G4MagInt_Driver::AccurateAdvance(G4FieldTrack& y_current,
|
||||
// #endif
|
||||
|
||||
// Check the proposed next stepsize
|
||||
if(fabs(hnext) <= Hmin())
|
||||
if(std::fabs(hnext) <= Hmin())
|
||||
{
|
||||
#ifdef G4DEBUG_FIELD
|
||||
// If simply a very small interval is being integrated, do not warn
|
||||
if( (x < x2 * (1-eps) ) && // The last step can be small: it's OK
|
||||
(fabs(hstep) > Hmin()) // and if we are asked, it's OK
|
||||
(std::fabs(hstep) > Hmin()) // and if we are asked, it's OK
|
||||
// && (hnext < hstep * PerThousand )
|
||||
){
|
||||
if(dbg>0){
|
||||
@@ -486,11 +486,11 @@ G4MagInt_Driver::OneGoodStep( G4double y[], // InOut
|
||||
errvel_sq *= inv_eps_vel_sq;
|
||||
|
||||
errmax_sq = std::max( errpos_sq, errvel_sq ); // Square of maximum error
|
||||
// errmax = sqrt( errmax_sq );
|
||||
// errmax = std::sqrt( errmax_sq );
|
||||
if(errmax_sq <= 1.0 ) break ; // Step succeeded.
|
||||
|
||||
// Step failed; compute the size of retrial Step.
|
||||
htemp = GetSafety()*h* pow( errmax_sq, 0.5*GetPshrnk() );
|
||||
htemp = GetSafety()*h* std::pow( errmax_sq, 0.5*GetPshrnk() );
|
||||
|
||||
if(htemp >= 0.1*h) h = htemp ; // Truncation error too large,
|
||||
else h = 0.1*h ; // reduce stepsize, but no more
|
||||
@@ -516,7 +516,7 @@ G4MagInt_Driver::OneGoodStep( G4double y[], // InOut
|
||||
|
||||
// Compute size of next Step
|
||||
if(errmax_sq > errcon*errcon)
|
||||
hnext = GetSafety()*h*pow(errmax_sq, 0.5*GetPgrow()) ;
|
||||
hnext = GetSafety()*h*std::pow(errmax_sq, 0.5*GetPgrow()) ;
|
||||
else hnext = max_stepping_increase*h ;
|
||||
// No more than a factor of 5 increase
|
||||
|
||||
@@ -625,7 +625,7 @@ G4bool G4MagInt_Driver::QuickAdvance(
|
||||
|
||||
#ifdef RETURN_A_NEW_STEP_LENGTH
|
||||
// The following step cannot be done here because "eps" is not known.
|
||||
dyerr_len = sqrt( dyerr_len_sq );
|
||||
dyerr_len = std::sqrt( dyerr_len_sq );
|
||||
dyerr_len_sq /= eps ;
|
||||
|
||||
// Look at the velocity deviation ?
|
||||
@@ -636,10 +636,10 @@ G4bool G4MagInt_Driver::QuickAdvance(
|
||||
#endif
|
||||
|
||||
if( dyerr_pos_sq > ( dyerr_mom_rel_sq * sqr(hstep) ) ) {
|
||||
dyerr = sqrt(dyerr_pos_sq);
|
||||
dyerr = std::sqrt(dyerr_pos_sq);
|
||||
}else{
|
||||
// Scale it to the current step size - for now
|
||||
dyerr = sqrt(dyerr_mom_rel_sq) * hstep;
|
||||
dyerr = std::sqrt(dyerr_mom_rel_sq) * hstep;
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -678,10 +678,10 @@ G4MagInt_Driver::ComputeNewStepSize(
|
||||
if(errMaxNorm > 1.0 ) {
|
||||
|
||||
// Step failed; compute the size of retrial Step.
|
||||
hnew = GetSafety()*hstepCurrent*pow(errMaxNorm,GetPshrnk()) ;
|
||||
hnew = GetSafety()*hstepCurrent*std::pow(errMaxNorm,GetPshrnk()) ;
|
||||
}else if(errMaxNorm > 0.0 ){
|
||||
// Compute size of next Step for a successful step
|
||||
hnew = GetSafety()*hstepCurrent*pow(errMaxNorm,GetPgrow()) ;
|
||||
hnew = GetSafety()*hstepCurrent*std::pow(errMaxNorm,GetPgrow()) ;
|
||||
}else {
|
||||
// if error estimate is zero (possible) or negative (dubious)
|
||||
hnew = max_stepping_increase * hstepCurrent;
|
||||
@@ -707,7 +707,7 @@ G4MagInt_Driver::ComputeNewStepSize_WithinLimits(
|
||||
if(errMaxNorm > 1.0 ) {
|
||||
|
||||
// Step failed; compute the size of retrial Step.
|
||||
hnew = GetSafety()*hstepCurrent*pow(errMaxNorm,GetPshrnk()) ;
|
||||
hnew = GetSafety()*hstepCurrent*std::pow(errMaxNorm,GetPshrnk()) ;
|
||||
|
||||
if(hnew < max_stepping_decrease*hstepCurrent)
|
||||
hnew = max_stepping_decrease*hstepCurrent ;
|
||||
@@ -715,7 +715,7 @@ G4MagInt_Driver::ComputeNewStepSize_WithinLimits(
|
||||
// than this factor (value= 1/10)
|
||||
}else{
|
||||
// Compute size of next Step for a successful step
|
||||
if(errMaxNorm > errcon) hnew = GetSafety()*hstepCurrent*pow(errMaxNorm,GetPgrow()) ;
|
||||
if(errMaxNorm > errcon) hnew = GetSafety()*hstepCurrent*std::pow(errMaxNorm,GetPgrow()) ;
|
||||
else hnew = max_stepping_increase * hstepCurrent ;
|
||||
// No more than a factor of 5 increase
|
||||
}
|
||||
@@ -897,8 +897,8 @@ void G4MagInt_Driver::PrintStatisticsReport()
|
||||
<< " maximum= " << fDyerr_max
|
||||
// << " 2nd max= " << fDyerr_mx2
|
||||
<< " Sum small= " << fDyerrPos_smTot
|
||||
<< " sqrt(Sum large^2): pos= " << sqrt(fDyerrPos_lgTot)
|
||||
<< " vel= " << sqrt( fDyerrVel_lgTot )
|
||||
<< " std::sqrt(Sum large^2): pos= " << std::sqrt(fDyerrPos_lgTot)
|
||||
<< " vel= " << std::sqrt( fDyerrVel_lgTot )
|
||||
<< " Total h-distance: small= " << fSumH_sm
|
||||
<< " large= " << fSumH_lg
|
||||
<< G4endl;
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4MagIntegratorStepper.cc,v 1.10 2003/10/31 14:35:55 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00-patch-01 $
|
||||
// GEANT4 tag $Name: geant4-07-00-cand-01 $
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4Mag_EqRhs.cc,v 1.10 2003/11/05 16:33:55 japost Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00-patch-01 $
|
||||
// GEANT4 tag $Name: geant4-07-00-cand-01 $
|
||||
//
|
||||
// This is the standard right-hand side for equation of motion
|
||||
// in a pure Magnetic Field .
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Mag_SpinEqRhs.cc,v 1.9 2003/10/31 14:35:55 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00-patch-01 $
|
||||
// $Id: G4Mag_SpinEqRhs.cc,v 1.11 2004/12/02 09:55:20 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-00-cand-03 $
|
||||
//
|
||||
// This is the standard right-hand side for equation of motion.
|
||||
// This version of the right-hand side includes the three components
|
||||
@@ -39,7 +39,10 @@
|
||||
#include "G4ThreeVector.hh"
|
||||
|
||||
G4Mag_SpinEqRhs::G4Mag_SpinEqRhs( G4MagneticField* MagField )
|
||||
: G4Mag_EqRhs( MagField ) {}
|
||||
: G4Mag_EqRhs( MagField )
|
||||
{
|
||||
anomaly = 1.165923e-3;
|
||||
}
|
||||
|
||||
G4Mag_SpinEqRhs::~G4Mag_SpinEqRhs() {}
|
||||
|
||||
@@ -52,10 +55,10 @@ G4Mag_SpinEqRhs::SetChargeMomentumMass(G4double particleCharge, // in e+ units
|
||||
G4Mag_EqRhs::SetChargeMomentumMass(particleCharge, MomentumXc, mass);
|
||||
|
||||
omegac = 0.105658387*GeV/mass * 2.837374841e-3*(rad/cm/kilogauss);
|
||||
anomaly = 1.165923e-3;
|
||||
|
||||
ParticleCharge = particleCharge;
|
||||
|
||||
E = sqrt(sqr(MomentumXc)+sqr(mass));
|
||||
E = std::sqrt(sqr(MomentumXc)+sqr(mass));
|
||||
beta = MomentumXc/E;
|
||||
gamma = E/mass;
|
||||
|
||||
@@ -67,7 +70,7 @@ G4Mag_SpinEqRhs::EvaluateRhsGivenB( const G4double y[],
|
||||
G4double dydx[] ) const
|
||||
{
|
||||
G4double momentum_mag_square = sqr(y[3]) + sqr(y[4]) + sqr(y[5]);
|
||||
G4double inv_momentum_magnitude = 1.0 / sqrt( momentum_mag_square );
|
||||
G4double inv_momentum_magnitude = 1.0 / std::sqrt( momentum_mag_square );
|
||||
G4double cof = FCof()*inv_momentum_magnitude;
|
||||
|
||||
dydx[0] = y[3] * inv_momentum_magnitude; // (d/ds)x = Vx/V
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Mag_UsualEqRhs.cc,v 1.10 2003/11/05 17:31:31 japost Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00-patch-01 $
|
||||
// $Id: G4Mag_UsualEqRhs.cc,v 1.11 2004/12/02 09:55:20 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-00-cand-03 $
|
||||
//
|
||||
//
|
||||
// This is the 'standard' right-hand side for the equation of motion
|
||||
@@ -46,7 +46,7 @@ G4Mag_UsualEqRhs::EvaluateRhsGivenB( const G4double y[],
|
||||
G4double dydx[] ) const
|
||||
{
|
||||
G4double momentum_mag_square = y[3]*y[3] + y[4]*y[4] + y[5]*y[5];
|
||||
G4double inv_momentum_magnitude = 1.0 / sqrt( momentum_mag_square );
|
||||
G4double inv_momentum_magnitude = 1.0 / std::sqrt( momentum_mag_square );
|
||||
|
||||
G4double cof = FCof()*inv_momentum_magnitude;
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4MagneticField.cc,v 1.2 2003/11/05 10:40:59 japost Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00-patch-01 $
|
||||
// GEANT4 tag $Name: geant4-07-00-cand-01 $
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4QuadrupoleMagField.cc,v 1.3 2003/10/31 14:35:55 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00-patch-01 $
|
||||
// GEANT4 tag $Name: geant4-07-00-cand-01 $
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4RKG3_Stepper.cc,v 1.9 2003/10/31 14:35:55 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00-patch-01 $
|
||||
// GEANT4 tag $Name: geant4-07-00-cand-01 $
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4SimpleHeum.cc,v 1.7 2003/11/05 16:31:49 japost Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00-patch-01 $
|
||||
// GEANT4 tag $Name: geant4-07-00-cand-01 $
|
||||
//
|
||||
// Simple Heum:
|
||||
// x_1 = x_0 + h *
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4SimpleRunge.cc,v 1.9 2003/11/05 16:31:49 japost Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00-patch-01 $
|
||||
// GEANT4 tag $Name: geant4-07-00-cand-01 $
|
||||
//
|
||||
// Simple Runge:
|
||||
//
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4UniformElectricField.cc,v 1.10 2003/11/05 10:41:00 japost Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00-patch-01 $
|
||||
// $Id: G4UniformElectricField.cc,v 1.11 2004/12/02 09:55:21 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-00-cand-03 $
|
||||
//
|
||||
//
|
||||
//
|
||||
@@ -55,9 +55,9 @@ G4UniformElectricField::G4UniformElectricField(G4double vField,
|
||||
fFieldComponents[0] = 0.0;
|
||||
fFieldComponents[1] = 0.0;
|
||||
fFieldComponents[2] = 0.0;
|
||||
fFieldComponents[3] = vField*sin(vTheta)*cos(vPhi) ;
|
||||
fFieldComponents[4] = vField*sin(vTheta)*sin(vPhi) ;
|
||||
fFieldComponents[5] = vField*cos(vTheta) ;
|
||||
fFieldComponents[3] = vField*std::sin(vTheta)*std::cos(vPhi) ;
|
||||
fFieldComponents[4] = vField*std::sin(vTheta)*std::sin(vPhi) ;
|
||||
fFieldComponents[5] = vField*std::cos(vTheta) ;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4UniformMagField.cc,v 1.9 2004/02/09 14:43:10 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00-patch-01 $
|
||||
// $Id: G4UniformMagField.cc,v 1.10 2004/12/02 09:55:21 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-00-cand-03 $
|
||||
//
|
||||
//
|
||||
// Class for creation of uniform Magnetic Field
|
||||
@@ -56,9 +56,9 @@ G4UniformMagField::G4UniformMagField(G4double vField,
|
||||
vTheta >= 0 && vTheta <= pi &&
|
||||
vPhi >= 0 && vPhi <= twopi)
|
||||
{
|
||||
fFieldComponents[0] = vField*sin(vTheta)*cos(vPhi) ;
|
||||
fFieldComponents[1] = vField*sin(vTheta)*sin(vPhi) ;
|
||||
fFieldComponents[2] = vField*cos(vTheta) ;
|
||||
fFieldComponents[0] = vField*std::sin(vTheta)*std::cos(vPhi) ;
|
||||
fFieldComponents[1] = vField*std::sin(vTheta)*std::sin(vPhi) ;
|
||||
fFieldComponents[2] = vField*std::cos(vTheta) ;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user