Import Geant4 3.2.0 source tree
This commit is contained in:
@@ -1,12 +1,28 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * 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. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4Assembly.cc,v 1.3 2000/11/08 14:22:07 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
// $Id: G4Assembly.cc,v 1.4.2.1 2001/06/28 19:08:49 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
@@ -25,14 +41,30 @@ G4Assembly::G4Assembly()
|
||||
|
||||
G4Assembly::~G4Assembly()
|
||||
{
|
||||
placedVec.clearAndDestroy();
|
||||
G4PlacedSolid* a = 0;
|
||||
|
||||
// Remove placedVec and delete all its contents
|
||||
while (placedVec.size()>0)
|
||||
{
|
||||
a = placedVec.back();
|
||||
placedVec.pop_back();
|
||||
for (G4PlacedVector::iterator i=placedVec.begin(); i!=placedVec.end(); i++)
|
||||
{
|
||||
if (*i==a)
|
||||
{
|
||||
placedVec.erase(i);
|
||||
i--;
|
||||
}
|
||||
}
|
||||
if ( a ) delete a;
|
||||
}
|
||||
}
|
||||
|
||||
void G4Assembly::SetPlacedVector(G4PlacedVector& pVec)
|
||||
{
|
||||
numberOfSolids = pVec.entries();
|
||||
numberOfSolids = pVec.size();
|
||||
|
||||
for(G4int a=0;a<numberOfSolids;a++)
|
||||
placedVec.append( pVec[a]);
|
||||
placedVec.push_back( pVec[a]);
|
||||
|
||||
}
|
||||
|
||||
@@ -1,12 +1,28 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * 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. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4Axis2Placement3D.cc,v 1.5 2000/11/20 17:54:37 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
// $Id: G4Axis2Placement3D.cc,v 1.5.4.1 2001/06/28 19:08:49 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
|
||||
@@ -1,12 +1,28 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * 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. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4BREPSolid.cc,v 1.17 2000/11/20 17:54:37 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
// $Id: G4BREPSolid.cc,v 1.18.2.1 2001/06/28 19:08:49 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
@@ -668,7 +684,8 @@ G4BREPSolid::CreateRotatedVertices(const G4AffineTransform& pTransform) const
|
||||
G4Point3D Max = bbox->GetBoxMax();
|
||||
|
||||
G4ThreeVectorList *vertices;
|
||||
vertices=new G4ThreeVectorList(8);
|
||||
vertices=new G4ThreeVectorList();
|
||||
vertices->reserve(8);
|
||||
|
||||
if (vertices)
|
||||
{
|
||||
@@ -681,14 +698,14 @@ G4BREPSolid::CreateRotatedVertices(const G4AffineTransform& pTransform) const
|
||||
G4ThreeVector vertex6(Max.x(),Max.y(),Max.z());
|
||||
G4ThreeVector vertex7(Min.x(),Max.y(),Max.z());
|
||||
|
||||
vertices->insert(pTransform.TransformPoint(vertex0));
|
||||
vertices->insert(pTransform.TransformPoint(vertex1));
|
||||
vertices->insert(pTransform.TransformPoint(vertex2));
|
||||
vertices->insert(pTransform.TransformPoint(vertex3));
|
||||
vertices->insert(pTransform.TransformPoint(vertex4));
|
||||
vertices->insert(pTransform.TransformPoint(vertex5));
|
||||
vertices->insert(pTransform.TransformPoint(vertex6));
|
||||
vertices->insert(pTransform.TransformPoint(vertex7));
|
||||
vertices->push_back(pTransform.TransformPoint(vertex0));
|
||||
vertices->push_back(pTransform.TransformPoint(vertex1));
|
||||
vertices->push_back(pTransform.TransformPoint(vertex2));
|
||||
vertices->push_back(pTransform.TransformPoint(vertex3));
|
||||
vertices->push_back(pTransform.TransformPoint(vertex4));
|
||||
vertices->push_back(pTransform.TransformPoint(vertex5));
|
||||
vertices->push_back(pTransform.TransformPoint(vertex6));
|
||||
vertices->push_back(pTransform.TransformPoint(vertex7));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -1,12 +1,28 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * 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. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4BREPSolidBox.cc,v 1.4 2000/11/08 14:22:08 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
// $Id: G4BREPSolidBox.cc,v 1.4.4.1 2001/06/28 19:08:50 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
|
||||
@@ -1,12 +1,28 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * 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. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4BREPSolidCone.cc,v 1.4 2000/11/08 14:22:08 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
// $Id: G4BREPSolidCone.cc,v 1.5.2.1 2001/06/28 19:08:50 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
@@ -51,12 +67,12 @@ G4BREPSolidCone::G4BREPSolidCone(const G4String& name,
|
||||
tmp = new G4CircularCurve();
|
||||
tmp->Init(G4Axis2Placement3D(direction, axis2, origin) , large_radius);
|
||||
tmp->SetBounds(ArcStart1, ArcStart1);
|
||||
CVec.insert(tmp);
|
||||
CVec.push_back(tmp);
|
||||
|
||||
tmp = new G4CircularCurve();
|
||||
tmp->Init(G4Axis2Placement3D(direction, axis2, origin2), large_radius);
|
||||
tmp->SetBounds(ArcStart2, ArcStart2);
|
||||
CVec.insert(tmp);
|
||||
CVec.push_back(tmp);
|
||||
|
||||
SurfaceVec[0] = new G4FConicalSurface(tmporigin, axis,
|
||||
length, radius, large_radius);
|
||||
@@ -70,7 +86,7 @@ G4BREPSolidCone::G4BREPSolidCone(const G4String& name,
|
||||
tmp = new G4CircularCurve();
|
||||
tmp->Init(G4Axis2Placement3D(direction, axis2, origin), radius);
|
||||
tmp->SetBounds(ArcStart1, ArcStart1);
|
||||
CVec2.insert(tmp);
|
||||
CVec2.push_back(tmp);
|
||||
|
||||
SurfaceVec[1] = new G4FPlane(tmpaxis, direction, origin2);
|
||||
//new G4AdvancedFace("G4FPlane" , origin2, direction, tmpaxis, CVec2, 1);
|
||||
|
||||
@@ -1,12 +1,28 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * 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. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4BREPSolidCylinder.cc,v 1.4 2000/11/08 14:22:08 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
// $Id: G4BREPSolidCylinder.cc,v 1.5.2.1 2001/06/28 19:08:50 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
@@ -47,7 +63,7 @@ G4BREPSolidCylinder::G4BREPSolidCylinder(const G4String& name,
|
||||
tmp = new G4CircularCurve;
|
||||
tmp->Init( G4Axis2Placement3D(direction, axis1, origin), radius );
|
||||
tmp->SetBounds(ArcStart1, ArcStart1);
|
||||
cv.insert(tmp);
|
||||
cv.push_back(tmp);
|
||||
|
||||
SurfaceVec[1] = new G4FPlane(direction, axis1, origin);
|
||||
SurfaceVec[1]->SetBoundaries(&cv);
|
||||
@@ -62,7 +78,7 @@ G4BREPSolidCylinder::G4BREPSolidCylinder(const G4String& name,
|
||||
tmp = new G4CircularCurve;
|
||||
tmp->Init( G4Axis2Placement3D(direction, axis2, origin2), radius);
|
||||
tmp->SetBounds(ArcStart2, ArcStart2);
|
||||
cv.insert(tmp);
|
||||
cv.push_back(tmp);
|
||||
|
||||
SurfaceVec[2] = new G4FPlane(direction, axis2, origin2);
|
||||
SurfaceVec[2]->SetBoundaries(&cv);
|
||||
|
||||
@@ -1,12 +1,28 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * 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. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4BREPSolidOpenPCone.cc,v 1.5 2000/11/08 14:22:08 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
// $Id: G4BREPSolidOpenPCone.cc,v 1.5.4.1 2001/06/28 19:08:50 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
|
||||
@@ -1,12 +1,28 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * 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. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4BREPSolidPCone.cc,v 1.17 2000/11/20 17:54:38 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
// $Id: G4BREPSolidPCone.cc,v 1.18.2.1 2001/06/28 19:08:50 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
@@ -123,7 +139,7 @@ G4BREPSolidPCone::G4BREPSolidPCone(const G4String& name,
|
||||
else
|
||||
tmp1->SetSameSense(0);
|
||||
|
||||
cv1.append(tmp1);
|
||||
cv1.push_back(tmp1);
|
||||
}
|
||||
|
||||
if(R2 != 0)
|
||||
@@ -135,7 +151,7 @@ G4BREPSolidPCone::G4BREPSolidPCone(const G4String& name,
|
||||
tmp2->SetSameSense(0);
|
||||
else
|
||||
tmp2->SetSameSense(1);
|
||||
cv1.append(tmp2);
|
||||
cv1.push_back(tmp2);
|
||||
}
|
||||
|
||||
SurfaceVec[b] = new G4FPlane(PlaneDir, PlaneAxis, LocalOrigin);
|
||||
@@ -279,13 +295,13 @@ G4BREPSolidPCone::G4BREPSolidPCone(const G4String& name,
|
||||
tmp->Init(G4Axis2Placement3D(PlaneDir, PlaneAxis, Origin), RMIN[0]);
|
||||
tmp->SetBounds(ArcStart1a, ArcStart1a);
|
||||
tmp->SetSameSense(0);
|
||||
cv.append(tmp);
|
||||
cv.push_back(tmp);
|
||||
|
||||
tmp = new G4CircularCurve;
|
||||
tmp->Init(G4Axis2Placement3D(PlaneDir, PlaneAxis, Origin), RMAX[0]);
|
||||
tmp->SetBounds(ArcStart1b, ArcStart1b);
|
||||
tmp->SetSameSense(1);
|
||||
cv.append(tmp);
|
||||
cv.push_back(tmp);
|
||||
|
||||
SurfaceVec[nb_of_surfaces-2] = new G4FPlane(PlaneDir, -PlaneAxis, Origin);
|
||||
SurfaceVec[nb_of_surfaces-2]->SetBoundaries(&cv);
|
||||
@@ -311,14 +327,14 @@ G4BREPSolidPCone::G4BREPSolidPCone(const G4String& name,
|
||||
RMIN[sections]);
|
||||
tmp->SetBounds(ArcStart2a, ArcStart2a);
|
||||
tmp->SetSameSense(0);
|
||||
cv.append(tmp);
|
||||
cv.push_back(tmp);
|
||||
|
||||
tmp = new G4CircularCurve;
|
||||
tmp->Init(G4Axis2Placement3D(PlaneDir, PlaneAxis, LocalOrigin),
|
||||
RMAX[sections]);
|
||||
tmp->SetBounds(ArcStart2b, ArcStart2b);
|
||||
tmp->SetSameSense(1);
|
||||
cv.append(tmp);
|
||||
cv.push_back(tmp);
|
||||
|
||||
SurfaceVec[nb_of_surfaces-1]= new G4FPlane(PlaneDir, PlaneAxis, LocalOrigin);
|
||||
SurfaceVec[nb_of_surfaces-1]->SetBoundaries(&cv);
|
||||
|
||||
@@ -1,12 +1,28 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * 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. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4BREPSolidPolyhedra.cc,v 1.15 2000/11/20 17:54:38 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
// $Id: G4BREPSolidPolyhedra.cc,v 1.15.4.1 2001/06/28 19:08:50 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
|
||||
@@ -1,12 +1,28 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * 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. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4BREPSolidSphere.cc,v 1.4 2000/11/08 14:22:08 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
// $Id: G4BREPSolidSphere.cc,v 1.4.4.1 2001/06/28 19:08:50 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
|
||||
@@ -1,12 +1,28 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * 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. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4BREPSolidTorus.cc,v 1.4 2000/11/08 14:22:08 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
// $Id: G4BREPSolidTorus.cc,v 1.4.4.1 2001/06/28 19:08:50 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
|
||||
@@ -1,12 +1,28 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * 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. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4BSplineCurve.cc,v 1.5 2000/11/08 14:22:08 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
// $Id: G4BSplineCurve.cc,v 1.7.2.1 2001/06/28 19:08:50 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
@@ -30,8 +46,9 @@ void G4BSplineCurve::Init(G4int degree0, G4Point3DVector* controlPointsList0,
|
||||
{
|
||||
degree= degree0;
|
||||
|
||||
G4int nbpoints = controlPointsList0->length();
|
||||
controlPointsList = new G4Point3DVector(nbpoints);
|
||||
G4int nbpoints = controlPointsList0->size();
|
||||
controlPointsList = new G4Point3DVector();
|
||||
controlPointsList->reserve(nbpoints);
|
||||
|
||||
G4int a;
|
||||
for(a = 0; a < nbpoints; a++)
|
||||
@@ -39,22 +56,23 @@ void G4BSplineCurve::Init(G4int degree0, G4Point3DVector* controlPointsList0,
|
||||
(*controlPointsList)[a] = (*controlPointsList0)[a];
|
||||
}
|
||||
|
||||
G4int nbknots = knots0->length();
|
||||
knots = new G4doubleVector(nbknots);
|
||||
G4int nbknots = knots0->size();
|
||||
knots = new G4doubleVector();
|
||||
knots->reserve(nbknots);
|
||||
for(a = 0; a < nbknots; a++)
|
||||
{
|
||||
(*knots)[a] = (*knots0)[a];
|
||||
}
|
||||
|
||||
G4int nbweights = weightsData0->length();
|
||||
weightsData = new G4doubleVector(nbweights);
|
||||
G4int nbweights = weightsData0->size();
|
||||
weightsData = new G4doubleVector();
|
||||
weightsData->reserve(nbweights);
|
||||
for(a = 0; a < nbweights; a++)
|
||||
{
|
||||
(*weightsData)[a] = (*weightsData0)[a];
|
||||
}
|
||||
|
||||
|
||||
SetBounds((*knots)[0], (*knots)[knots->length()-1]);
|
||||
SetBounds((*knots)[0], (*knots)[knots->size()-1]);
|
||||
}
|
||||
|
||||
|
||||
@@ -159,13 +177,13 @@ G4Curve* G4BSplineCurve::Project(const G4Transform3D& tr)
|
||||
// just transform + project all control points
|
||||
// what about self intersections?
|
||||
|
||||
G4int n = controlPointsList->length();
|
||||
G4int n = controlPointsList->size();
|
||||
G4Point3DVector* newControlPointsList = new G4Point3DVector(n);
|
||||
|
||||
for (G4int i=0; i<n; i++)
|
||||
for (G4int i=0; i<n; i++)
|
||||
{
|
||||
G4Point3D& p= (*newControlPointsList)(i);
|
||||
p= tr*(*controlPointsList)(i);
|
||||
G4Point3D& p= (*newControlPointsList)[i];
|
||||
p= tr*(*controlPointsList)[i];
|
||||
p.setZ(0);
|
||||
}
|
||||
|
||||
@@ -270,11 +288,11 @@ int G4BSplineCurve::Inside( const G4Point3d& Hit, const G4Ray& rayref)
|
||||
void G4BSplineCurve::InitBounded()
|
||||
{
|
||||
// just like in the old functions
|
||||
G4int pointCount = controlPointsList->length();
|
||||
bBox.Init( (*controlPointsList)(0) );
|
||||
G4int pointCount = controlPointsList->size();
|
||||
bBox.Init( (*controlPointsList)[0] );
|
||||
for (G4int i=1; i<pointCount; i++)
|
||||
{
|
||||
bBox.Extend( (*controlPointsList)(i) );
|
||||
bBox.Extend( (*controlPointsList)[i] );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,12 +1,28 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * 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. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4BSplineCurveWithKnots.cc,v 1.3 2000/08/28 08:57:56 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
// $Id: G4BSplineCurveWithKnots.cc,v 1.3.4.1 2001/06/28 19:08:50 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
|
||||
@@ -1,12 +1,28 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * 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. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4BSplineSurface.cc,v 1.10 2000/11/20 17:54:38 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
// $Id: G4BSplineSurface.cc,v 1.10.4.1 2001/06/28 19:08:51 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
|
||||
@@ -1,12 +1,28 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * 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. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4BSplineSurfaceWithKnots.cc,v 1.2 2000/08/28 08:57:56 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
// $Id: G4BSplineSurfaceWithKnots.cc,v 1.2.4.1 2001/06/28 19:08:51 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
|
||||
@@ -1,12 +1,28 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * 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. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4BezierSurface.cc,v 1.5 2000/11/20 17:54:39 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
// $Id: G4BezierSurface.cc,v 1.5.4.1 2001/06/28 19:08:51 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
|
||||
@@ -1,12 +1,28 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * 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. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4BoundingBox3D.cc,v 1.5 2000/11/08 14:22:09 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
// $Id: G4BoundingBox3D.cc,v 1.5.4.1 2001/06/28 19:08:51 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
|
||||
@@ -1,12 +1,28 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * 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. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4CircularCurve.cc,v 1.5 2000/11/08 14:22:09 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
// $Id: G4CircularCurve.cc,v 1.5.4.1 2001/06/28 19:08:51 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
|
||||
@@ -1,12 +1,28 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * 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. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4CompositeCurve.cc,v 1.8 2000/11/20 17:54:39 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
// $Id: G4CompositeCurve.cc,v 1.9.2.1 2001/06/28 19:08:51 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
@@ -24,15 +40,15 @@ G4CompositeCurve::G4CompositeCurve(){}
|
||||
G4CompositeCurve::G4CompositeCurve(const G4Point3DVector& vertices)
|
||||
{
|
||||
G4CurveVector cv;
|
||||
for (size_t i=0; i<vertices.length(); i++)
|
||||
for (size_t i=0; i<vertices.size(); i++)
|
||||
{
|
||||
G4Point3D p1= vertices[i];
|
||||
G4Point3D p2= vertices[(i+1) % vertices.length()];
|
||||
G4Point3D p2= vertices[(i+1) % vertices.size()];
|
||||
|
||||
G4Line* l= new G4Line;
|
||||
l->Init(p1, p2-p1);
|
||||
l->SetBounds(p1, p2);
|
||||
cv.insert(l);
|
||||
cv.push_back(l);
|
||||
}
|
||||
|
||||
Init(cv);
|
||||
@@ -40,7 +56,22 @@ G4CompositeCurve::G4CompositeCurve(const G4Point3DVector& vertices)
|
||||
|
||||
G4CompositeCurve::~G4CompositeCurve()
|
||||
{
|
||||
segments.clearAndDestroy();
|
||||
// Remove segments and delete all its contents
|
||||
G4Curve* a = 0;
|
||||
while (segments.size()>0)
|
||||
{
|
||||
a = segments.back();
|
||||
segments.pop_back();
|
||||
for (G4CurveVector::iterator i=segments.begin(); i!=segments.end(); i++)
|
||||
{
|
||||
if (*i==a)
|
||||
{
|
||||
segments.erase(i);
|
||||
i--;
|
||||
}
|
||||
}
|
||||
if ( a ) delete a;
|
||||
}
|
||||
}
|
||||
|
||||
G4String G4CompositeCurve::GetEntityType() const
|
||||
@@ -51,17 +82,34 @@ G4String G4CompositeCurve::GetEntityType() const
|
||||
G4Curve* G4CompositeCurve::Project(const G4Transform3D& tr)
|
||||
{
|
||||
G4CurveVector newSegments;
|
||||
G4Curve* a = 0;
|
||||
G4Curve* c = 0;
|
||||
|
||||
for (size_t i=0; i<segments.entries(); i++)
|
||||
for (size_t i=0; i<segments.size(); i++)
|
||||
{
|
||||
G4Curve* c= segments[i]->Project(tr);
|
||||
c = segments[i]->Project(tr);
|
||||
if (c==0)
|
||||
{
|
||||
newSegments.clearAndDestroy();
|
||||
// Remove newSegments and delete all its contents
|
||||
while (newSegments.size()>0)
|
||||
{
|
||||
a = newSegments.back();
|
||||
newSegments.pop_back();
|
||||
for (G4CurveVector::iterator i=newSegments.begin();
|
||||
i!=newSegments.end(); i++)
|
||||
{
|
||||
if (*i==a)
|
||||
{
|
||||
newSegments.erase(i);
|
||||
i--;
|
||||
}
|
||||
}
|
||||
if ( a ) delete a;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
newSegments.insert(c);
|
||||
newSegments.push_back(c);
|
||||
}
|
||||
|
||||
G4CompositeCurve* r= new G4CompositeCurve;
|
||||
@@ -116,9 +164,9 @@ G4int G4CompositeCurve::IntersectRay2D(const G4Ray& ray)
|
||||
G4int nbinter = 0;
|
||||
G4int temp = 0;
|
||||
|
||||
for (size_t i=0; i<segments.entries(); i++)
|
||||
for (size_t i=0; i<segments.size(); i++)
|
||||
{
|
||||
G4Curve& c= *(segments(i));
|
||||
G4Curve& c= *(segments[i]);
|
||||
temp = c.IntersectRay2D(ray);
|
||||
|
||||
// test if the point is on the composite curve
|
||||
@@ -147,7 +195,7 @@ void G4CompositeCurve::InitBounded()
|
||||
const G4BoundingBox3D* b= segments[0]->BBox();
|
||||
bBox.Init(b->GetBoxMin(), b->GetBoxMax());
|
||||
|
||||
for (size_t i=1; i<segments.entries(); i++)
|
||||
for (size_t i=1; i<segments.size(); i++)
|
||||
{
|
||||
b= segments[i]->BBox();
|
||||
bBox.Extend(b->GetBoxMin());
|
||||
|
||||
@@ -1,12 +1,28 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * 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. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4Conic.cc,v 1.5 2000/11/20 17:54:39 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
// $Id: G4Conic.cc,v 1.5.4.1 2001/06/28 19:08:51 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
|
||||
@@ -1,12 +1,28 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * 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. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4ConicalSurface.cc,v 1.5 2000/11/08 14:22:09 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
// $Id: G4ConicalSurface.cc,v 1.5.4.1 2001/06/28 19:08:51 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
|
||||
@@ -1,12 +1,28 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * 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. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4ControlPoints.cc,v 1.5 2000/11/08 14:22:09 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
// $Id: G4ControlPoints.cc,v 1.5.4.1 2001/06/28 19:08:51 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
|
||||
@@ -1,12 +1,28 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * 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. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4Curve.cc,v 1.5 2000/11/20 17:54:39 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
// $Id: G4Curve.cc,v 1.5.4.1 2001/06/28 19:08:51 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
|
||||
@@ -1,12 +1,28 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * 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. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4CurvePoint.cc,v 1.3 2000/11/08 14:22:09 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
// $Id: G4CurvePoint.cc,v 1.3.4.1 2001/06/28 19:08:51 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
|
||||
@@ -1,12 +1,28 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * 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. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4CurveRayIntersection.cc,v 1.3 2000/11/08 14:22:10 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
// $Id: G4CurveRayIntersection.cc,v 1.3.4.1 2001/06/28 19:08:52 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
|
||||
@@ -1,12 +1,28 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * 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. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4CylindricalSurface.cc,v 1.3 2000/08/28 08:57:57 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
// $Id: G4CylindricalSurface.cc,v 1.3.4.1 2001/06/28 19:08:52 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
|
||||
@@ -1,12 +1,28 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * 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. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4Ellipse.cc,v 1.6 2000/11/10 17:41:08 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
// $Id: G4Ellipse.cc,v 1.6.4.1 2001/06/28 19:08:52 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
|
||||
@@ -1,12 +1,28 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * 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. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4FConicalSurface.cc,v 1.14 2000/11/20 17:54:39 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
// $Id: G4FConicalSurface.cc,v 1.14.4.1 2001/06/28 19:08:52 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
|
||||
@@ -1,12 +1,28 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * 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. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4FCylindricalSurface.cc,v 1.11 2000/11/08 14:22:10 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
// $Id: G4FCylindricalSurface.cc,v 1.11.4.1 2001/06/28 19:08:52 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
|
||||
@@ -1,12 +1,28 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * 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. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4FPlane.cc,v 1.11 2000/11/20 17:54:40 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
// $Id: G4FPlane.cc,v 1.12.2.1 2001/06/28 19:08:52 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
@@ -52,7 +68,7 @@ G4FPlane::G4FPlane(const G4Point3DVector* pVec,
|
||||
const G4Point3DVector* iVec,
|
||||
G4int sense)
|
||||
: pplace( (*pVec)[0]-(*pVec)[1], // direction
|
||||
((*pVec)[pVec->length()-1]-(*pVec)[0])
|
||||
((*pVec)[pVec->size()-1]-(*pVec)[0])
|
||||
.cross((*pVec)[0]-(*pVec)[1]), // axis
|
||||
(*pVec)[0] ) // location
|
||||
|
||||
@@ -70,10 +86,10 @@ G4FPlane::G4FPlane(const G4Point3DVector* pVec,
|
||||
|
||||
polygon= new G4CompositeCurve(*pVec);
|
||||
|
||||
for (size_t i=0; i< polygon->GetSegments().length(); i++)
|
||||
for (size_t i=0; i< polygon->GetSegments().size(); i++)
|
||||
polygon->GetSegments()[i]->SetSameSense(sameSense);
|
||||
|
||||
bounds.insert(polygon);
|
||||
bounds.push_back(polygon);
|
||||
|
||||
// Eventual inner boundary
|
||||
|
||||
@@ -81,15 +97,15 @@ G4FPlane::G4FPlane(const G4Point3DVector* pVec,
|
||||
{
|
||||
polygon= new G4CompositeCurve(*iVec);
|
||||
|
||||
for (size_t i=0; i< polygon->GetSegments().length(); i++)
|
||||
for (size_t i=0; i< polygon->GetSegments().size(); i++)
|
||||
polygon->GetSegments()[i]->SetSameSense(sameSense);
|
||||
|
||||
bounds.insert(polygon);
|
||||
bounds.push_back(polygon);
|
||||
}
|
||||
|
||||
// Set sense for boundaries
|
||||
|
||||
for (size_t j=0; j< bounds.length(); j++)
|
||||
for (size_t j=0; j< bounds.size(); j++)
|
||||
bounds[j]->SetSameSense(sameSense);
|
||||
|
||||
|
||||
|
||||
@@ -1,12 +1,28 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * 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. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4Hyperbola.cc,v 1.5 2000/11/08 14:22:10 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
// $Id: G4Hyperbola.cc,v 1.6.2.1 2001/06/28 19:08:52 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
@@ -100,11 +116,7 @@ G4Curve* G4Hyperbola::Project(const G4Transform3D& tr)
|
||||
|
||||
G4double xval = -2*a*b/(a.mag2()+b.mag2());
|
||||
|
||||
#ifdef WIN32
|
||||
G4double u= (0.5*log((1+xval)/(1-xval)))/2;
|
||||
#else
|
||||
G4double u= atanh( xval ) / 2;
|
||||
#endif
|
||||
G4double u= (0.5*log((1+xval)/(1-xval)))/2; // atanh(xval)/2
|
||||
|
||||
// get the coordinate axis directions and the semiaxis lengths
|
||||
G4Vector3D sAxis= G4Vector3D( a*cosh(u)+b*sinh(u) );
|
||||
@@ -154,13 +166,9 @@ void G4Hyperbola::InitBounded()
|
||||
|
||||
if (abs(tanhu)<=1)
|
||||
{
|
||||
#ifdef WIN32
|
||||
G4double u= 0.5*log((1+tanhu)/(1-tanhu));
|
||||
#else
|
||||
G4double u= atanh(tanhu);
|
||||
#endif
|
||||
|
||||
if (IsPOn(u)) bBox.Extend(GetPoint(u));
|
||||
G4double u= 0.5*log((1+tanhu)/(1-tanhu)); // atanh(tanhu)
|
||||
if (IsPOn(u))
|
||||
bBox.Extend(GetPoint(u));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +1,28 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * 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. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4KnotVector.cc,v 1.5 2000/11/08 14:22:10 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
// $Id: G4KnotVector.cc,v 1.5.4.1 2001/06/28 19:08:52 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
|
||||
@@ -1,12 +1,28 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * 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. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4Line.cc,v 1.6 2000/11/08 14:22:10 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
// $Id: G4Line.cc,v 1.6.4.1 2001/06/28 19:08:52 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
|
||||
@@ -1,12 +1,28 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * 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. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4OsloMatrix.cc,v 1.4 2000/11/08 14:22:10 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
// $Id: G4OsloMatrix.cc,v 1.4.4.1 2001/06/28 19:08:52 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
|
||||
@@ -1,12 +1,28 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * 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. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4Parabola.cc,v 1.4 2000/11/08 14:22:10 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
// $Id: G4Parabola.cc,v 1.4.4.1 2001/06/28 19:08:52 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
|
||||
@@ -1,12 +1,28 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * 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. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4PlacedSolid.cc,v 1.3 2000/08/28 08:57:58 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
// $Id: G4PlacedSolid.cc,v 1.3.4.1 2001/06/28 19:08:53 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
|
||||
@@ -1,12 +1,28 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * 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. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4PointRat.cc,v 1.4 2000/08/28 08:57:58 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
// $Id: G4PointRat.cc,v 1.4.4.1 2001/06/28 19:08:53 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
|
||||
@@ -1,12 +1,28 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * 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. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4ProjectedSurface.cc,v 1.6 2000/11/20 17:54:40 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
// $Id: G4ProjectedSurface.cc,v 1.7.2.1 2001/06/28 19:08:53 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
@@ -105,8 +121,8 @@ void G4ProjectedSurface::CalcBBox()
|
||||
if(bmaxy < tmpy) box_maxy=tmpy;
|
||||
}
|
||||
|
||||
G4Point3D box_min(box_minx,box_miny);
|
||||
G4Point3D box_max(box_maxx,box_maxy);
|
||||
G4Point3D box_min(box_minx,box_miny,0.);
|
||||
G4Point3D box_max(box_maxx,box_maxy,0.);
|
||||
|
||||
delete bbox;
|
||||
bbox = new G4BoundingBox3D(box_min, box_max);
|
||||
|
||||
@@ -1,12 +1,28 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * 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. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4Ray.cc,v 1.5 2000/11/20 17:54:40 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
// $Id: G4Ray.cc,v 1.6.2.1 2001/06/28 19:08:53 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
@@ -103,12 +119,12 @@ void G4Ray::MatVecOrtho(register G4Vector3D &out,
|
||||
i_Which=2;
|
||||
|
||||
if(!i_Which)
|
||||
f = hypot( in.y(), in.z() );
|
||||
f = sqrt((in.y())*(in.y())+(in.z())*(in.z())); // hypot(in.y(),in.z())
|
||||
else
|
||||
if(i_Which==1)
|
||||
f = hypot( in.z(), in.x() );
|
||||
f = sqrt((in.z())*(in.z())+(in.x())*(in.x())); // hypot(in.z(),in.x())
|
||||
else
|
||||
f = hypot( in.x(), in.y() );
|
||||
f = sqrt((in.x())*(in.x())+(in.y())*(in.y())); // hypot(in.x(),in.y())
|
||||
|
||||
if( NearZero( f, SMALL ) )
|
||||
{
|
||||
|
||||
@@ -1,12 +1,28 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * 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. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4RectangularTrimmedSurface.cc,v 1.5 2000/11/08 14:22:11 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
// $Id: G4RectangularTrimmedSurface.cc,v 1.5.4.1 2001/06/28 19:08:53 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
|
||||
@@ -1,12 +1,28 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * 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. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4Sort.cc,v 1.3 2000/08/28 08:57:59 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
// $Id: G4Sort.cc,v 1.3.4.1 2001/06/28 19:08:53 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 source file
|
||||
|
||||
@@ -1,12 +1,28 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * 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. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4SphericalSurface.cc,v 1.4 2000/11/08 14:22:11 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
// $Id: G4SphericalSurface.cc,v 1.4.4.1 2001/06/28 19:08:53 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
|
||||
@@ -1,12 +1,28 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * 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. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4Surface.cc,v 1.7 2000/11/20 17:54:40 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
// $Id: G4Surface.cc,v 1.8.2.1 2001/06/28 19:08:53 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
@@ -158,19 +174,19 @@ G4double G4Surface::ClosestDistanceToPoint(const G4Point3D& Pt)
|
||||
G4double tmpDistance;
|
||||
const G4CurveVector& bounds= surfaceBoundary.GetBounds();
|
||||
|
||||
G4int entr = bounds.entries();
|
||||
G4int entr = bounds.size();
|
||||
|
||||
for (G4int i=0; i<entr; i++)
|
||||
{
|
||||
G4Curve* c= bounds(i);
|
||||
G4Curve* c= bounds[i];
|
||||
|
||||
if (c->GetEntityType() == "G4CompositeCurve")
|
||||
{
|
||||
G4CompositeCurve* cc= (G4CompositeCurve*)c;
|
||||
const G4CurveVector& segments= cc->GetSegments();
|
||||
for (size_t i=0; i<segments.entries(); i++)
|
||||
for (size_t i=0; i<segments.size(); i++)
|
||||
{
|
||||
G4Curve* ccc= segments(i);
|
||||
G4Curve* ccc= segments[i];
|
||||
tmpDistance= (G4Point3D(Pt.x(), Pt.y(), Pt.z())-ccc->GetEnd()).mag2();
|
||||
if (pointDistance > tmpDistance)
|
||||
{
|
||||
|
||||
@@ -1,12 +1,28 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * 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. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4SurfaceBoundary.cc,v 1.8 2000/11/20 17:54:40 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
// $Id: G4SurfaceBoundary.cc,v 1.9.2.1 2001/06/28 19:08:53 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
@@ -37,7 +53,7 @@ void G4SurfaceBoundary::Init(const G4CurveVector& bounds0)
|
||||
bBox.Init(b->GetBoxMin(), b->GetBoxMax());
|
||||
|
||||
size_t i;
|
||||
for ( i=1; i<bounds.entries(); i++)
|
||||
for ( i=1; i<bounds.size(); i++)
|
||||
{
|
||||
b= bounds[i]->BBox();
|
||||
bBox.Extend(b->GetBoxMin());
|
||||
@@ -47,37 +63,37 @@ void G4SurfaceBoundary::Init(const G4CurveVector& bounds0)
|
||||
// the points array is probably unused, so the following code is useless
|
||||
G4int cnt= 0;
|
||||
|
||||
size_t entr = bounds.entries();
|
||||
size_t entr = bounds.size();
|
||||
|
||||
for (i=0; i < entr; i++)
|
||||
{
|
||||
G4Curve* c = bounds(i);
|
||||
G4Curve* c = bounds[i];
|
||||
|
||||
if (c->GetEntityType() == "G4CompositeCurve")
|
||||
{
|
||||
G4CompositeCurve* cc = (G4CompositeCurve*)c;
|
||||
const G4CurveVector& segments = cc->GetSegments();
|
||||
cnt+= segments.entries();
|
||||
cnt+= segments.size();
|
||||
}
|
||||
else
|
||||
cnt++;
|
||||
}
|
||||
|
||||
points.reshape(cnt);
|
||||
points.resize(cnt);
|
||||
|
||||
G4int j= 0;
|
||||
|
||||
for (i=0; i<bounds.entries(); i++)
|
||||
for (i=0; i<bounds.size(); i++)
|
||||
{
|
||||
G4Curve* c= bounds(i);
|
||||
G4Curve* c= bounds[i];
|
||||
if (c->GetEntityType() == "G4CompositeCurve")
|
||||
{
|
||||
G4CompositeCurve* cc = (G4CompositeCurve*)c;
|
||||
const G4CurveVector& segments = cc->GetSegments();
|
||||
|
||||
for (size_t i=0; i<segments.entries(); i++)
|
||||
for (size_t i=0; i<segments.size(); i++)
|
||||
{
|
||||
G4Curve* ccc = segments(i);
|
||||
G4Curve* ccc = segments[i];
|
||||
G4Point3D p = ccc->GetEnd();
|
||||
points[j]= p;
|
||||
j++;
|
||||
@@ -97,20 +113,37 @@ void G4SurfaceBoundary::Init(const G4CurveVector& bounds0)
|
||||
G4SurfaceBoundary* G4SurfaceBoundary::Project(const G4Transform3D& tr)
|
||||
{
|
||||
G4CurveVector newBounds;
|
||||
G4Curve* a = 0;
|
||||
G4Curve* c = 0;
|
||||
|
||||
for (size_t i=0; i<bounds.entries(); i++)
|
||||
for (size_t i=0; i<bounds.size(); i++)
|
||||
{
|
||||
G4Curve* c= bounds[i]->Project(tr);
|
||||
c= bounds[i]->Project(tr);
|
||||
|
||||
if (c==0)
|
||||
{
|
||||
newBounds.clearAndDestroy();
|
||||
// Remove newBounds and delete all its contents
|
||||
while (newBounds.size()>0)
|
||||
{
|
||||
a = newBounds.back();
|
||||
newBounds.pop_back();
|
||||
for (G4CurveVector::iterator i=newBounds.begin();
|
||||
i!=newBounds.end(); i++)
|
||||
{
|
||||
if (*i==a)
|
||||
{
|
||||
newBounds.erase(i);
|
||||
i--;
|
||||
}
|
||||
}
|
||||
if ( a ) delete a;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
// L. Broglia
|
||||
c->SetSameSense( bounds[i]->GetSameSense() );
|
||||
|
||||
newBounds.insert(c);
|
||||
newBounds.push_back(c);
|
||||
}
|
||||
|
||||
G4SurfaceBoundary* lof= new G4SurfaceBoundary;
|
||||
@@ -143,9 +176,9 @@ G4int G4SurfaceBoundary::IntersectRay2D(const G4Ray& ray)
|
||||
G4int nbinter = 0;
|
||||
G4int temp = 0;
|
||||
|
||||
for (size_t i=0; i < bounds.entries(); i++)
|
||||
for (size_t i=0; i < bounds.size(); i++)
|
||||
{
|
||||
G4Curve& c = *bounds.at(i);
|
||||
G4Curve& c = *bounds[i];
|
||||
temp = c.IntersectRay2D(ray);
|
||||
|
||||
// test if the point is on the boundary
|
||||
|
||||
@@ -1,12 +1,28 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * 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. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4SurfaceList.cc,v 1.5 2000/11/08 14:22:11 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
// $Id: G4SurfaceList.cc,v 1.5.4.1 2001/06/28 19:08:53 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
|
||||
@@ -1,12 +1,28 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * 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. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4SurfaceOfLinearExtrusion.cc,v 1.2 2000/08/28 08:57:59 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
// $Id: G4SurfaceOfLinearExtrusion.cc,v 1.2.4.1 2001/06/28 19:08:53 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
|
||||
@@ -1,9 +1,31 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * 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. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4SurfaceOfRevolution.cc,v 1.2 2000/08/28 08:57:59 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
// $Id: G4SurfaceOfRevolution.cc,v 1.2.4.1 2001/06/28 19:08:54 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
|
||||
@@ -1,12 +1,28 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * 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. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4ThreeMat.cc,v 1.5 2000/11/08 14:22:11 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
// $Id: G4ThreeMat.cc,v 1.5.4.1 2001/06/28 19:08:54 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
|
||||
@@ -1,12 +1,28 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * 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. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4ToroidalSurface.cc,v 1.5 2000/11/20 17:54:41 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
// $Id: G4ToroidalSurface.cc,v 1.5.4.1 2001/06/28 19:08:54 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
|
||||
Reference in New Issue
Block a user