Import Geant4 5.0.0 source tree
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4Assembly.cc,v 1.5 2001/07/11 09:59:40 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4Axis2Placement3D.cc,v 1.6 2001/07/11 09:59:40 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4BREPSolid.cc,v 1.20 2001/07/20 11:52:43 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// $Id: G4BREPSolid.cc,v 1.22 2002/11/06 23:29:32 radoone Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
@@ -43,15 +43,30 @@
|
||||
#include "G4ToroidalSurface.hh"
|
||||
#include "G4SphericalSurface.hh"
|
||||
|
||||
/*
|
||||
G4int Box, Convex, AxisBox, PlaneSolid;
|
||||
G4Axis2Placement3D* place;
|
||||
G4BoundingBox3D* bbox;
|
||||
G4double intersectionDistance;
|
||||
G4int active;
|
||||
G4int startInside;
|
||||
G4int nb_of_surfaces;
|
||||
G4Point3D intersection_point;
|
||||
G4Surface** SurfaceVec;
|
||||
G4double RealDist;
|
||||
G4String solidname;
|
||||
G4int Id;
|
||||
*/
|
||||
|
||||
G4Ray G4BREPSolid::Track;
|
||||
G4double G4BREPSolid::ShortestDistance= kInfinity;
|
||||
G4int G4BREPSolid::NumberOfSolids=0;
|
||||
|
||||
G4BREPSolid::G4BREPSolid(const G4String& name)
|
||||
: G4VSolid(name),
|
||||
Box(0), Convex(0), AxisBox(0), PlaneSolid(0), place(0),
|
||||
Box(0), Convex(0), AxisBox(0), PlaneSolid(0), place(0), bbox(0),
|
||||
intersectionDistance(kInfinity), active(1), startInside(0),
|
||||
solidname(name)
|
||||
nb_of_surfaces(0), SurfaceVec(0), solidname(name)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -59,7 +74,7 @@ G4BREPSolid::G4BREPSolid( const G4String& name ,
|
||||
G4Surface** srfVec ,
|
||||
G4int numberOfSrfs )
|
||||
: G4VSolid(name),
|
||||
Box(0), Convex(0), AxisBox(0), PlaneSolid(0), place(0),
|
||||
Box(0), Convex(0), AxisBox(0), PlaneSolid(0), place(0), bbox(0),
|
||||
intersectionDistance(kInfinity), active(1), startInside(0),
|
||||
nb_of_surfaces(numberOfSrfs), SurfaceVec(srfVec)
|
||||
{
|
||||
@@ -71,12 +86,14 @@ G4BREPSolid::~G4BREPSolid()
|
||||
if(place)
|
||||
delete place;
|
||||
|
||||
delete bbox;
|
||||
if(bbox)
|
||||
delete bbox;
|
||||
|
||||
for(G4int a=0;a<nb_of_surfaces;a++)
|
||||
delete SurfaceVec[a];
|
||||
|
||||
delete [] SurfaceVec;
|
||||
if( nb_of_surfaces > 0 && SurfaceVec != 0)
|
||||
delete [] SurfaceVec;
|
||||
}
|
||||
|
||||
void G4BREPSolid::Initialize()
|
||||
@@ -1467,3 +1484,17 @@ G4Point3D G4BREPSolid::Scope() const
|
||||
|
||||
return scope;
|
||||
}
|
||||
|
||||
|
||||
G4std::ostream& G4BREPSolid::StreamInfo(G4std::ostream& os) const
|
||||
{
|
||||
os << "-----------------------------------------------------------\n"
|
||||
<< " *** Dump for solid - " << GetName() << " ***\n"
|
||||
<< " ===================================================\n"
|
||||
<< " Solid type: " << GetEntityType() << "\n"
|
||||
<< " Parameters: \n"
|
||||
<< " Number of solids: " << NumberOfSolids << "\n"
|
||||
<< "-----------------------------------------------------------\n";
|
||||
|
||||
return os;
|
||||
}
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4BREPSolidBox.cc,v 1.6 2001/07/20 12:47:52 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// $Id: G4BREPSolidBox.cc,v 1.7 2002/11/06 23:29:33 radoone Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
@@ -84,6 +84,16 @@ G4BREPSolidBox::G4BREPSolidBox(const G4String& name,
|
||||
PVec[3] = Pt8;
|
||||
SurfaceVec[5] = new G4FPlane(&PVec);
|
||||
|
||||
// Save the constructor parameters
|
||||
constructorParams[0] = Pt1;
|
||||
constructorParams[1] = Pt2;
|
||||
constructorParams[2] = Pt3;
|
||||
constructorParams[3] = Pt4;
|
||||
constructorParams[4] = Pt5;
|
||||
constructorParams[5] = Pt6;
|
||||
constructorParams[6] = Pt7;
|
||||
constructorParams[7] = Pt8;
|
||||
|
||||
Initialize();
|
||||
|
||||
}
|
||||
@@ -115,3 +125,22 @@ EInside G4BREPSolidBox::Inside(register const G4ThreeVector& Pt) const
|
||||
|
||||
return kSurface;
|
||||
}
|
||||
|
||||
// Streams solid contents to output stream.
|
||||
G4std::ostream& G4BREPSolidBox::StreamInfo(G4std::ostream& os) const
|
||||
{
|
||||
G4BREPSolid::StreamInfo( os )
|
||||
<< "\n"
|
||||
<< " Pt1: " << constructorParams[0]
|
||||
<< " Pt2: " << constructorParams[1]
|
||||
<< " Pt3: " << constructorParams[2]
|
||||
<< " Pt4: " << constructorParams[3]
|
||||
<< "\n Pt5: " << constructorParams[4]
|
||||
<< " Pt6: " << constructorParams[5]
|
||||
<< " Pt7: " << constructorParams[6]
|
||||
<< " Pt8: " << constructorParams[7]
|
||||
<< "\n-----------------------------------------------------------\n";
|
||||
|
||||
return os;
|
||||
}
|
||||
|
||||
|
||||
@@ -20,8 +20,8 @@
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4BREPSolidCone.cc,v 1.7 2001/07/11 09:59:41 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// $Id: G4BREPSolidCone.cc,v 1.10 2002/12/03 14:24:20 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
@@ -101,6 +101,15 @@ G4BREPSolidCone::G4BREPSolidCone(const G4String& name,
|
||||
|
||||
nb_of_surfaces = 3;
|
||||
active=1;
|
||||
|
||||
// Save constructor parameters
|
||||
constructorParams.origin = origin;
|
||||
constructorParams.axis = axis;
|
||||
constructorParams.direction = direction;
|
||||
constructorParams.length = length;
|
||||
constructorParams.radius = radius;
|
||||
constructorParams.large_radius = large_radius;
|
||||
|
||||
Initialize();
|
||||
}
|
||||
|
||||
@@ -198,3 +207,19 @@ G4double G4BREPSolidCone::DistanceToOut(const G4ThreeVector& Pt) const
|
||||
if(dist1 > dist3) dist1 = dist3;
|
||||
return dist1;
|
||||
}
|
||||
|
||||
// Streams solid contents to output stream.
|
||||
G4std::ostream& G4BREPSolidCone::StreamInfo(G4std::ostream& os) const
|
||||
{
|
||||
G4BREPSolid::StreamInfo( os )
|
||||
<< "\n origin: " << constructorParams.origin
|
||||
<< "\n axis: " << constructorParams.axis
|
||||
<< "\n direction: " << constructorParams.direction
|
||||
<< "\n length: " << constructorParams.length
|
||||
<< "\n radius: " << constructorParams.radius
|
||||
<< "\n large_radius: " << constructorParams.large_radius
|
||||
<< "\n-----------------------------------------------------------\n";
|
||||
|
||||
return os;
|
||||
}
|
||||
|
||||
|
||||
@@ -20,8 +20,8 @@
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4BREPSolidCylinder.cc,v 1.7 2001/07/11 09:59:41 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// $Id: G4BREPSolidCylinder.cc,v 1.8 2002/11/06 23:29:35 radoone Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
@@ -86,9 +86,32 @@ G4BREPSolidCylinder::G4BREPSolidCylinder(const G4String& name,
|
||||
|
||||
nb_of_surfaces = 3;
|
||||
active=1;
|
||||
|
||||
// Save constructor parameters
|
||||
constructorParams.origin = origin;
|
||||
constructorParams.axis = axis;
|
||||
constructorParams.direction = direction;
|
||||
constructorParams.length = length;
|
||||
constructorParams.radius = radius;
|
||||
|
||||
Initialize();
|
||||
}
|
||||
|
||||
G4BREPSolidCylinder::~G4BREPSolidCylinder()
|
||||
{
|
||||
}
|
||||
|
||||
// Streams solid contents to output stream.
|
||||
G4std::ostream& G4BREPSolidCylinder::StreamInfo(G4std::ostream& os) const
|
||||
{
|
||||
G4BREPSolid::StreamInfo( os )
|
||||
<< "\n origin: " << constructorParams.origin
|
||||
<< "\n axis: " << constructorParams.axis
|
||||
<< "\n direction: " << constructorParams.direction
|
||||
<< "\n length: " << constructorParams.length
|
||||
<< "\n radius: " << constructorParams.radius
|
||||
<< "\n-----------------------------------------------------------\n";
|
||||
|
||||
return os;
|
||||
}
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4BREPSolidOpenPCone.cc,v 1.6 2001/07/11 09:59:41 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// $Id: G4BREPSolidOpenPCone.cc,v 1.7 2002/11/06 23:29:36 radoone Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
@@ -47,14 +47,16 @@ G4BREPSolidOpenPCone::G4BREPSolidOpenPCone
|
||||
G4double RMAX[]
|
||||
)
|
||||
: G4IntersectionSolid ( name,
|
||||
new G4BREPSolidPCone ( name,
|
||||
start_angle,
|
||||
opening_angle,
|
||||
num_z_planes,
|
||||
z_start, z_values,
|
||||
RMIN, RMAX ),
|
||||
new G4Tubs( "IntersectionTubs", 0., 1., 1.,
|
||||
start_angle, opening_angle ) )
|
||||
new G4BREPSolidPCone( name,
|
||||
start_angle, opening_angle,
|
||||
num_z_planes, z_start, z_values,
|
||||
RMIN, RMAX
|
||||
),
|
||||
new G4Tubs( "IntersectionTubs",
|
||||
0., 1., 1., start_angle, opening_angle
|
||||
)
|
||||
)
|
||||
//, constructorParams.z_values( 0 ), constructorParams.RMIN( 0 ), constructorParams.RMAX( 0 )
|
||||
{
|
||||
|
||||
// compute max radius
|
||||
@@ -78,3 +80,12 @@ void G4BREPSolidOpenPCone::DescribeYourselfTo (G4VGraphicsScene& scene) const
|
||||
{
|
||||
scene.AddThis ( *this );
|
||||
}
|
||||
|
||||
// Streams solid contents to output stream.
|
||||
G4std::ostream& G4BREPSolidOpenPCone::StreamInfo(G4std::ostream& os) const
|
||||
{
|
||||
G4IntersectionSolid::StreamInfo( os );
|
||||
|
||||
return os;
|
||||
}
|
||||
|
||||
|
||||
@@ -20,8 +20,8 @@
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4BREPSolidPCone.cc,v 1.26 2002/03/11 19:09:37 radoone Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// $Id: G4BREPSolidPCone.cc,v 1.28 2002/11/06 23:29:37 radoone Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
@@ -361,11 +361,13 @@ G4BREPSolidPCone::G4BREPSolidPCone(const G4String& name,
|
||||
G4Point3D ArcStart1a = G4Point3D( Origin + (RMIN[0]*PlaneDir) );
|
||||
G4Point3D ArcStart1b = G4Point3D( Origin + (RMAX[0]*PlaneDir) );
|
||||
|
||||
tmp = new G4CircularCurve;
|
||||
tmp->Init(G4Axis2Placement3D(PlaneDir, PlaneAxis, Origin), RMIN[0]);
|
||||
tmp->SetBounds(ArcStart1a, ArcStart1a);
|
||||
tmp->SetSameSense(0);
|
||||
cv.push_back(tmp);
|
||||
if( RMIN[0] > 0.0 ) {
|
||||
tmp = new G4CircularCurve;
|
||||
tmp->Init(G4Axis2Placement3D(PlaneDir, PlaneAxis, Origin), RMIN[0]);
|
||||
tmp->SetBounds(ArcStart1a, ArcStart1a);
|
||||
tmp->SetSameSense(0);
|
||||
cv.push_back(tmp);
|
||||
}
|
||||
|
||||
tmp = new G4CircularCurve;
|
||||
tmp->Init(G4Axis2Placement3D(PlaneDir, PlaneAxis, Origin), RMAX[0]);
|
||||
@@ -389,12 +391,13 @@ G4BREPSolidPCone::G4BREPSolidPCone(const G4String& name,
|
||||
|
||||
cv.clear();
|
||||
|
||||
tmp = new G4CircularCurve;
|
||||
tmp->Init(G4Axis2Placement3D(PlaneDir, PlaneAxis, LocalOrigin),
|
||||
RMIN[sections]);
|
||||
tmp->SetBounds(ArcStart2a, ArcStart2a);
|
||||
tmp->SetSameSense(0);
|
||||
cv.push_back(tmp);
|
||||
if( RMIN[sections] > 0.0 ) {
|
||||
tmp = new G4CircularCurve;
|
||||
tmp->Init(G4Axis2Placement3D(PlaneDir, PlaneAxis, LocalOrigin), RMIN[sections]);
|
||||
tmp->SetBounds(ArcStart2a, ArcStart2a);
|
||||
tmp->SetSameSense(0);
|
||||
cv.push_back(tmp);
|
||||
}
|
||||
|
||||
tmp = new G4CircularCurve;
|
||||
tmp->Init(G4Axis2Placement3D(PlaneDir, PlaneAxis, LocalOrigin),
|
||||
@@ -413,51 +416,38 @@ G4BREPSolidPCone::G4BREPSolidPCone(const G4String& name,
|
||||
nb_of_surfaces--;
|
||||
}
|
||||
|
||||
// Save contructor parameters
|
||||
constructorParams.start_angle = start_angle;
|
||||
constructorParams.opening_angle = opening_angle;
|
||||
constructorParams.num_z_planes = num_z_planes;
|
||||
constructorParams.z_start = z_start;
|
||||
constructorParams.z_values = 0;
|
||||
constructorParams.RMIN = 0;
|
||||
constructorParams.RMAX = 0;
|
||||
|
||||
if( num_z_planes > 0 ) {
|
||||
constructorParams.z_values = new G4double[num_z_planes];
|
||||
constructorParams.RMIN = new G4double[num_z_planes];
|
||||
constructorParams.RMAX = new G4double[num_z_planes];
|
||||
for( G4int idx = 0; idx < num_z_planes; idx++ ) {
|
||||
constructorParams.z_values[idx] = z_values[idx];
|
||||
constructorParams.RMIN[idx] = RMIN[idx];
|
||||
constructorParams.RMAX[idx] = RMAX[idx];
|
||||
}
|
||||
}
|
||||
|
||||
active=1;
|
||||
Initialize();
|
||||
|
||||
// Store the original parameters, to be used in visualisation
|
||||
original_parameters.Start_angle= start_angle;
|
||||
original_parameters.Opening_angle= opening_angle;
|
||||
original_parameters.Num_z_planes= num_z_planes;
|
||||
// original_parameters.z_start= z_start;
|
||||
original_parameters.Z_values= new G4double[num_z_planes];
|
||||
original_parameters.Rmin= new G4double[nb_of_surfaces];
|
||||
original_parameters.Rmax= new G4double[nb_of_surfaces];
|
||||
|
||||
for(int is=0;is<num_z_planes;is++)
|
||||
{
|
||||
original_parameters.Z_values[is]= z_values[is];
|
||||
original_parameters.Rmin[is]= RMIN[is];
|
||||
original_parameters.Rmax[is]= RMAX[is];
|
||||
}
|
||||
|
||||
// z_values[0] should be equal to z_start, for consistency
|
||||
// with what the constructor does.
|
||||
// Otherwise the z_values that are given are used
|
||||
// shifted by z_values[0] - z_start:
|
||||
// (because z_values are only used in
|
||||
// line 26: Length = z_values[a+1] - z_values[a];
|
||||
// ) // JA Apr 2, 97
|
||||
|
||||
/*
|
||||
if( z_values[0] != z_start )
|
||||
{
|
||||
G4cerr << "ERROR in creating G4BREPSolidPCone: "
|
||||
<< " z_values[0]= " << z_values[0] << " is not equal to "
|
||||
<< " z_start= " , z_start;
|
||||
// G4Exception(" Error in creating G4BREPSolidPCone: z_values[0] must be equal to z_start" );
|
||||
original_parameters.Z_values[0]= z_start;
|
||||
}
|
||||
*/
|
||||
|
||||
}
|
||||
|
||||
G4BREPSolidPCone::~G4BREPSolidPCone()
|
||||
{
|
||||
delete [] original_parameters.Z_values;
|
||||
delete [] original_parameters.Rmin;
|
||||
delete [] original_parameters.Rmax;
|
||||
if( constructorParams.num_z_planes > 0 ) {
|
||||
delete [] constructorParams.z_values;
|
||||
delete [] constructorParams.RMIN;
|
||||
delete [] constructorParams.RMIN;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void G4BREPSolidPCone::Initialize()
|
||||
@@ -793,6 +783,32 @@ G4double G4BREPSolidPCone::DistanceToOut(const G4ThreeVector& Pt) const
|
||||
return fabs(Dist);
|
||||
}
|
||||
|
||||
// Streams solid contents to output stream.
|
||||
G4std::ostream& G4BREPSolidPCone::StreamInfo(G4std::ostream& os) const
|
||||
{
|
||||
G4BREPSolid::StreamInfo( os )
|
||||
<< "\n start_angle: " << constructorParams.start_angle
|
||||
<< "\n opening_angle: " << constructorParams.opening_angle
|
||||
<< "\n num_z_planes: " << constructorParams.num_z_planes
|
||||
<< "\n z_start: " << constructorParams.z_start
|
||||
<< "\n z_values: ";
|
||||
G4int idx;
|
||||
for( idx = 0; idx < constructorParams.num_z_planes; idx++ ) {
|
||||
os << constructorParams.z_values[idx] << " ";
|
||||
}
|
||||
os << "\n RMIN: ";
|
||||
for( idx = 0; idx < constructorParams.num_z_planes; idx++ ) {
|
||||
os << constructorParams.RMIN[idx] << " ";
|
||||
}
|
||||
os << "\n RMAX: ";
|
||||
for( idx = 0; idx < constructorParams.num_z_planes; idx++ ) {
|
||||
os << constructorParams.RMAX[idx] << " ";
|
||||
}
|
||||
os << "\n-----------------------------------------------------------\n";
|
||||
|
||||
return os;
|
||||
}
|
||||
|
||||
void G4BREPSolidPCone::Reset() const
|
||||
{
|
||||
Active(1);
|
||||
@@ -860,10 +876,12 @@ G4Surface* G4BREPSolidPCone::ComputePlanarSurface( G4double r1, G4double r2,
|
||||
|
||||
G4Polyhedron* G4BREPSolidPCone::CreatePolyhedron() const
|
||||
{
|
||||
return new G4PolyhedronPcon( original_parameters.Start_angle,
|
||||
original_parameters.Opening_angle,
|
||||
original_parameters.Num_z_planes,
|
||||
original_parameters.Z_values,
|
||||
original_parameters.Rmin,
|
||||
original_parameters.Rmax);
|
||||
return new G4PolyhedronPcon(
|
||||
constructorParams.start_angle,
|
||||
constructorParams.opening_angle,
|
||||
constructorParams.num_z_planes,
|
||||
constructorParams.z_values,
|
||||
constructorParams.RMIN,
|
||||
constructorParams.RMAX
|
||||
);
|
||||
}
|
||||
|
||||
@@ -20,8 +20,8 @@
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4BREPSolidPolyhedra.cc,v 1.22 2002/02/14 18:39:12 radoone Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// $Id: G4BREPSolidPolyhedra.cc,v 1.23 2002/11/06 23:29:38 radoone Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
@@ -64,8 +64,8 @@
|
||||
#include "g4std/strstream"
|
||||
|
||||
G4BREPSolidPolyhedra::G4BREPSolidPolyhedra(const G4String& name,
|
||||
G4double phi1,
|
||||
G4double dphi,
|
||||
G4double start_angle,
|
||||
G4double opening_angle,
|
||||
G4int sides,
|
||||
G4int num_z_planes,
|
||||
G4double z_start,
|
||||
@@ -76,7 +76,7 @@ G4BREPSolidPolyhedra::G4BREPSolidPolyhedra(const G4String& name,
|
||||
{
|
||||
G4int sections = num_z_planes - 1;
|
||||
|
||||
if( dphi >= 2*pi-perMillion ) {
|
||||
if( opening_angle >= 2*pi-perMillion ) {
|
||||
nb_of_surfaces = 2*(sections * sides) + 2;
|
||||
} else {
|
||||
nb_of_surfaces = 2*(sections * sides) + 4;
|
||||
@@ -93,7 +93,7 @@ G4BREPSolidPolyhedra::G4BREPSolidPolyhedra(const G4String& name,
|
||||
G4Point3D LocalOrigin(0,0,z_start);
|
||||
G4double Length;
|
||||
G4int Count = 0 ;
|
||||
G4double PartAngle = (dphi)/sides;
|
||||
G4double PartAngle = (opening_angle)/sides;
|
||||
|
||||
|
||||
///////////////////////////////////////////////////
|
||||
@@ -199,7 +199,7 @@ G4BREPSolidPolyhedra::G4BREPSolidPolyhedra(const G4String& name,
|
||||
|
||||
if( Length != 0.0 ) {
|
||||
TmpAxis= XAxis;
|
||||
TmpAxis.rotateZ(phi1);
|
||||
TmpAxis.rotateZ(start_angle);
|
||||
|
||||
// L. Broglia: Be careful in the construction of the planes, see G4FPlane
|
||||
for( G4int b = 0; b < sides; b++ ) {
|
||||
@@ -342,7 +342,7 @@ G4BREPSolidPolyhedra::G4BREPSolidPolyhedra(const G4String& name,
|
||||
}
|
||||
|
||||
TmpAxis= XAxis;
|
||||
TmpAxis.rotateZ(phi1);
|
||||
TmpAxis.rotateZ(start_angle);
|
||||
|
||||
// Compute the outer planar surface
|
||||
MaxSurfaceVec[Count] = ComputePlanarSurface( RMAX[a], RMAX[a+1], LocalOrigin, TmpAxis, sides, PartAngle, OuterSurfSense );
|
||||
@@ -353,7 +353,7 @@ G4BREPSolidPolyhedra::G4BREPSolidPolyhedra(const G4String& name,
|
||||
Count++;
|
||||
|
||||
TmpAxis= XAxis;
|
||||
TmpAxis.rotateZ(phi1);
|
||||
TmpAxis.rotateZ(start_angle);
|
||||
|
||||
// Compute the inner planar surface
|
||||
MaxSurfaceVec[Count] = ComputePlanarSurface( RMIN[a], RMIN[a+1], LocalOrigin, TmpAxis, sides, PartAngle, InnerSurfSense );
|
||||
@@ -415,7 +415,7 @@ G4BREPSolidPolyhedra::G4BREPSolidPolyhedra(const G4String& name,
|
||||
}
|
||||
|
||||
TmpAxis= XAxis;
|
||||
TmpAxis.rotateZ(phi1);
|
||||
TmpAxis.rotateZ(start_angle);
|
||||
|
||||
MaxSurfaceVec[Count] = ComputePlanarSurface( R1, R2, LocalOrigin, TmpAxis, sides, PartAngle, SurfSense );
|
||||
if( MaxSurfaceVec[Count] == 0 ) {
|
||||
@@ -432,11 +432,11 @@ G4BREPSolidPolyhedra::G4BREPSolidPolyhedra(const G4String& name,
|
||||
LocalOrigin = LocalOrigin + (Length*Axis);
|
||||
} // End of for loop over z sections
|
||||
|
||||
if(dphi >= 2*pi-perMillion) {
|
||||
if(opening_angle >= 2*pi-perMillion) {
|
||||
// Create the end planes for the configuration where delta phi >= 2*PI
|
||||
|
||||
TmpAxis = XAxis;
|
||||
TmpAxis.rotateZ(phi1);
|
||||
TmpAxis.rotateZ(start_angle);
|
||||
|
||||
MaxSurfaceVec[Count] = ComputePlanarSurface( RMIN[0], RMAX[0], Origin, TmpAxis, sides, PartAngle, ENormal );
|
||||
|
||||
@@ -448,7 +448,7 @@ G4BREPSolidPolyhedra::G4BREPSolidPolyhedra(const G4String& name,
|
||||
|
||||
// Reset plane axis
|
||||
TmpAxis = XAxis;
|
||||
TmpAxis.rotateZ(phi1);
|
||||
TmpAxis.rotateZ(start_angle);
|
||||
|
||||
MaxSurfaceVec[Count] = ComputePlanarSurface( RMIN[sections], RMAX[sections], LocalOrigin, TmpAxis, sides, PartAngle, EInverse );
|
||||
|
||||
@@ -464,9 +464,9 @@ G4BREPSolidPolyhedra::G4BREPSolidPolyhedra(const G4String& name,
|
||||
// Create the lateral planars
|
||||
TmpAxis = XAxis;
|
||||
G4Vector3D TmpAxis2 = XAxis;
|
||||
TmpAxis.rotateZ(phi1);
|
||||
TmpAxis2.rotateZ(phi1);
|
||||
TmpAxis2.rotateZ(dphi);
|
||||
TmpAxis.rotateZ(start_angle);
|
||||
TmpAxis2.rotateZ(start_angle);
|
||||
TmpAxis2.rotateZ(start_angle);
|
||||
|
||||
LocalOrigin = Origin;
|
||||
G4int points = sections*2+2;
|
||||
@@ -494,8 +494,8 @@ G4BREPSolidPolyhedra::G4BREPSolidPolyhedra(const G4String& name,
|
||||
MaxSurfaceVec[Count++] = new G4FPlane( &GapPointList2, 0, EInverse );
|
||||
|
||||
TmpAxis = XAxis;
|
||||
TmpAxis.rotateZ(phi1);
|
||||
TmpAxis.rotateZ(dphi);
|
||||
TmpAxis.rotateZ(start_angle);
|
||||
TmpAxis.rotateZ(opening_angle);
|
||||
|
||||
// Create end planes
|
||||
G4Point3DVector EndPointList ((sides+1)*2);
|
||||
@@ -564,46 +564,27 @@ G4BREPSolidPolyhedra::G4BREPSolidPolyhedra(const G4String& name,
|
||||
// Note radii are not scaled because this BREP uses the radius of the
|
||||
// circumscribed circle and also graphics_reps/G4Polyhedron uses the radius of
|
||||
// the circumscribed circle.
|
||||
original_parameters.Start_angle= phi1;
|
||||
original_parameters.Opening_angle= dphi;
|
||||
original_parameters.Sides= sides;
|
||||
original_parameters.Num_z_planes= num_z_planes;
|
||||
original_parameters.Z_values= new G4double[num_z_planes];
|
||||
original_parameters.Rmin= new G4double[num_z_planes];
|
||||
original_parameters.Rmax= new G4double[num_z_planes];
|
||||
|
||||
G4double rFactor = 1.;
|
||||
|
||||
for(G4int is=0;is<num_z_planes;is++)
|
||||
{
|
||||
original_parameters.Z_values[is]= z_values[is];
|
||||
original_parameters.Rmin[is]= RMIN[is]/rFactor;
|
||||
original_parameters.Rmax[is]= RMAX[is]/rFactor;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////
|
||||
// Print for debugging
|
||||
|
||||
#ifdef G4VERBOSE
|
||||
static G4int print_pgone_parameters = 1;
|
||||
// Save contructor parameters
|
||||
constructorParams.start_angle = start_angle;
|
||||
constructorParams.opening_angle = opening_angle;
|
||||
constructorParams.sides = sides;
|
||||
constructorParams.num_z_planes = num_z_planes;
|
||||
constructorParams.z_start = z_start;
|
||||
constructorParams.z_values = 0;
|
||||
constructorParams.RMIN = 0;
|
||||
constructorParams.RMAX = 0;
|
||||
|
||||
if(print_pgone_parameters)
|
||||
{
|
||||
G4cout << "Parameters of the G4PGone " << name << G4endl;
|
||||
G4cout << " starting angle =" << original_parameters.Start_angle << G4endl;
|
||||
G4cout << " opening angle =" << original_parameters.Opening_angle << G4endl;
|
||||
G4cout << " sides =" << original_parameters.Sides << G4endl;
|
||||
G4cout << " nb of z planes=" << original_parameters.Num_z_planes << G4endl;
|
||||
|
||||
for (G4int nb = 0; nb <= sections; nb++)
|
||||
{
|
||||
G4cout << " Z[" << nb << "] = " << original_parameters.Z_values[nb];
|
||||
G4cout << " Rmin[" << nb << "] = " << original_parameters.Rmin[nb];
|
||||
G4cout << " Rmax[" << nb << "] = " << original_parameters.Rmax[nb]
|
||||
<< G4endl;
|
||||
}
|
||||
if( num_z_planes > 0 ) {
|
||||
constructorParams.z_values = new G4double[num_z_planes];
|
||||
constructorParams.RMIN = new G4double[num_z_planes];
|
||||
constructorParams.RMAX = new G4double[num_z_planes];
|
||||
for( G4int idx = 0; idx < num_z_planes; idx++ ) {
|
||||
constructorParams.z_values[idx] = z_values[idx];
|
||||
constructorParams.RMIN[idx] = RMIN[idx];
|
||||
constructorParams.RMAX[idx] = RMAX[idx];
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
// z_values[0] should be equal to z_start, for consistency
|
||||
// with what the constructor does.
|
||||
@@ -617,7 +598,7 @@ G4BREPSolidPolyhedra::G4BREPSolidPolyhedra(const G4String& name,
|
||||
" z_values[0]= " << z_values[0] << " is not equal to " <<
|
||||
" z_start= " << z_start;
|
||||
// G4Exception(" Error in creating G4BREPSolidPolyhedra: z_values[0] must be equal to z_start" );
|
||||
original_parameters.Z_values[0]= z_start;
|
||||
constructorParams.z_values[0]= z_start;
|
||||
}
|
||||
|
||||
active=1;
|
||||
@@ -626,9 +607,11 @@ G4BREPSolidPolyhedra::G4BREPSolidPolyhedra(const G4String& name,
|
||||
|
||||
G4BREPSolidPolyhedra::~G4BREPSolidPolyhedra()
|
||||
{
|
||||
delete[] original_parameters.Z_values;
|
||||
delete[] original_parameters.Rmin;
|
||||
delete[] original_parameters.Rmax;
|
||||
if( constructorParams.num_z_planes > 0 ) {
|
||||
delete [] constructorParams.z_values;
|
||||
delete [] constructorParams.RMIN;
|
||||
delete [] constructorParams.RMIN;
|
||||
}
|
||||
}
|
||||
|
||||
void G4BREPSolidPolyhedra::Initialize()
|
||||
@@ -1006,6 +989,33 @@ G4double G4BREPSolidPolyhedra::DistanceToOut(const G4ThreeVector& Pt) const
|
||||
}
|
||||
}
|
||||
|
||||
// Streams solid contents to output stream.
|
||||
G4std::ostream& G4BREPSolidPolyhedra::StreamInfo(G4std::ostream& os) const
|
||||
{
|
||||
G4BREPSolid::StreamInfo( os )
|
||||
<< "\n start_angle: " << constructorParams.start_angle
|
||||
<< "\n opening_angle: " << constructorParams.opening_angle
|
||||
<< "\n sides: " << constructorParams.sides
|
||||
<< "\n num_z_planes: " << constructorParams.num_z_planes
|
||||
<< "\n z_start: " << constructorParams.z_start
|
||||
<< "\n z_values: ";
|
||||
G4int idx;
|
||||
for( idx = 0; idx < constructorParams.num_z_planes; idx++ ) {
|
||||
os << constructorParams.z_values[idx] << " ";
|
||||
}
|
||||
os << "\n RMIN: ";
|
||||
for( idx = 0; idx < constructorParams.num_z_planes; idx++ ) {
|
||||
os << constructorParams.RMIN[idx] << " ";
|
||||
}
|
||||
os << "\n RMAX: ";
|
||||
for( idx = 0; idx < constructorParams.num_z_planes; idx++ ) {
|
||||
os << constructorParams.RMAX[idx] << " ";
|
||||
}
|
||||
os << "\n-----------------------------------------------------------\n";
|
||||
|
||||
return os;
|
||||
}
|
||||
|
||||
G4Surface* G4BREPSolidPolyhedra::CreateTrapezoidalSurface( G4double r1, G4double r2,
|
||||
const G4Point3D& origin, G4double distance,
|
||||
G4Vector3D& xAxis, G4double partAngle,
|
||||
@@ -1111,11 +1121,11 @@ G4Surface* G4BREPSolidPolyhedra::ComputePlanarSurface( G4double r1, G4double r2,
|
||||
|
||||
G4Polyhedron* G4BREPSolidPolyhedra::CreatePolyhedron() const
|
||||
{
|
||||
return new G4PolyhedronPgon( original_parameters.Start_angle,
|
||||
original_parameters.Opening_angle,
|
||||
original_parameters.Sides,
|
||||
original_parameters.Num_z_planes,
|
||||
original_parameters.Z_values,
|
||||
original_parameters.Rmin,
|
||||
original_parameters.Rmax);
|
||||
return new G4PolyhedronPgon( constructorParams.start_angle,
|
||||
constructorParams.opening_angle,
|
||||
constructorParams.sides,
|
||||
constructorParams.num_z_planes,
|
||||
constructorParams.z_values,
|
||||
constructorParams.RMIN,
|
||||
constructorParams.RMAX);
|
||||
}
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4BREPSolidSphere.cc,v 1.5 2001/07/11 09:59:42 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// $Id: G4BREPSolidSphere.cc,v 1.6 2002/11/06 23:29:39 radoone Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
@@ -35,10 +35,10 @@
|
||||
#include "G4SphericalSurface.hh"
|
||||
|
||||
G4BREPSolidSphere::G4BREPSolidSphere(const G4String& name,
|
||||
const G4Vector3D& o,
|
||||
const G4Vector3D& origin,
|
||||
const G4Vector3D& xhat,
|
||||
const G4Vector3D& zhat,
|
||||
G4double r)
|
||||
G4double radius)
|
||||
: G4BREPSolid(name)
|
||||
{
|
||||
SurfaceVec = new G4Surface*[1];
|
||||
@@ -46,8 +46,14 @@ G4BREPSolidSphere::G4BREPSolidSphere(const G4String& name,
|
||||
G4double ph2 = 2*M_PI;
|
||||
G4double th1 = 0;
|
||||
G4double th2 = M_PI;
|
||||
SurfaceVec[0] = new G4SphericalSurface(o, xhat, zhat, r, ph1, ph2, th1, th2);
|
||||
SurfaceVec[0] = new G4SphericalSurface(origin, xhat, zhat, radius, ph1, ph2, th1, th2);
|
||||
nb_of_surfaces = 1;
|
||||
|
||||
constructorParams.origin = origin;
|
||||
constructorParams.xhat = xhat;
|
||||
constructorParams.zhat = zhat;
|
||||
constructorParams.radius = radius;
|
||||
|
||||
active=1;
|
||||
Initialize();
|
||||
}
|
||||
@@ -128,3 +134,17 @@ G4double G4BREPSolidSphere::DistanceToOut(const G4ThreeVector& Pt) const
|
||||
{
|
||||
return fabs(SurfaceVec[0]->HowNear(Pt));
|
||||
}
|
||||
|
||||
// Streams solid contents to output stream.
|
||||
G4std::ostream& G4BREPSolidSphere::StreamInfo(G4std::ostream& os) const
|
||||
{
|
||||
G4BREPSolid::StreamInfo( os )
|
||||
<< "\n origin: " << constructorParams.origin
|
||||
<< "\n xhat: " << constructorParams.xhat
|
||||
<< "\n zhat: " << constructorParams.zhat
|
||||
<< "\n radius: " << constructorParams.radius
|
||||
<< "\n-----------------------------------------------------------\n";
|
||||
|
||||
return os;
|
||||
}
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4BREPSolidTorus.cc,v 1.5 2001/07/11 09:59:42 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// $Id: G4BREPSolidTorus.cc,v 1.6 2002/11/06 23:29:40 radoone Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
@@ -46,6 +46,14 @@ G4BREPSolidTorus::G4BREPSolidTorus(const G4String& name,
|
||||
SurfaceVec[0] = new G4ToroidalSurface( origin, axis, direction,
|
||||
MinRadius, MaxRadius);
|
||||
nb_of_surfaces = 1;
|
||||
|
||||
// Save constructor parameters
|
||||
constructorParams.origin = origin;
|
||||
constructorParams.axis = axis;
|
||||
constructorParams.direction = direction;
|
||||
constructorParams.MinRadius = MinRadius;
|
||||
constructorParams.MaxRadius = MaxRadius;
|
||||
|
||||
active = 1;
|
||||
Initialize();
|
||||
}
|
||||
@@ -53,3 +61,18 @@ G4BREPSolidTorus::G4BREPSolidTorus(const G4String& name,
|
||||
G4BREPSolidTorus::~G4BREPSolidTorus()
|
||||
{
|
||||
}
|
||||
|
||||
// Streams solid contents to output stream.
|
||||
G4std::ostream& G4BREPSolidTorus::StreamInfo(G4std::ostream& os) const
|
||||
{
|
||||
G4BREPSolid::StreamInfo( os )
|
||||
<< "\n origin: " << constructorParams.origin
|
||||
<< "\n axis: " << constructorParams.axis
|
||||
<< "\n direction: " << constructorParams.direction
|
||||
<< "\n MinRadius: " << constructorParams.MinRadius
|
||||
<< "\n MaxRadius: " << constructorParams.MaxRadius
|
||||
<< "\n-----------------------------------------------------------\n";
|
||||
|
||||
return os;
|
||||
}
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4BSplineCurve.cc,v 1.9 2001/07/17 07:17:15 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4BSplineCurveWithKnots.cc,v 1.4 2001/07/11 09:59:42 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4BSplineSurface.cc,v 1.11 2001/07/11 09:59:42 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4BSplineSurfaceWithKnots.cc,v 1.3 2001/07/11 09:59:43 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4BezierSurface.cc,v 1.6 2001/07/11 09:59:43 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4BoundingBox3D.cc,v 1.6 2001/07/11 09:59:43 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4CircularCurve.cc,v 1.6 2001/07/11 09:59:43 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4CompositeCurve.cc,v 1.10 2001/07/11 09:59:43 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4Conic.cc,v 1.6 2001/07/11 09:59:43 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4ConicalSurface.cc,v 1.6 2001/07/11 09:59:44 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4ControlPoints.cc,v 1.6 2001/07/11 09:59:44 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4Curve.cc,v 1.6 2001/07/11 09:59:44 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4CurvePoint.cc,v 1.4 2001/07/11 09:59:44 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4CurveRayIntersection.cc,v 1.4 2001/07/11 09:59:44 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4CylindricalSurface.cc,v 1.4 2001/07/11 09:59:44 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4Ellipse.cc,v 1.7 2001/07/11 09:59:44 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4FConicalSurface.cc,v 1.15 2001/07/11 09:59:44 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4FCylindricalSurface.cc,v 1.12 2001/07/11 09:59:45 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4FPlane.cc,v 1.14 2002/01/28 16:29:42 radoone Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4Hyperbola.cc,v 1.7 2001/07/11 09:59:45 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4KnotVector.cc,v 1.6 2001/07/11 09:59:45 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4Line.cc,v 1.7 2001/07/11 09:59:45 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OsloMatrix.cc,v 1.5 2001/07/11 09:59:45 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4Parabola.cc,v 1.5 2001/07/11 09:59:45 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4PlacedSolid.cc,v 1.4 2001/07/11 09:59:46 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4PointRat.cc,v 1.5 2001/07/11 09:59:46 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4ProjectedSurface.cc,v 1.8 2001/07/11 09:59:46 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Ray.cc,v 1.7 2001/07/11 09:59:46 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// $Id: G4Ray.cc,v 1.8 2002/11/21 16:52:53 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
@@ -245,3 +245,71 @@ void G4Ray::RayCheck()
|
||||
r_min = 0;
|
||||
r_max = 0;
|
||||
}
|
||||
|
||||
|
||||
void G4Ray::Vcross(G4Plane &a, const G4Vector3D &b, const G4Vector3D &c)
|
||||
{
|
||||
a.a = b.y() * c.z() - b.z() * c.y() ;
|
||||
a.b = b.z() * c.x() - b.x() * c.z() ;
|
||||
a.c = b.x() * c.y() - b.y() * c.x() ;
|
||||
}
|
||||
|
||||
|
||||
void G4Ray::Vcross(G4Vector3D &a, const G4Vector3D &b, const G4Vector3D &c)
|
||||
{
|
||||
a.setX(b.y() * c.z() - b.z() * c.y()) ;
|
||||
a.setY(b.z() * c.x() - b.x() * c.z()) ;
|
||||
a.setZ(b.x() * c.y() - b.y() * c.x()) ;
|
||||
}
|
||||
|
||||
|
||||
void G4Ray::Vmove(G4Point3D &a, const G4Point3D &b)
|
||||
{
|
||||
a.setX(b.x());
|
||||
a.setY(b.y());
|
||||
a.setZ(b.z());
|
||||
}
|
||||
|
||||
|
||||
void G4Ray::Vadd2(G4Point3D &a, const G4Point3D &b, const G4Vector3D &c)
|
||||
{
|
||||
a.setX(b.x() + c.x()) ;
|
||||
a.setY(b.y() + c.y()) ;
|
||||
a.setZ(b.z() + c.z()) ;
|
||||
}
|
||||
|
||||
|
||||
void G4Ray::Vsub2(G4Vector3D &a, const G4Point3D &b, const G4Point3D &c)
|
||||
{
|
||||
a.setX(b.x() - c.x());
|
||||
a.setY(b.y() - c.y());
|
||||
a.setZ(b.z() - c.z());
|
||||
}
|
||||
|
||||
|
||||
void G4Ray::Vscale(G4Plane& a, const G4Plane& b, G4double c)
|
||||
{
|
||||
a.a = b.a * c;
|
||||
a.b = b.b * c;
|
||||
a.c = b.c * c;
|
||||
}
|
||||
|
||||
|
||||
G4double G4Ray::Vdot(const G4Plane &a, const G4Point3D &b)
|
||||
{
|
||||
return (a.a * b.x() +
|
||||
a.b * b.y() +
|
||||
a.c * b.z());
|
||||
}
|
||||
|
||||
|
||||
G4double G4Ray::Magsq(const G4Plane &a)
|
||||
{
|
||||
return ( a.a * a.a + a.b * a.b + a.c *a.c );
|
||||
}
|
||||
|
||||
|
||||
G4double G4Ray::Magnitude(const G4Plane &a)
|
||||
{
|
||||
return (sqrt( Magsq( a )) );
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4RectangularTrimmedSurface.cc,v 1.6 2001/07/11 09:59:46 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4Sort.cc,v 1.4 2001/07/11 09:59:46 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 source file
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4SphericalSurface.cc,v 1.5 2001/07/11 09:59:46 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Surface.cc,v 1.9 2001/07/11 09:59:47 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// $Id: G4Surface.cc,v 1.10 2002/11/21 16:52:53 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
@@ -286,6 +286,13 @@ G4Ray* G4Surface::Norm()
|
||||
return (G4Ray*)0;
|
||||
}
|
||||
|
||||
void G4Surface::Project (G4double& Coord,
|
||||
const G4Point3D& Pt2,
|
||||
const G4Plane& Pl1)
|
||||
{
|
||||
Coord = Pt2.x()*Pl1.a + Pt2.y()*Pl1.b + Pt2.z()*Pl1.c - Pl1.d;
|
||||
}
|
||||
|
||||
/*
|
||||
G4double G4Surface::distanceAlongRay( G4int which_way, const G4Ray* ry,
|
||||
G4ThreeVec& p ) const
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4SurfaceBoundary.cc,v 1.10 2001/07/11 09:59:47 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4SurfaceList.cc,v 1.6 2001/07/11 09:59:48 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4SurfaceOfLinearExtrusion.cc,v 1.3 2001/07/11 09:59:48 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4SurfaceOfRevolution.cc,v 1.3 2001/07/11 09:59:48 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4ThreeMat.cc,v 1.6 2001/07/11 09:59:48 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4ToroidalSurface.cc,v 1.6 2001/07/11 09:59:48 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
|
||||
Reference in New Issue
Block a user