Import Geant4 9.6.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 17:01:34 +02:00
parent b1eb5424d2
commit e2d2f9810a
10384 changed files with 698580 additions and 628834 deletions
+14 -3
View File
@@ -24,13 +24,14 @@
// ********************************************************************
//
//
// $Id: G4CSGSolid.cc,v 1.16 2010-10-19 15:42:09 gcosmo Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
// $Id$
//
// --------------------------------------------------------------------
#include "G4CSGSolid.hh"
#include <cmath>
#include "G4CSGSolid.hh"
#include "Randomize.hh"
#include "G4Polyhedron.hh"
//////////////////////////////////////////////////////////////////////////
@@ -97,6 +98,16 @@ G4CSGSolid& G4CSGSolid::operator = (const G4CSGSolid& rhs)
return *this;
}
G4double G4CSGSolid::GetRadiusInRing(G4double rmin, G4double rmax) const
{
// Generate radius in annular ring according to uniform area
//
if (rmin<=0.) { return rmax*std::sqrt(G4UniformRand()); }
if (rmin!=rmax) { return std::sqrt(G4UniformRand()
* (sqr(rmax)-sqr(rmin))+sqr(rmin)); }
return rmin;
}
std::ostream& G4CSGSolid::StreamInfo(std::ostream& os) const
{
os << "-----------------------------------------------------------\n"