Import Geant4 9.1.0 source tree
This commit is contained in:
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4AttCheck.cc,v 1.15 2006/11/07 11:50:22 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
|
||||
#include "G4AttCheck.hh"
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4AttDef.cc,v 1.2 2006/11/01 10:15:05 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
|
||||
#include "G4AttDef.hh"
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4AttDefStore.cc,v 1.11 2007/04/03 13:58:08 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
|
||||
#include "G4AttDefStore.hh"
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4AttHolder.cc,v 1.3 2006/11/01 10:11:44 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
|
||||
#include "G4AttHolder.hh"
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4AttUtils.cc,v 1.1 2006/09/11 18:04:59 tinslay Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
// Jane Tinslay September 2006
|
||||
//
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4Circle.cc,v 1.7 2006/06/29 19:06:38 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4Colour.cc,v 1.11 2007/01/05 14:06:28 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
// John Allison 20th October 1996
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4NURBS.cc,v 1.9 2006/06/29 19:06:42 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
// Olivier Crumeyrolle 12 September 1996
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4NURBSbox.cc,v 1.7 2006/06/29 19:06:45 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
// Olivier Crumeyrolle 12 September 1996
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4NURBScylinder.cc,v 1.8 2006/06/29 19:06:47 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
// Olivier Crumeyrolle 12 September 1996
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4NURBShexahedron.cc,v 1.7 2006/06/29 19:06:49 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
// hexahedron implementation
|
||||
// OC 17 9 96
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4NURBStube.cc,v 1.8 2006/06/29 19:06:52 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
// Olivier Crumeyrolle 12 September 1996
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4NURBStubesector.cc,v 1.12 2006/06/29 19:06:55 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
// Olivier Crumeyrolle 12 September 1996
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4PlacedPolyhedron.cc,v 1.4 2006/06/29 19:06:58 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
|
||||
#include "G4PlacedPolyhedron.hh"
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4Point3DList.cc,v 1.7 2006/06/29 19:07:01 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
// John Allison July 1995
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Polyhedron.cc,v 1.20 2006/06/29 19:07:04 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// $Id: G4Polyhedron.cc,v 1.21 2007/07/18 14:07:24 tnikitin Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
|
||||
#include "G4Polyhedron.hh"
|
||||
|
||||
@@ -131,6 +131,11 @@ G4PolyhedronTubs::G4PolyhedronTubs (G4double Rmin, G4double Rmax, G4double Dz,
|
||||
|
||||
G4PolyhedronTubs::~G4PolyhedronTubs () {}
|
||||
|
||||
G4PolyhedronParaboloid::G4PolyhedronParaboloid (G4double r1, G4double r2, G4double dz, G4double sPhi, G4double dPhi):
|
||||
G4Polyhedron (HepPolyhedronParaboloid(r1, r2, dz, sPhi, dPhi)) {}
|
||||
|
||||
G4PolyhedronParaboloid::~G4PolyhedronParaboloid () {}
|
||||
|
||||
G4PolyhedronEllipsoid::G4PolyhedronEllipsoid (G4double ax, G4double by,
|
||||
G4double cz,
|
||||
G4double zCut1, G4double zCut2):
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4Polyline.cc,v 1.11 2006/06/29 19:07:08 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
// John Allison July 1995
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4Polymarker.cc,v 1.11 2006/06/29 19:07:11 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
// John Allison November 1996
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4Scale.cc,v 1.9 2006/06/29 19:07:14 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
// John Allison 21st July 2001
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4Square.cc,v 1.6 2006/06/29 19:07:16 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4Text.cc,v 1.9 2006/06/29 19:07:19 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
// John Allison 17/11/96.
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VGraphicsScene.cc,v 1.1 2007/07/17 17:52:20 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// John Allison 19th July 1996
|
||||
|
||||
#include "G4VGraphicsScene.hh"
|
||||
|
||||
G4VGraphicsScene::G4VGraphicsScene() {}
|
||||
|
||||
G4VGraphicsScene::~G4VGraphicsScene() {}
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4VMarker.cc,v 1.11 2006/06/29 19:07:21 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4VVisManager.cc,v 1.4 2006/06/29 19:07:24 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
// Abstract interface for GEANT4 Visualization Manager.
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4VisAttributes.cc,v 1.16 2007/01/05 14:12:13 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
// John Allison 23rd October 1996
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4VisExtent.cc,v 1.10 2006/06/29 19:07:28 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
// A.Walkden 28/11/95
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4Visible.cc,v 1.17 2006/11/07 11:53:16 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//
|
||||
//
|
||||
// John Allison 30th October 1996
|
||||
|
||||
@@ -24,8 +24,13 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: HepPolyhedron.cc,v 1.23 2006/11/07 11:48:51 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
//<<<<<<< HepPolyhedron.cc
|
||||
// $Id: HepPolyhedron.cc,v 1.26 2007/08/21 14:10:03 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//=======
|
||||
// $Id: HepPolyhedron.cc,v 1.26 2007/08/21 14:10:03 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
//>>>>>>> 1.24
|
||||
//
|
||||
//
|
||||
//
|
||||
@@ -1489,6 +1494,127 @@ HepPolyhedronPara::HepPolyhedronPara(double Dx, double Dy, double Dz,
|
||||
|
||||
HepPolyhedronPara::~HepPolyhedronPara() {}
|
||||
|
||||
HepPolyhedronParaboloid::HepPolyhedronParaboloid(double r1,
|
||||
double r2,
|
||||
double dz,
|
||||
double sPhi,
|
||||
double dPhi)
|
||||
/***********************************************************************
|
||||
* *
|
||||
* Name: HepPolyhedronParaboloid Date: 28.06.07 *
|
||||
* ::HepPolyhedronParaboloid *
|
||||
* Author: Revised: *
|
||||
* *
|
||||
* Function: Constructor for paraboloid *
|
||||
* *
|
||||
* Input: r1 - inside and outside radiuses at -Dz *
|
||||
* r2 - inside and outside radiuses at +Dz *
|
||||
* dz - half length in Z *
|
||||
* sPhi - starting angle of the segment *
|
||||
* dPhi - segment range *
|
||||
* *
|
||||
***********************************************************************/
|
||||
{
|
||||
static double wholeCircle=twopi;
|
||||
|
||||
// C H E C K I N P U T P A R A M E T E R S
|
||||
|
||||
int k = 0;
|
||||
if (r1 < 0. || r2 <= 0.) k = 1;
|
||||
|
||||
if (dz <= 0.) k += 2;
|
||||
|
||||
double phi1, phi2, dphi;
|
||||
|
||||
if(dPhi < 0.)
|
||||
{
|
||||
phi2 = sPhi; phi1 = phi2 + dPhi;
|
||||
}
|
||||
else if(dPhi == 0.)
|
||||
{
|
||||
phi1 = sPhi; phi2 = phi1 + wholeCircle;
|
||||
}
|
||||
else
|
||||
{
|
||||
phi1 = sPhi; phi2 = phi1 + dPhi;
|
||||
}
|
||||
dphi = phi2 - phi1;
|
||||
|
||||
if (std::abs(dphi-wholeCircle) < perMillion) dphi = wholeCircle;
|
||||
if (dphi > wholeCircle) k += 4;
|
||||
|
||||
if (k != 0) {
|
||||
std::cerr << "HepPolyhedronParaboloid: error in input parameters";
|
||||
if ((k & 1) != 0) std::cerr << " (radiuses)";
|
||||
if ((k & 2) != 0) std::cerr << " (half-length)";
|
||||
if ((k & 4) != 0) std::cerr << " (angles)";
|
||||
std::cerr << std::endl;
|
||||
std::cerr << " r1=" << r1;
|
||||
std::cerr << " r2=" << r2;
|
||||
std::cerr << " dz=" << dz << " sPhi=" << sPhi << " dPhi=" << dPhi
|
||||
<< std::endl;
|
||||
return;
|
||||
}
|
||||
|
||||
// P R E P A R E T W O P O L Y L I N E S
|
||||
|
||||
int n = GetNumberOfRotationSteps();
|
||||
double a1 = 2 * dz * r2*r2 / (r2*r2 - r1*r1),
|
||||
a2 = 2 * dz * r1*r1 / (r2*r2 - r1*r1),
|
||||
b = 2 * r2, A, l1, l2 = 0, l, scale, dl, k1, k2;
|
||||
A = std::sqrt(b*b + 16 * a1*a1);
|
||||
l1 = A / 2 + b*b / 8 / a1 * std::log((4 * a1 + A) / b);
|
||||
if(a2 != 0)
|
||||
{
|
||||
A = std::sqrt(b*b + 16 * a2*a2);
|
||||
l2 = A / 2 + b*b / 8 / a2 * std::log((4 * a2 + A) / b);
|
||||
}
|
||||
l = (l1 - l2) / 2;
|
||||
dl = l / n;
|
||||
scale = dl;
|
||||
k1 = (r2*r2 - r1*r1) / 2 / dz;
|
||||
k2 = (r2*r2 + r1*r1) / 2;
|
||||
|
||||
double *zz = new double[n + 1], *rr = new double[n + 1];
|
||||
|
||||
zz[0] = dz;
|
||||
rr[0] = r2;
|
||||
|
||||
|
||||
for(int i = 1; i < n - 1; i++)
|
||||
{
|
||||
rr[i] = rr[i-1] - dl;
|
||||
zz[i] = (rr[i]*rr[i] - k2) / k1;
|
||||
while(rr[i] > 0 && (scale = std::sqrt((rr[i] - rr[i-1])*(rr[i] - rr[i-1]) + (zz[i]-zz[i-1])*(zz[i]-zz[i-1]))) < 0.9999 * dl || scale > 1.0001 * dl) // This should maybe be changed to a constant
|
||||
{
|
||||
rr[i] += (scale - dl) / scale * (rr[i-1] - rr[i]);
|
||||
zz[i] = (rr[i]*rr[i] - k2) / k1;
|
||||
}
|
||||
if(rr[i] < 0)
|
||||
{
|
||||
rr[i] = 0;
|
||||
zz[i] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
zz[n-1] = -dz;
|
||||
rr[n-1] = r1;
|
||||
|
||||
zz[n] = dz;
|
||||
rr[n] = 0;
|
||||
|
||||
// R O T A T E P O L Y L I N E S
|
||||
|
||||
RotateAroundZ(0, phi1, dphi, n, 1, zz, rr, -1, -1);
|
||||
SetReferences();
|
||||
|
||||
delete zz;
|
||||
delete rr;
|
||||
}
|
||||
|
||||
HepPolyhedronParaboloid::~HepPolyhedronParaboloid() {}
|
||||
|
||||
HepPolyhedronCons::HepPolyhedronCons(double Rmn1,
|
||||
double Rmx1,
|
||||
double Rmn2,
|
||||
@@ -2041,8 +2167,8 @@ HepPolyhedronEllipticalCone::HepPolyhedronEllipticalCone(double ax,
|
||||
{
|
||||
Point3D<double> * p= pV;
|
||||
for (int i=0; i<nvert; i++, p++) {
|
||||
p->setX( p->x() * ax / h);
|
||||
p->setY( p->y() * ay / h);
|
||||
p->setX( p->x() * ax );
|
||||
p->setY( p->y() * ay );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user