Import Geant4 7.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 11:11:55 +02:00
parent e083ffb441
commit 516dbf1a58
5914 changed files with 202605 additions and 71141 deletions
+4 -1
View File
@@ -1,4 +1,4 @@
$Id: History,v 1.17 2003/10/03 15:21:20 gcosmo Exp $
$Id: History,v 1.18 2004/09/22 20:12:22 johna Exp $
-------------------------------------------------------------------
=========================================================
@@ -20,6 +20,9 @@ committal in the CVS repository !
History file for visualization/FukuiRenderer sub-category
---------------------------------------------------------
22nd September 2004 John Allison (DAWN-V06-02-00)
- Improve diagnostic on trapping non-regular polyhedra.
4th October 2003 Gabriele Cosmo (vis-V05-02-01)
- Simplified GNUmakefile.
@@ -22,7 +22,7 @@
//
//
// $Id: G4DAWNFILE.hh,v 1.8 2001/07/27 22:32:55 johna Exp $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
// GEANT4 tag $Name: geant4-07-00-cand-01 $
//
// Satoshi TANAKA
// DAWNFILE driver factory.
@@ -22,7 +22,7 @@
//
//
// $Id: G4DAWNFILESceneHandler.hh,v 1.12 2002/12/11 15:58:02 johna Exp $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
// GEANT4 tag $Name: geant4-07-00-cand-01 $
//
// Satoshi TANAKA
@@ -22,7 +22,7 @@
//
//
// $Id: G4DAWNFILEViewer.hh,v 1.9 2003/06/16 17:13:27 gunter Exp $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
// GEANT4 tag $Name: geant4-07-00-cand-01 $
//
// Satoshi TANAKA
// DAWNFILE viewer - opens window, hard copy, etc.
@@ -22,7 +22,7 @@
//
//
// $Id: G4FRClientServer.hh,v 1.6 2001/07/11 10:08:44 gunter Exp $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
// GEANT4 tag $Name: geant4-07-00-cand-01 $
//
// Satoshi TANAKA, Wed Jul 3 14:13:52 JST 1996
////////////////////////////////
@@ -22,7 +22,7 @@
//
//
// $Id: G4FRConst.hh,v 1.6 2001/07/11 10:08:44 gunter Exp $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
// GEANT4 tag $Name: geant4-07-00-cand-01 $
//
// Satoshi TANAKA, Tue Jul 2 15:30:49 JST 1996
///////////////////////////////////
@@ -22,7 +22,7 @@
//
//
// $Id: G4FRFeatures.hh,v 1.5 2001/07/11 10:08:44 gunter Exp $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
// GEANT4 tag $Name: geant4-07-00-cand-01 $
//
#if !defined G4_FR_FEATURES_HH
#define G4_FR_FEATURES_HH
@@ -21,10 +21,11 @@
// ********************************************************************
//
//
// $Id: G4FRSceneFunc.icc,v 1.3 2003/05/30 13:01:19 johna Exp $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
// $Id: G4FRSceneFunc.icc,v 1.6 2004/12/10 18:16:00 gcosmo Exp $
// GEANT4 tag $Name: geant4-07-00-cand-05 $
//
#include "G4LogicalVolume.hh"
//========== AddPrimitive() functions ==========//
@@ -304,7 +305,12 @@ void G4FRSCENEHANDLER::AddPrimitive ( const G4Polyhedron& polyhedron )
SendStrInt4(FR_FACET, work[0], work[1], work[2], work[3] );
break;
default:
G4cerr << "ERROR G4FRSCENEHANDLER::AddPrimitive(G4Polyhedron)\n";
G4cerr <<
"ERROR G4FRSCENEHANDLER::AddPrimitive(G4Polyhedron)\n"
"Volume " << fpCurrentPV->GetName() <<
", Solid " << fpCurrentLV->GetSolid()->GetName() <<
" (" << fpCurrentLV->GetSolid()->GetEntityType() <<
"\nG4Polyhedron facet with " << i << " edges\n";
}
}
@@ -619,8 +625,8 @@ void G4FRSCENEHANDLER::AddThis ( const G4Sphere& sphere )
SendTransformedCoordinates();
//----- send sphere to Fukui Renderer
const G4double PI_minus = 0.9999 * M_PI ;
const G4double PI2_minus = 1.9999 * M_PI ;
const G4double PI_minus = 0.9999 * pi ;
const G4double PI2_minus = 1.9999 * pi ;
if( dphi > PI2_minus && dtheta > PI_minus ) {
//----- full sphere
SendStrDouble ( FR_SPHERE, rmax );
@@ -741,28 +747,28 @@ void G4FRSCENEHANDLER::AddThis (const G4Trap& trap)
//----- parameters (half lengths of box)
G4double dz = trap.GetZHalfLength ();
G4double theta = acos( cosTheta ) ;
G4double theta = std::acos( cosTheta ) ;
G4double phi;
if ( ny==0. && nx ==0.) {
phi = 0.; // atan2(0.,0.) gives undefined value of phi
phi = 0.; // std::atan2(0.,0.) gives undefined value of phi
} else {
phi = atan2( ny, nx ) ; if( phi < 0. ) { phi += twopi ; }
// -PI < atan() < PI
phi = std::atan2( ny, nx ) ; if( phi < 0. ) { phi += twopi ; }
// -PI < std::atan() < PI
}
/////////////////////////////////////////////////
// G4double phi = atan2( ny, nx ) ;
// G4double phi = std::atan2( ny, nx ) ;
// if( phi < 0.0 ) { phi += twopi ; }
// // -PI < atan() < PI
// // -PI < std::atan() < PI
/////////////////////////////////////////////////
G4double h1 = trap.GetYHalfLength1 ();
G4double bl1 = trap.GetXHalfLength1 ();
G4double tl1 = trap.GetXHalfLength2 ();
G4double alpha1 = atan( trap.GetTanAlpha1()) ;
G4double alpha1 = std::atan( trap.GetTanAlpha1()) ;
G4double h2 = trap.GetYHalfLength2 ();
G4double bl2 = trap.GetXHalfLength3 ();
G4double tl2 = trap.GetXHalfLength4 ();
G4double alpha2 = atan( trap.GetTanAlpha2()) ;
G4double alpha2 = std::atan( trap.GetTanAlpha2()) ;
//----- send coordinates to Fukui Renderer
SendTransformedCoordinates();
@@ -22,7 +22,7 @@
//
//
// $Id: G4FRofstream.hh,v 1.6 2003/06/16 17:13:28 gunter Exp $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
// GEANT4 tag $Name: geant4-07-00-cand-01 $
//
#include <fstream>
@@ -22,7 +22,7 @@
//
//
// $Id: G4FukuiRenderer.hh,v 1.7 2001/07/11 10:08:44 gunter Exp $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
// GEANT4 tag $Name: geant4-07-00-cand-01 $
//
//
// Satoshi TANAKA
@@ -22,7 +22,7 @@
//
//
// $Id: G4FukuiRendererSceneHandler.hh,v 1.11 2002/12/11 15:58:02 johna Exp $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
// GEANT4 tag $Name: geant4-07-00-cand-01 $
//
//
// Satoshi TANAKA, Fri Jun 28 11:19:19 JST 1996
@@ -22,7 +22,7 @@
//
//
// $Id: G4FukuiRendererViewer.hh,v 1.7 2001/07/11 10:08:44 gunter Exp $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
// GEANT4 tag $Name: geant4-07-00-cand-01 $
//
//
// Satoshi TANAKA, Fri Jun 28 12:10:14 JST 1996
@@ -22,7 +22,7 @@
//
//
// $Id: G4DAWNFILE.cc,v 1.9 2001/07/27 22:32:59 johna Exp $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
// GEANT4 tag $Name: geant4-07-00-cand-01 $
//
// Satoshi TANAKA
// DAWNFILE factory.
@@ -22,7 +22,7 @@
//
//
// $Id: G4DAWNFILESceneHandler.cc,v 1.13 2003/06/16 17:13:29 gunter Exp $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
// GEANT4 tag $Name: geant4-07-00-cand-01 $
//
// Satoshi TANAKA
// DAWNFILE scene.
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4DAWNFILEViewer.cc,v 1.14 2003/06/16 17:13:30 gunter Exp $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
// $Id: G4DAWNFILEViewer.cc,v 1.16 2004/12/10 18:16:00 gcosmo Exp $
// GEANT4 tag $Name: geant4-07-00-cand-05 $
//
// Satoshi TANAKA
// DAWNFILE view - opens window, hard copy, etc.
@@ -235,14 +235,14 @@ void G4DAWNFILEViewer::SendViewParameters ()
//----- Magic number to decide camera distance automatically
const G4double HOW_FAR = 1000.0 ; // to define "infinity"
const G4double MIN_HALF_ANGLE = 0.01 ;
const G4double MAX_HALF_ANGLE = 0.499 * M_PI ;
const G4double MAX_HALF_ANGLE = 0.499 * pi ;
//----- CALC camera distance
//..... Note: Camera cannot enter inside object
G4double camera_distance ;
G4double radius = fSceneHandler.GetScene()->GetExtent().GetExtentRadius();
G4double half_view_angle = fabs ( fVP.GetFieldHalfAngle () ) ;
G4double half_view_angle = std::fabs ( fVP.GetFieldHalfAngle () ) ;
if( half_view_angle > MAX_HALF_ANGLE ) {
half_view_angle = MAX_HALF_ANGLE ;
}
@@ -252,7 +252,7 @@ void G4DAWNFILEViewer::SendViewParameters ()
camera_distance = radius * HOW_FAR ;
} else {
//----- Calc camera distance from half view angle
camera_distance = radius / sin ( half_view_angle );
camera_distance = radius / std::sin ( half_view_angle );
camera_distance -= fVP.GetDolly();
}
@@ -265,8 +265,8 @@ void G4DAWNFILEViewer::SendViewParameters ()
//----- CALC camera direction
const G4Vector3D& camera_direction \
= fVP.GetViewpointDirection().unit();
const G4double v_angle = (180.0 / M_PI) * camera_direction.theta() ;
const G4double h_angle = (180.0 / M_PI) * camera_direction.phi () ;
const G4double v_angle = (180.0 / pi) * camera_direction.theta() ;
const G4double h_angle = (180.0 / pi) * camera_direction.phi () ;
//########### Generation of the file .DAWN.history for DAWN GUI
@@ -298,7 +298,7 @@ void G4DAWNFILEViewer::SendViewParameters ()
} else {
const G4double FR_HALF_SCREEN_SIZE = 0.5 ;
G4double focal_distance \
= FR_HALF_SCREEN_SIZE / tan( half_view_angle );
= FR_HALF_SCREEN_SIZE / std::tan( half_view_angle );
focal_distance *= zoom_factor ;
gui_out << "fd" << focal_distance << G4endl;
@@ -22,7 +22,7 @@
//
//
// $Id: G4FRClientServer.cc,v 1.5 2001/07/11 10:08:45 gunter Exp $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
// GEANT4 tag $Name: geant4-07-00-cand-01 $
//
// Satoshi TANAKA, Wed Jul 3 14:14:29 JST 1996
////////////////////////////////
@@ -22,7 +22,7 @@
//
//
// $Id: G4FukuiRenderer.cc,v 1.7 2001/07/11 10:08:46 gunter Exp $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
// GEANT4 tag $Name: geant4-07-00-cand-01 $
//
//
// Satoshi TANAKA
@@ -22,7 +22,7 @@
//
//
// $Id: G4FukuiRendererSceneHandler.cc,v 1.10 2003/06/16 17:13:31 gunter Exp $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
// GEANT4 tag $Name: geant4-07-00-cand-01 $
//
//
// Satoshi TANAKA, Fri Jun 28 11:34:24 JST 1996
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4FukuiRendererViewer.cc,v 1.7 2001/07/11 10:08:46 gunter Exp $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
// $Id: G4FukuiRendererViewer.cc,v 1.9 2004/12/10 18:16:00 gcosmo Exp $
// GEANT4 tag $Name: geant4-07-00-cand-05 $
//
//
// Satoshi TANAKA, Fri Jun 28 12:09:11 JST 1996
@@ -200,14 +200,14 @@ void G4FukuiRendererViewer::SendViewParameters ()
//----- Magic number to decide camera distance automatically
const G4double HOW_FAR = 1000.0 ; // to define "infinity"
const G4double MIN_HALF_ANGLE = 0.01 ;
const G4double MAX_HALF_ANGLE = 0.499 * M_PI ;
const G4double MAX_HALF_ANGLE = 0.499 * pi ;
//----- (2A) CALC camera distance
//..... Note: Camera cannot enter inside object
G4double camera_distance ;
G4double radius = fSceneHandler.GetScene()->GetExtent().GetExtentRadius();
G4double half_view_angle = fabs ( fVP.GetFieldHalfAngle () ) ;
G4double half_view_angle = std::fabs ( fVP.GetFieldHalfAngle () ) ;
if( half_view_angle > MAX_HALF_ANGLE ) {
half_view_angle = MAX_HALF_ANGLE ;
}
@@ -217,7 +217,7 @@ void G4FukuiRendererViewer::SendViewParameters ()
camera_distance = radius * HOW_FAR ;
} else {
//----- Calc camera distance from half view angle
camera_distance = radius / sin ( half_view_angle );
camera_distance = radius / std::sin ( half_view_angle );
camera_distance -= fVP.GetDolly();
}
@@ -230,8 +230,8 @@ void G4FukuiRendererViewer::SendViewParameters ()
//----- (3A) CALC camera direction
const G4Vector3D& camera_direction \
= fVP.GetViewpointDirection().unit();
const G4double v_angle = (180.0 / M_PI) * camera_direction.theta() ;
const G4double h_angle = (180.0 / M_PI) * camera_direction.phi () ;
const G4double v_angle = (180.0 / pi) * camera_direction.theta() ;
const G4double h_angle = (180.0 / pi) * camera_direction.phi () ;
//----- (2B), (3B) SEND camera position
fSceneHandler.SendStrDouble3( FR_CAMERA_POSITION,
@@ -271,7 +271,7 @@ void G4FukuiRendererViewer::SendViewParameters ()
} else {
const G4double FR_HALF_SCREEN_SIZE = 0.5 ;
G4double focal_distance \
= FR_HALF_SCREEN_SIZE / tan( half_view_angle );
= FR_HALF_SCREEN_SIZE / std::tan( half_view_angle );
focal_distance *= zoom_factor ;
fSceneHandler.SendStrDouble ( FR_FOCAL_DISTANCE, focal_distance );
}