Import Geant4 9.2.0 source tree
This commit is contained in:
@@ -24,8 +24,8 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4TriangularFacet.cc,v 1.10 2007/12/10 16:30:35 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// $Id: G4TriangularFacet.cc,v 1.12 2008/11/13 08:25:07 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
// %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
//
|
||||
@@ -74,7 +74,7 @@ G4TriangularFacet::G4TriangularFacet (const G4ThreeVector Pt0,
|
||||
G4FacetVertexType vertexType)
|
||||
: G4VFacet()
|
||||
{
|
||||
if (!tGeomAlg) { tGeomAlg = G4TessellatedGeometryAlgorithms::GetInstance(); }
|
||||
tGeomAlg = G4TessellatedGeometryAlgorithms::GetInstance();
|
||||
P0 = Pt0;
|
||||
nVertices = 3;
|
||||
if (vertexType == ABSOLUTE)
|
||||
@@ -709,9 +709,11 @@ G4bool G4TriangularFacet::Intersect (const G4ThreeVector &p,
|
||||
|
||||
G4ThreeVector G4TriangularFacet::GetPointOnFace() const
|
||||
{
|
||||
G4double lambda0 = CLHEP::RandFlat::shoot(0.,1.);
|
||||
G4double lambda1 = CLHEP::RandFlat::shoot(0.,lambda0);
|
||||
|
||||
G4double alpha = CLHEP::RandFlat::shoot(0.,1.);
|
||||
G4double beta = CLHEP::RandFlat::shoot(0.,1);
|
||||
G4double lambda1=alpha*beta;
|
||||
G4double lambda0=alpha-lambda1;
|
||||
|
||||
return (P0 + lambda0*E[0] + lambda1*E[1]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user