Import Geant4 9.1.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 15:37:50 +02:00
parent a8e9364cea
commit 96c8bcd0af
6923 changed files with 198390 additions and 41849 deletions
@@ -1,5 +1,5 @@
# $Id: GNUmakefile,v 1.2 2006/04/25 08:09:45 kmura Exp $
# $Name: geant4-09-00 $
# $Name: geant4-09-01 $
# ===========================================================
# Makefile for building Geant4Py modules
# ===========================================================
@@ -0,0 +1,58 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: pyG4BooleanSolid.cc,v 1.1 2007/08/07 03:35:53 kmura Exp $
// $Name: geant4-09-01 $
// ====================================================================
// pyG4BooleanSolid.cc
//
// 2007 Q
// ====================================================================
#include <boost/python.hpp>
#include "G4BooleanSolid.hh"
using namespace boost::python;
// ====================================================================
// module definition
// ====================================================================
void export_G4BooleanSolid()
{
class_<G4BooleanSolid, G4BooleanSolid*, bases<G4VSolid>, boost::noncopyable>
("G4BooleanSolid", "boolean solid class", no_init)
// ---
.def("GetCubVolStatistics", &G4BooleanSolid::GetCubVolStatistics)
.def("GetCubVolEpsilon", &G4BooleanSolid::GetCubVolEpsilon)
.def("SetCubVolStatistics", &G4BooleanSolid::SetCubVolStatistics)
.def("SetCubVolEpsilon", &G4BooleanSolid::SetCubVolEpsilon)
.def("GetAreaStatistics", &G4BooleanSolid::GetAreaStatistics)
.def("GetAreaAccuracy", &G4BooleanSolid::GetAreaAccuracy)
.def("SetAreaStatistics", &G4BooleanSolid::SetAreaStatistics)
.def("SetAreaAccuracy", &G4BooleanSolid::SetAreaAccuracy)
.def("GetPointOnSurface", &G4BooleanSolid::GetPointOnSurface)
;
}
+21 -3
View File
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: pyG4Box.cc,v 1.4 2006/06/29 15:31:50 gunter Exp $
// $Name: geant4-09-00 $
// $Id: pyG4Box.cc,v 1.6 2007/07/12 10:01:53 kmura Exp $
// $Name: geant4-09-01 $
// ====================================================================
// pyG4Box.cc
//
@@ -35,6 +35,21 @@
using namespace boost::python;
// ====================================================================
// wrappers
// ====================================================================
namespace pyG4Box {
G4Box* CreateBox(const G4String& name, G4double pX, G4double pY,
G4double pZ)
{
return new G4Box(name, pX, pY, pZ);
}
}
using namespace pyG4Box;
// ====================================================================
// module definition
// ====================================================================
@@ -51,9 +66,12 @@ void export_G4Box()
.def("SetXHalfLength", &G4Box::SetXHalfLength)
.def("SetYHalfLength", &G4Box::SetYHalfLength)
.def("SetZHalfLength", &G4Box::SetZHalfLength)
.def("GetCubicVolume", &G4Box::GetCubicVolume)
// operators
.def(self_ns::str(self))
;
// Create solid
def("CreateBox", CreateBox, return_value_policy<manage_new_object>());
}
@@ -24,7 +24,7 @@
// ********************************************************************
//
// $Id: pyG4ChordFinder.cc,v 1.4 2006/06/29 15:31:53 gunter Exp $
// $Name: geant4-09-00 $
// $Name: geant4-09-01 $
// ====================================================================
// pyG4ChordFinder.cc
//
+22 -3
View File
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: pyG4Cons.cc,v 1.4 2006/06/29 15:31:56 gunter Exp $
// $Name: geant4-09-00 $
// $Id: pyG4Cons.cc,v 1.5 2007/07/12 10:01:53 kmura Exp $
// $Name: geant4-09-01 $
// ====================================================================
// pyG4Cons.cc
//
@@ -35,6 +35,22 @@
using namespace boost::python;
// ====================================================================
// wrappers
// ====================================================================
namespace pyG4Cons {
G4Cons* CreateCons(const G4String& name, G4double pRmin1, G4double pRmax1,
G4double pRmin2, G4double pRmax2, G4double pDz,
G4double pSPhi, G4double pDPhi)
{
return new G4Cons(name, pRmin1, pRmax1, pRmin2, pRmax2, pDz, pSPhi, pDPhi);
}
}
using namespace pyG4Cons;
// ====================================================================
// module definition
// ====================================================================
@@ -60,9 +76,12 @@ void export_G4Cons()
.def("SetZHalfLength", &G4Cons::SetZHalfLength)
.def("SetStartPhiAngle", &G4Cons::SetStartPhiAngle)
.def("SetDeltaPhiAngle", &G4Cons::SetDeltaPhiAngle)
.def("GetCubicVolume", &G4Cons::GetCubicVolume)
// operators
.def(self_ns::str(self))
;
// Create solid
def("CreateCons", CreateCons, return_value_policy<manage_new_object>());
}
@@ -0,0 +1,86 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: pyG4Ellipsoid.cc,v 1.2 2007/07/13 04:57:50 kmura Exp $
// $Name: geant4-09-01 $
// ====================================================================
// pyG4Ellipsoid.cc
//
// 2007 Q
// ====================================================================
#include <boost/python.hpp>
#include "G4Ellipsoid.hh"
using namespace boost::python;
// ====================================================================
// thin wrappers
// ====================================================================
namespace pyG4Ellipsoid {
G4Ellipsoid* CreateEllipsoid(const G4String& name,
G4double pxSemiAxis,
G4double pySemiAxis,
G4double pzSemiAxis,
G4double pzBottomCut=0,
G4double pzTopCut=0)
{
return new G4Ellipsoid(name, pxSemiAxis, pySemiAxis, pzSemiAxis,
pzBottomCut, pzTopCut);
}
BOOST_PYTHON_FUNCTION_OVERLOADS(f_CreateEllipsoid, CreateEllipsoid, 4,6);
}
using namespace pyG4Ellipsoid;
// ====================================================================
// module definition
// ====================================================================
void export_G4Ellipsoid()
{
class_<G4Ellipsoid, G4Ellipsoid*, bases<G4VSolid> >
("G4Ellipsoid", "ellipsoid class", no_init)
// constructors
.def(init<const G4String&, G4double, G4double, G4double>())
.def(init<const G4String&, G4double, G4double, G4double, G4double>())
.def(init<const G4String&, G4double, G4double, G4double, G4double,
G4double>())
// ---
.def("GetSemiAxisMax", &G4Ellipsoid::GetSemiAxisMax)
.def("GetZBottomCut", &G4Ellipsoid::GetZBottomCut)
.def("GetZTopCut", &G4Ellipsoid::GetZTopCut)
.def("SetSemiAxis", &G4Ellipsoid::SetSemiAxis)
.def("SetZCuts", &G4Ellipsoid::SetZCuts)
// operators
.def(self_ns::str(self))
;
// Create solid
def("CreateEllipsoid", CreateEllipsoid,
f_CreateEllipsoid()[return_value_policy<manage_new_object>()]);
}
@@ -0,0 +1,79 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: pyG4EllipticalCone.cc,v 1.2 2007/07/13 04:57:50 kmura Exp $
// $Name: geant4-09-01 $
// ====================================================================
// pyG4EllipticalCone.cc
//
// 2007 Q
// ====================================================================
#include <boost/python.hpp>
#include "G4EllipticalCone.hh"
using namespace boost::python;
// ====================================================================
// wrappers
// ====================================================================
namespace pyG4EllipticalCone {
G4EllipticalCone* CreateEllipticalCone(const G4String& name,
G4double pxSemiAxis,
G4double pySemiAxis,
G4double zMax,
G4double pzTopCut)
{
new G4EllipticalCone(name, pxSemiAxis,pySemiAxis, zMax, pzTopCut);
}
}
using namespace pyG4EllipticalCone;
// ====================================================================
// module definition
// ====================================================================
void export_G4EllipticalCone()
{
class_<G4EllipticalCone, G4EllipticalCone*, bases<G4VSolid> >
("G4EllipticalCone", "elliptical cone solid class", no_init)
// constructors
.def(init<const G4String&, G4double, G4double, G4double, G4double>())
// ---
.def("GetSimiAxisMax", &G4EllipticalCone::GetSemiAxisMax)
.def("GetZTopCut", &G4EllipticalCone::GetZTopCut)
.def("SetSemiAxis", &G4EllipticalCone::SetSemiAxis)
.def("SetZCut", &G4EllipticalCone::SetZCut)
// operators
.def(self_ns::str(self))
;
// Create solid
def("CreateEllipticalCone", CreateEllipticalCone,
return_value_policy<manage_new_object>());
}
@@ -0,0 +1,81 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: pyG4EllipticalTube.cc,v 1.2 2007/07/13 04:57:50 kmura Exp $
// $Name: geant4-09-01 $
// ====================================================================
// pyG4EllipticalTube.cc
//
// 2007 Q
// ====================================================================
#include <boost/python.hpp>
#include "G4EllipticalTube.hh"
using namespace boost::python;
// ====================================================================
// wrappers
// ====================================================================
namespace pyG4EllipticalTube {
G4EllipticalTube* CreateEllipticalTube(const G4String& name,
G4double theDx,
G4double theDy,
G4double theDz)
{
return new G4EllipticalTube(name, theDx, theDy, theDz);
}
}
using namespace pyG4EllipticalTube;
// ====================================================================
// module definition
// ====================================================================
void export_G4EllipticalTube()
{
class_<G4EllipticalTube, G4EllipticalTube*, bases<G4VSolid> >
("G4EllipticalTube", "elliptical tube solid class", no_init)
// constructors
.def(init<const G4String&, G4double, G4double, G4double>())
// ---
.def("GetDx", &G4EllipticalTube::GetDx)
.def("GetDy", &G4EllipticalTube::GetDy)
.def("GetDz", &G4EllipticalTube::GetDz)
.def("SetDx", &G4EllipticalTube::SetDx)
.def("SetDy", &G4EllipticalTube::SetDy)
.def("SetDz", &G4EllipticalTube::SetDz)
// operators
.def(self_ns::str(self))
;
// Create solid
def("CreateEllipticalTube", CreateEllipticalTube,
return_value_policy<manage_new_object>());
}
@@ -24,7 +24,7 @@
// ********************************************************************
//
// $Id: pyG4Field.cc,v 1.4 2006/06/29 15:31:59 gunter Exp $
// $Name: geant4-09-00 $
// $Name: geant4-09-01 $
// ====================================================================
// pyG4Field.cc
//
@@ -24,7 +24,7 @@
// ********************************************************************
//
// $Id: pyG4FieldManager.cc,v 1.4 2006/06/29 15:32:02 gunter Exp $
// $Name: geant4-09-00 $
// $Name: geant4-09-01 $
// ====================================================================
// pyG4FieldManager.cc
//
@@ -0,0 +1,89 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: pyG4Hype.cc,v 1.2 2007/07/13 04:57:50 kmura Exp $
// $Name: geant4-09-01 $
// ====================================================================
// pyG4Hype.cc
//
// 2007 Q
// ====================================================================
#include <boost/python.hpp>
#include "G4Hype.hh"
using namespace boost::python;
// ====================================================================
// wrappers
// ====================================================================
namespace pyG4Hype {
G4Hype* CreateHype(const G4String& name,
G4double newInnerRadius,
G4double newOuterRadius,
G4double newInnerStereo,
G4double newOuterStereo,
G4double newHalfLenZ)
{
return new G4Hype(name, newInnerRadius, newOuterRadius,
newInnerStereo, newOuterStereo,
newHalfLenZ);
}
}
using namespace pyG4Hype;
// ====================================================================
// module definition
// ====================================================================
void export_G4Hype()
{
class_<G4Hype, G4Hype*, bases<G4VSolid> >
("G4Hype", "hyperbolic solid class", no_init)
// constructors
.def(init<const G4String&, G4double, G4double, G4double,
G4double, G4double>())
// ---
.def("GetInnerRadius", &G4Hype::GetInnerRadius)
.def("GetOuterRadius", &G4Hype::GetOuterRadius)
.def("GetZHalfLength", &G4Hype::GetZHalfLength)
.def("GetInnerStereo", &G4Hype::GetInnerStereo)
.def("GetOuterStereo", &G4Hype::GetOuterStereo)
.def("SetInnerRadius", &G4Hype::SetInnerRadius)
.def("SetOuterRadius", &G4Hype::SetOuterRadius)
.def("SetZHalfLength", &G4Hype::SetZHalfLength)
.def("SetInnerStereo", &G4Hype::SetInnerStereo)
.def("SetOuterStereo", &G4Hype::SetOuterStereo)
// operators
.def(self_ns::str(self))
;
// Create solid
def("CreateHype", CreateHype, return_value_policy<manage_new_object>());
}
@@ -0,0 +1,54 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: pyG4IntersctionSolid.cc,v 1.1 2007/08/07 03:35:53 kmura Exp $
// $Name: geant4-09-01 $
// ====================================================================
// pyG4IntersectionSolid.cc
//
// 2007 Q
// ====================================================================
#include <boost/python.hpp>
#include "G4IntersectionSolid.hh"
using namespace boost::python;
// ====================================================================
// module definition
// ====================================================================
void export_G4IntersectionSolid()
{
class_<G4IntersectionSolid,G4IntersectionSolid*,
bases<G4BooleanSolid>,boost::noncopyable>
("G4IntersectionSolid", "intersection solid class", no_init)
// ---
.def(init<const G4String&, G4VSolid*, G4VSolid*>())
.def(init<const G4String&, G4VSolid*, G4VSolid*,
G4RotationMatrix*, const G4ThreeVector&>())
.def(init<const G4String&, G4VSolid*, G4VSolid*,
const G4Transform3D&>())
;
}
@@ -24,7 +24,7 @@
// ********************************************************************
//
// $Id: pyG4LogicalVolume.cc,v 1.4 2006/06/29 15:32:08 gunter Exp $
// $Name: geant4-09-00 $
// $Name: geant4-09-01 $
// ====================================================================
// pyG4LogicalVolume.cc
//
@@ -24,7 +24,7 @@
// ********************************************************************
//
// $Id: pyG4MagneticField.cc,v 1.4 2006/06/29 15:32:10 gunter Exp $
// $Name: geant4-09-00 $
// $Name: geant4-09-01 $
// ====================================================================
// pyG4MagneticField.cc
//
@@ -0,0 +1,55 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: pyG4Navigator.cc,v 1.1 2007/11/13 10:23:51 kmura Exp $
// $Name: geant4-09-01 $
// ====================================================================
// pyG4Navigator.cc
//
// Only limitted functionalities are exposed.
//
// 2007 Q
// ====================================================================
#include <boost/python.hpp>
#include "G4Navigator.hh"
using namespace boost::python;
// ====================================================================
// module definition
// ====================================================================
void export_G4Navigator()
{
class_<G4Navigator, G4Navigator*>("G4Navigator", "navigator")
// ---
.def("GetWorldVolume", &G4Navigator::GetWorldVolume,
return_value_policy<reference_existing_object>())
.def("GetVerboseLevel", &G4Navigator::GetVerboseLevel)
.def("SetVerboseLevel", &G4Navigator::SetVerboseLevel)
.def("IsActive", &G4Navigator::IsActive)
.def("PrintState", &G4Navigator::PrintState)
;
}
+20 -3
View File
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: pyG4Orb.cc,v 1.4 2006/06/29 15:32:13 gunter Exp $
// $Name: geant4-09-00 $
// $Id: pyG4Orb.cc,v 1.5 2007/07/13 04:57:50 kmura Exp $
// $Name: geant4-09-01 $
// ====================================================================
// pyG4Orb.cc
//
@@ -35,6 +35,20 @@
using namespace boost::python;
// ====================================================================
// wrappers
// ====================================================================
namespace pyG4Orb {
G4Orb* CreateOrb(const G4String& name, G4double pRmax)
{
return new G4Orb(name, pRmax);
}
}
using namespace pyG4Orb;
// ====================================================================
// module definition
// ====================================================================
@@ -47,8 +61,11 @@ void export_G4Orb()
// ---
.def("GetRadius", &G4Orb::GetRadius)
.def("SetRadius", &G4Orb::SetRadius)
.def("GetCubicVolume", &G4Orb::GetCubicVolume)
// operators
.def(self_ns::str(self))
;
// Create solid
def("CreateOrb", CreateOrb, return_value_policy<manage_new_object>());
}
@@ -23,19 +23,41 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: pyG4PVPlacement.cc,v 1.4 2006/06/29 15:32:15 gunter Exp $
// $Name: geant4-09-00 $
// $Id: pyG4PVPlacement.cc,v 1.5 2007/08/07 03:35:53 kmura Exp $
// $Name: geant4-09-01 $
// ====================================================================
// pyG4PVPlacement.cc
//
// 2005 Q
// ====================================================================
#include <boost/python.hpp>
#include "pyG4Version.hh"
#include "G4PVPlacement.hh"
#include "G4LogicalVolume.hh"
using namespace boost::python;
// ====================================================================
// thin wrappers
// ====================================================================
namespace pyG4PVPlacement {
#if G4VERSION_NUMBER <=711
#elif G4VERSION_NUMBER <= 820
BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(f_CheckOverlaps,
CheckOverlaps, 0, 1);
#elif G4VERSION_NUMBER <=821
BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(f_CheckOverlaps,
CheckOverlaps, 0, 2);
#else
BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(f_CheckOverlaps,
CheckOverlaps, 0, 3);
#endif
}
using namespace pyG4PVPlacement;
// ====================================================================
// module definition
// ====================================================================
@@ -55,6 +77,22 @@ void export_G4PVPlacement()
G4VPhysicalVolume*, G4bool, G4int>())
.def(init<const G4Transform3D&, const G4String&,
G4LogicalVolume*, G4VPhysicalVolume*, G4bool, G4int>())
#if G4VERSION_NUMBER >=800
.def(init<G4RotationMatrix*, const G4ThreeVector&,
G4LogicalVolume*, const G4String&,
G4LogicalVolume*, G4bool, G4int, G4bool>())
.def(init<const G4Transform3D&, G4LogicalVolume*,
const G4String&, G4LogicalVolume*, G4bool, G4int, G4bool>())
.def(init<G4RotationMatrix*, const G4ThreeVector&,
const G4String, G4LogicalVolume*,
G4VPhysicalVolume*, G4bool, G4int, G4bool>())
.def(init<const G4Transform3D&, const G4String&,
G4LogicalVolume*, G4VPhysicalVolume*, G4bool, G4int, G4bool>())
#endif
// ---
#if G4VERSION_NUMBER >=800
.def("CheckOverlaps", &G4PVPlacement::CheckOverlaps, f_CheckOverlaps())
#endif
;
}
@@ -24,7 +24,7 @@
// ********************************************************************
//
// $Id: pyG4PVReplica.cc,v 1.4 2006/06/29 15:32:18 gunter Exp $
// $Name: geant4-09-00 $
// $Name: geant4-09-01 $
// ====================================================================
// pyG4PVReplica.cc
//
+21 -3
View File
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: pyG4Para.cc,v 1.4 2006/06/29 15:32:21 gunter Exp $
// $Name: geant4-09-00 $
// $Id: pyG4Para.cc,v 1.5 2007/07/12 10:01:53 kmura Exp $
// $Name: geant4-09-01 $
// ====================================================================
// pyG4Para.cc
//
@@ -35,6 +35,22 @@
using namespace boost::python;
// ====================================================================
// wrappers
// ====================================================================
namespace pyG4Para {
G4Para* CreatePara(const G4String& name,
G4double pDx, G4double pDy, G4double pDz,
G4double pAlpha, G4double pTheta, G4double pPhi)
{
return new G4Para(name, pDx, pDy, pDz, pAlpha, pTheta, pPhi);
}
}
using namespace pyG4Para;
// ====================================================================
// module definition
// ====================================================================
@@ -58,9 +74,11 @@ void export_G4Para()
.def("SetTanAlpha", &G4Para::SetTanAlpha)
.def("SetThetaAndPhi", &G4Para::SetThetaAndPhi)
.def("SetAllParameters", &G4Para::SetAllParameters)
.def("GetCubicVolume", &G4Para::GetCubicVolume)
// operators
.def(self_ns::str(self))
;
// Create solid
def("CreatePara", CreatePara, return_value_policy<manage_new_object>());
}
@@ -0,0 +1,114 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: pyG4Polycone.cc,v 1.1 2007/07/11 05:39:50 kmura Exp $
// $Name: geant4-09-01 $
// ====================================================================
// pyG4Polycone.cc
//
// 2007 Q
// ====================================================================
#include <boost/python.hpp>
#include "G4Polycone.hh"
using namespace boost::python;
// ====================================================================
// thin wrappers
// ====================================================================
namespace pyG4Polycone {
// create solid methods
G4Polycone* f1_CreatePolycone(const G4String& name, G4double phiStart,
G4double phiTotal, G4int numZPlanes,
const std::vector<G4double>& zPlane,
const std::vector<G4double>& rInner,
const std::vector<G4double>& rOuter)
{
G4double zlist[numZPlanes];
G4double r0list[numZPlanes];
G4double r1list[numZPlanes];
for (G4int i=0; i< numZPlanes; i++) {
zlist[i]= zPlane[i];
r0list[i]= rInner[i];
r1list[i]= rOuter[i];
}
return new G4Polycone(name, phiStart, phiTotal, numZPlanes,
zlist, r0list, r1list);
}
G4Polycone* f2_CreatePolycone(const G4String& name, G4double phiStart,
G4double phiTotal, G4int numRZ,
const std::vector<G4double>& r,
const std::vector<G4double>& z)
{
G4double zlist[numRZ];
G4double rlist[numRZ];
for (G4int i=0; i< numRZ; i++) {
rlist[i]= r[i];
zlist[i]= z[i];
}
return new G4Polycone(name, phiStart, phiTotal, numRZ,
rlist, zlist);
}
}
using namespace pyG4Polycone;
// ====================================================================
// module definition
// ====================================================================
void export_G4Polycone()
{
class_<G4Polycone, G4Polycone*, bases<G4VSolid> >
("G4Polycone", "Polycone solid class", no_init)
// ---
.def("GetStartPhi", &G4Polycone::GetStartPhi)
.def("GetEndPhi", &G4Polycone::GetEndPhi)
.def("IsOpen", &G4Polycone::IsOpen)
.def("IsGeneric", &G4Polycone::IsGeneric)
.def("GetNumRZCorner", &G4Polycone::GetNumRZCorner)
// operators
.def(self_ns::str(self))
;
// Create solid
def("CreatePolycone", f1_CreatePolycone,
return_value_policy<manage_new_object>());
def("CreatePolycone", f2_CreatePolycone,
return_value_policy<manage_new_object>());
}
@@ -0,0 +1,115 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: pyG4Polyhedra.cc,v 1.2 2007/07/11 10:02:22 kmura Exp $
// $Name: geant4-09-01 $
// ====================================================================
// pyG4Polyhedra.cc
//
// 2007 Q
// ====================================================================
#include <boost/python.hpp>
#include "G4Polyhedra.hh"
using namespace boost::python;
// ====================================================================
// thin wrappers
// ====================================================================
namespace pyG4Polyhedra {
// create solid methods
G4Polyhedra* f1_CreatePolyhedra(const G4String& name,
G4double phiStart, G4double phiTotal,
G4int numSide, G4int numZPlanes,
const std::vector<G4double>& zPlane,
const std::vector<G4double>& rInner,
const std::vector<G4double>& rOuter)
{
G4double zlist[numZPlanes];
G4double r0list[numZPlanes];
G4double r1list[numZPlanes];
for (G4int i=0; i< numZPlanes; i++) {
zlist[i]= zPlane[i];
r0list[i]= rInner[i];
r1list[i]= rOuter[i];
}
return new G4Polyhedra(name, phiStart, phiTotal, numSide, numZPlanes,
zlist, r0list, r1list);
}
G4Polyhedra* f2_CreatePolyhedra(const G4String& name,
G4double phiStart, G4double phiTotal,
G4int numSide, G4int numRZ,
const std::vector<G4double>& r,
const std::vector<G4double>& z)
{
G4double zlist[numRZ];
G4double rlist[numRZ];
for (G4int i=0; i< numRZ; i++) {
zlist[i]= z[i];
rlist[i]= r[i];
}
return new G4Polyhedra(name, phiStart, phiTotal, numSide, numRZ,
rlist, zlist);
}
}
using namespace pyG4Polyhedra;
// ====================================================================
// module definition
// ====================================================================
void export_G4Polyhedra()
{
class_<G4Polyhedra, G4Polyhedra*, bases<G4VSolid> >
("G4Polyhedra", "Polyhedra solid class", no_init)
// ---
.def("GetStartPhi", &G4Polyhedra::GetStartPhi)
.def("GetEndPhi", &G4Polyhedra::GetEndPhi)
.def("GetNumSide", &G4Polyhedra::GetNumSide)
.def("GetNumRZCorner", &G4Polyhedra::GetNumRZCorner)
.def("IsOpen", &G4Polyhedra::IsOpen)
.def("IsGeneric", &G4Polyhedra::IsGeneric)
// operators
.def(self_ns::str(self))
;
// Create solid
def("CreatePolyhedra", f1_CreatePolyhedra,
return_value_policy<manage_new_object>());
def("CreatePolyhedra", f2_CreatePolyhedra,
return_value_policy<manage_new_object>());
}
@@ -24,7 +24,7 @@
// ********************************************************************
//
// $Id: pyG4Region.cc,v 1.4 2006/06/29 15:32:25 gunter Exp $
// $Name: geant4-09-00 $
// $Name: geant4-09-01 $
// ====================================================================
// pyG4Region.cc
//
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: pyG4Sphere.cc,v 1.4 2006/06/29 15:32:27 gunter Exp $
// $Name: geant4-09-00 $
// $Id: pyG4Sphere.cc,v 1.5 2007/07/13 04:57:50 kmura Exp $
// $Name: geant4-09-01 $
// ====================================================================
// pyG4Sphere.cc
//
@@ -35,6 +35,23 @@
using namespace boost::python;
// ====================================================================
// wrappers
// ====================================================================
namespace pyG4Sphere {
G4Sphere* CreateSphere(const G4String& name,
G4double pRmin, G4double pRmax,
G4double pSPhi, G4double pDPhi,
G4double pSTheta, G4double pDTheta)
{
return new G4Sphere(name, pRmin, pRmax, pSPhi, pDPhi, pSTheta, pDTheta);
}
}
using namespace pyG4Sphere;
// ====================================================================
// module definition
// ====================================================================
@@ -58,8 +75,11 @@ void export_G4Sphere()
.def("SetDeltaPhiAngle", &G4Sphere::SetDeltaPhiAngle)
.def("SetStartThetaAngle", &G4Sphere::SetStartThetaAngle)
.def("SetDeltaThetaAngle", &G4Sphere::SetDeltaThetaAngle)
.def("GetCubicVolume", &G4Sphere::GetCubicVolume)
// operators
.def(self_ns::str(self))
;
// Create solid
def("CreateSphere", CreateSphere, return_value_policy<manage_new_object>());
}
@@ -0,0 +1,55 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: pyG4SubtractionSolid.cc,v 1.1 2007/08/07 03:35:53 kmura Exp $
// $Name: geant4-09-01 $
// ====================================================================
// pyG4SubtractionSolid.cc
//
// 2007 Q
// ====================================================================
#include <boost/python.hpp>
#include "G4SubtractionSolid.hh"
using namespace boost::python;
// ====================================================================
// module definition
// ====================================================================
void export_G4SubtractionSolid()
{
class_<G4SubtractionSolid, G4SubtractionSolid*,
bases<G4BooleanSolid>,boost::noncopyable>
("G4SubtractionSolid", "subtraction solid class", no_init)
// ---
.def(init<const G4String&, G4VSolid*, G4VSolid*>())
.def(init<const G4String&, G4VSolid*, G4VSolid*,
G4RotationMatrix*, const G4ThreeVector&>())
.def(init<const G4String&, G4VSolid*, G4VSolid*,
const G4Transform3D&>())
;
}
@@ -0,0 +1,70 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: pyG4Tet.cc,v 1.2 2007/07/13 04:57:50 kmura Exp $
// $Name: geant4-09-01 $
// ====================================================================
// pyG4Tet.cc
//
// 2007 Q
// ====================================================================
#include <boost/python.hpp>
#include "G4Tet.hh"
using namespace boost::python;
// ====================================================================
// wrappers
// ====================================================================
namespace pyG4Tet {
G4Tet* CreateTet(const G4String& name, G4ThreeVector anchor, G4ThreeVector p2,
G4ThreeVector p3, G4ThreeVector p4)
{
return new G4Tet(name, anchor, p2, p3, p4);
}
}
using namespace pyG4Tet;
// ====================================================================
// module definition
// ====================================================================
void export_G4Tet()
{
class_<G4Tet, G4Tet*, bases<G4VSolid> >
("G4Tet", "tetrahedra solid class", no_init)
// constructors
.def(init<const G4String&, G4ThreeVector, G4ThreeVector, G4ThreeVector,
G4ThreeVector>())
// operators
.def(self_ns::str(self))
;
// Create solid
def("CreateTet", CreateTet, return_value_policy<manage_new_object>());
}
+20 -3
View File
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: pyG4Torus.cc,v 1.4 2006/06/29 15:32:30 gunter Exp $
// $Name: geant4-09-00 $
// $Id: pyG4Torus.cc,v 1.5 2007/07/13 04:57:50 kmura Exp $
// $Name: geant4-09-01 $
// ====================================================================
// pyG4Torus.cc
//
@@ -35,6 +35,21 @@
using namespace boost::python;
// ====================================================================
// wrappers
// ====================================================================
namespace pyG4Torus {
G4Torus* CreateTorus(const G4String& name, G4double pRmin, G4double pRmax,
G4double pRtor, G4double pSPhi, G4double pDPhi)
{
return new G4Torus(name, pRmin, pRmax, pRtor, pSPhi, pDPhi);
}
}
using namespace pyG4Torus;
// ====================================================================
// module definition
// ====================================================================
@@ -51,8 +66,10 @@ void export_G4Torus()
.def("GetRtor", &G4Torus::GetRtor)
.def("GetSPhi", &G4Torus::GetSPhi)
.def("GetDPhi", &G4Torus::GetDPhi)
.def("GetCubicVolume", &G4Torus::GetCubicVolume)
// operators
.def(self_ns::str(self))
;
// Create solid
def("CreateTorus", CreateTorus, return_value_policy<manage_new_object>());
}
@@ -24,7 +24,7 @@
// ********************************************************************
//
// $Id: pyG4TouchableHistory.cc,v 1.4 2006/06/29 15:32:33 gunter Exp $
// $Name: geant4-09-00 $
// $Name: geant4-09-01 $
// ====================================================================
// pyG4VTouchable.cc
//
@@ -24,7 +24,7 @@
// ********************************************************************
//
// $Id: pyG4TransportationManager.cc,v 1.4 2006/06/29 15:32:36 gunter Exp $
// $Name: geant4-09-00 $
// $Name: geant4-09-01 $
// ====================================================================
// pyG4TransportationManager.cc
//
+74 -3
View File
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: pyG4Trap.cc,v 1.4 2006/06/29 15:32:39 gunter Exp $
// $Name: geant4-09-00 $
// $Id: pyG4Trap.cc,v 1.6 2007/07/13 04:57:50 kmura Exp $
// $Name: geant4-09-01 $
// ====================================================================
// pyG4Trap.cc
//
@@ -35,6 +35,68 @@
using namespace boost::python;
// ====================================================================
// wrappers
// ====================================================================
namespace pyG4Trap {
G4Trap* f1_CreateTrap(const G4String& name)
{
return new G4Trap(name);
}
G4Trap* f2_CreateTrap(const G4String& name, G4double pDz,
G4double pTheta, G4double pPhi,
G4double pDy1, G4double pDx1, G4double pDx2,
G4double pAlp1,
G4double pDy2, G4double pDx3, G4double pDx4,
G4double pAlp2)
{
return new G4Trap(name, pDz, pTheta, pPhi,
pDy1, pDx1, pDx2, pAlp1,
pDy2, pDx3, pDx4, pAlp2);
}
G4Trap* f3_CreateTrap(const G4String& name,
const std::vector<G4ThreeVector>& pt)
{
G4ThreeVector ptlist[8];
for (G4int i=0; i<8; i++) {
ptlist[i]= pt[i];
}
return new G4Trap(name, ptlist);
}
G4Trap* f4_CreateTrap(const G4String& name, G4double pZ,
G4double pY, G4double pX, G4double pLTX)
{
return new G4Trap(name, pZ, pY, pX, pLTX);
}
G4Trap* f5_CreateTrap(const G4String& name, G4double pDx1, G4double pDx2,
G4double pDy1, G4double pDy2, G4double pDz)
{
return new G4Trap(name, pDx1, pDx2, pDy1, pDy2, pDz);
}
G4Trap* f6_CreateTrap(const G4String& name, G4double pDx, G4double pDy,
G4double pDz,
G4double pAlpha, G4double pTheta, G4double pPhi )
{
return new G4Trap(name, pDx, pDy, pDz, pAlpha, pTheta, pPhi);
}
}
using namespace pyG4Trap;
// ====================================================================
// module definition
// ====================================================================
@@ -65,8 +127,17 @@ void export_G4Trap()
.def("GetSidePlane", &G4Trap::GetSidePlane)
.def("GetSymAxis", &G4Trap::GetSymAxis)
.def("SetAllParameters", &G4Trap::SetAllParameters)
.def("GetCubicVolume", &G4Trap::GetCubicVolume)
// operators
.def(self_ns::str(self))
;
// Create solid
def("CreateTrap", f1_CreateTrap, return_value_policy<manage_new_object>());
def("CreateTrap", f2_CreateTrap, return_value_policy<manage_new_object>());
def("CreateTrap", f3_CreateTrap, return_value_policy<manage_new_object>());
def("CreateTrap", f4_CreateTrap, return_value_policy<manage_new_object>());
def("CreateTrap", f5_CreateTrap, return_value_policy<manage_new_object>());
def("CreateTrap", f6_CreateTrap, return_value_policy<manage_new_object>());
}
+21 -3
View File
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: pyG4Trd.cc,v 1.4 2006/06/29 15:32:42 gunter Exp $
// $Name: geant4-09-00 $
// $Id: pyG4Trd.cc,v 1.5 2007/07/12 10:01:53 kmura Exp $
// $Name: geant4-09-01 $
// ====================================================================
// pyG4Trd.cc
//
@@ -35,6 +35,21 @@
using namespace boost::python;
// ====================================================================
// wrappers
// ====================================================================
namespace pyG4Trd {
G4Trd* CreateTrd(const G4String& name, G4double pdx1, G4double pdx2,
G4double pdy1, G4double pdy2, G4double pdz )
{
return new G4Trd(name, pdx1, pdx2, pdy1, pdy2, pdz);
}
}
using namespace pyG4Trd;
// ====================================================================
// module definition
// ====================================================================
@@ -56,9 +71,12 @@ void export_G4Trd()
.def("SetYHalfLength1", &G4Trd::SetYHalfLength1)
.def("SetYHalfLength2", &G4Trd::SetYHalfLength2)
.def("SetZHalfLength", &G4Trd::SetZHalfLength)
.def("GetCubicVolume", &G4Trd::GetCubicVolume)
// operators
.def(self_ns::str(self))
;
// Create solid
def("CreateTrd", CreateTrd, return_value_policy<manage_new_object>());
}
+21 -3
View File
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: pyG4Tubs.cc,v 1.4 2006/06/29 15:32:45 gunter Exp $
// $Name: geant4-09-00 $
// $Id: pyG4Tubs.cc,v 1.5 2007/07/12 10:01:53 kmura Exp $
// $Name: geant4-09-01 $
// ====================================================================
// pyG4Tubs.cc
//
@@ -35,6 +35,21 @@
using namespace boost::python;
// ====================================================================
// wrappers
// ====================================================================
namespace pyG4Tubs {
G4Tubs* CreateTubs(const G4String& name, G4double pRMin, G4double pRMax,
G4double pDz, G4double pSPhi, G4double pDPhi )
{
return new G4Tubs(name, pRMin, pRMax, pDz, pSPhi, pDPhi);
}
}
using namespace pyG4Tubs;
// ====================================================================
// module definition
// ====================================================================
@@ -61,9 +76,12 @@ void export_G4Tubs()
.def("GetDz", &G4Tubs::GetDz)
.def("GetSPhi", &G4Tubs::GetSPhi)
.def("GetDPhi", &G4Tubs::GetDPhi)
.def("GetCubicVolume", &G4Tubs::GetCubicVolume)
// operators
.def(self_ns::str(self))
;
// Create solid
def("CreateTubs", CreateTubs, return_value_policy<manage_new_object>());
}
@@ -0,0 +1,79 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: pyG4TwistedBox.cc,v 1.2 2007/07/13 04:57:50 kmura Exp $
// $Name: geant4-09-01 $
// ====================================================================
// pyG4TwistedBox.cc
//
// 2007 Q
// ====================================================================
#include <boost/python.hpp>
#include "G4TwistedBox.hh"
using namespace boost::python;
// ====================================================================
// wrappers
// ====================================================================
namespace pyG4TwistedBox {
G4TwistedBox* CreateTwistedBox(const G4String& name,
G4double pPhiTwist,
G4double pDx, G4double pDy, G4double pDz)
{
return new G4TwistedBox(name, pPhiTwist, pDx, pDy, pDz );
}
}
using namespace pyG4TwistedBox;
// ====================================================================
// module definition
// ====================================================================
void export_G4TwistedBox()
{
class_<G4TwistedBox, G4TwistedBox*, bases<G4VSolid> >
("G4TwistedBox", "twisted box solid class", no_init)
// constructors
.def(init<const G4String&, G4double, G4double, G4double, G4double>())
// ---
.def("GetXHalfLength", &G4TwistedBox::GetXHalfLength)
.def("GetYHalfLength", &G4TwistedBox::GetYHalfLength)
.def("GetZHalfLength", &G4TwistedBox::GetZHalfLength)
.def("GetPhiTwist", &G4TwistedBox::GetPhiTwist)
// operators
.def(self_ns::str(self))
;
// Create solid
def("CreateTwistedBox", CreateTwistedBox,
return_value_policy<manage_new_object>());
}
@@ -0,0 +1,93 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: pyG4TwistedTrap.cc,v 1.2 2007/07/13 04:57:50 kmura Exp $
// $Name: geant4-09-01 $
// ====================================================================
// pyG4TwistedTrap.cc
//
// 2007 Q
// ====================================================================
#include <boost/python.hpp>
#include "G4TwistedTrap.hh"
using namespace boost::python;
// ====================================================================
// wrappers
// ====================================================================
namespace pyG4TwistedTrap {
G4TwistedTrap* f1_CreateTwistedTrap(const G4String& name,
G4double pPhiTwist,
G4double pDx1, G4double pDx2,
G4double pDy, G4double pDz)
{
return new G4TwistedTrap(name, pPhiTwist, pDx1, pDx2, pDy, pDz);
}
G4TwistedTrap* f2_CreateTwistedTrap(const G4String& name,
G4double pPhiTwist,
G4double pDz, G4double pTheta,
G4double pPhi, G4double pDy1,
G4double pDx1, G4double pDx2,
G4double pDy2, G4double pDx3,
G4double pDx4, G4double pAlph)
{
return new G4TwistedTrap(name, pPhiTwist, pDz, pTheta, pPhi,
pDy1, pDx1, pDx2, pDy2, pDx3, pDx4, pAlph);
}
}
using namespace pyG4TwistedTrap;
// ====================================================================
// module definition
// ====================================================================
void export_G4TwistedTrap()
{
class_<G4TwistedTrap, G4TwistedTrap*, bases<G4VSolid> >
("G4TwistedTrap", "twisted trapezoid solid class", no_init)
// constructors
.def(init<const G4String&, G4double, G4double, G4double,
G4double, G4double>())
.def(init<const G4String&, G4double, G4double, G4double,
G4double, G4double, G4double,
G4double, G4double, G4double,
G4double, G4double>())
// operators
.def(self_ns::str(self))
;
// Create solid
def("CreateTwistedTap", f1_CreateTwistedTrap,
return_value_policy<manage_new_object>());
def("CreateTwistedTap", f2_CreateTwistedTrap,
return_value_policy<manage_new_object>());
}
@@ -0,0 +1,81 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: pyG4TwistedTrd.cc,v 1.1 2007/07/13 04:58:29 kmura Exp $
// $Name: geant4-09-01 $
// ====================================================================
// pyG4TwistedTrap.cc
//
// 2007 Q
// ====================================================================
#include <boost/python.hpp>
#include "G4TwistedTrd.hh"
using namespace boost::python;
// ====================================================================
// wrappers
// ====================================================================
namespace pyG4TwistedTrd {
G4TwistedTrd* CreateTwistedTrd(const G4String& name,
G4double pDx1, G4double pDx2,
G4double pDy1, G4double pDy2,
G4double pDz, G4double pPhiTwist)
{
return new G4TwistedTrd(name, pDx1, pDx2, pDy1, pDy2, pDz, pPhiTwist);
}
}
using namespace pyG4TwistedTrd;
// ====================================================================
// module definition
// ====================================================================
void export_G4TwistedTrd()
{
class_<G4TwistedTrd, G4TwistedTrd*, bases<G4VSolid> >
("G4TwistedTrd", "twisted trapezoid solid class", no_init)
// constructors
.def(init<const G4String&, G4double, G4double, G4double,
G4double, G4double, G4double>())
// ---
.def("GetX1HalfLength", &G4TwistedTrd::GetX1HalfLength)
.def("GetX2HalfLength", &G4TwistedTrd::GetX2HalfLength)
.def("GetY1HalfLength", &G4TwistedTrd::GetY1HalfLength)
.def("GetY2HalfLength", &G4TwistedTrd::GetY2HalfLength)
.def("GetZHalfLength", &G4TwistedTrd::GetZHalfLength)
.def("GetPhiTwist", &G4TwistedTrd::GetPhiTwist)
// operators
.def(self_ns::str(self))
;
// Create solid
def("CreateTwistedTrd", CreateTwistedTrd,
return_value_policy<manage_new_object>());
}
@@ -0,0 +1,161 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: pyG4TwistedTubs.cc,v 1.2 2007/07/13 04:57:51 kmura Exp $
// $Name: geant4-09-01 $
// ====================================================================
// pyG4TwistedTubs.cc
//
// 2007 Q
// ====================================================================
#include <boost/python.hpp>
#include "G4TwistedTubs.hh"
using namespace boost::python;
// ====================================================================
// thin wrappers
// ====================================================================
namespace pyG4TwistedTubs {
// GetEndInnerRadius
G4double (G4TwistedTubs::*f1_GetEndInnerRadius)(G4int) const
= &G4TwistedTubs::GetEndInnerRadius;
G4double (G4TwistedTubs::*f2_GetEndInnerRadius)(G4int) const
= &G4TwistedTubs::GetEndInnerRadius;
// GetOuterRadius
G4double (G4TwistedTubs::*f1_GetEndOuterRadius)(G4int) const
= &G4TwistedTubs::GetEndOuterRadius;
G4double (G4TwistedTubs::*f2_GetEndOuterRadius)() const
= &G4TwistedTubs::GetEndOuterRadius;
// Create Solid
G4TwistedTubs* f1_CreateTwistedTubs(const G4String& name,
G4double twistedangle,
G4double endinnerrad,
G4double endouterrad,
G4double halfzlen,
G4double dphi)
{
return new G4TwistedTubs(name, twistedangle, endinnerrad,
endouterrad, halfzlen, dphi);
}
G4TwistedTubs* f2_CreateTwistedTubs(const G4String& name,
G4double twistedangle,
G4double endinnerrad,
G4double endouterrad,
G4double halfzlen,
G4int nseg,
G4double totphi)
{
return new G4TwistedTubs(name, twistedangle, endinnerrad,
endouterrad, halfzlen, nseg, totphi);
}
G4TwistedTubs* f3_CreateTwistedTubs(const G4String& name,
G4double twistedangle,
G4double innerrad,
G4double outerrad,
G4double negativeEndz,
G4double positiveEndz,
G4double dphi)
{
return new G4TwistedTubs(name, twistedangle, innerrad, outerrad,
negativeEndz, positiveEndz, dphi);
}
G4TwistedTubs* f4_CreateTwistedTubs(const G4String& name,
G4double twistedangle,
G4double innerrad,
G4double outerrad,
G4double negativeEndz,
G4double positiveEndz,
G4int nseg,
G4double totphi)
{
return new G4TwistedTubs(name, twistedangle, innerrad, outerrad,
negativeEndz, positiveEndz, nseg, totphi);
}
}
using namespace pyG4TwistedTubs;
// ====================================================================
// module definition
// ====================================================================
void export_G4TwistedTubs()
{
class_<G4TwistedTubs, G4TwistedTubs*, bases<G4VSolid> >
("G4TwistedTubs", "twisted tube solid class", no_init)
// constructors
.def(init<const G4String&, G4double, G4double, G4double,
G4double, G4double>())
.def(init<const G4String&, G4double, G4double, G4double,
G4double, G4int, G4double>())
.def(init<const G4String&, G4double, G4double, G4double,
G4double, G4double, G4double>())
.def(init<const G4String&, G4double, G4double, G4double,
G4double, G4double, G4int, G4double>())
// ---
.def("GetDPhi", &G4TwistedTubs::GetDPhi)
.def("GetPhiTwist", &G4TwistedTubs::GetPhiTwist)
.def("GetInnerRadius", &G4TwistedTubs::GetInnerRadius)
.def("GetOuterRadius", &G4TwistedTubs::GetOuterRadius)
.def("GetInnerStereo", &G4TwistedTubs::GetInnerStereo)
.def("GetOuterStereo", &G4TwistedTubs::GetOuterStereo)
.def("GetZHalfLength", &G4TwistedTubs::GetZHalfLength)
.def("GetKappa", &G4TwistedTubs::GetKappa)
.def("GetTanInnerStereo", &G4TwistedTubs::GetTanInnerStereo)
.def("GetTanInnerStereo2", &G4TwistedTubs::GetTanInnerStereo2)
.def("GetTanOuterStereo", &G4TwistedTubs::GetTanOuterStereo)
.def("GetTanOuterStereo2", &G4TwistedTubs::GetTanOuterStereo2)
.def("GetEndZ", &G4TwistedTubs::GetEndZ)
.def("GetEndPhi", &G4TwistedTubs::GetEndPhi)
.def("GetEndInnerRadius", f1_GetEndInnerRadius)
.def("GetEndInnerRadius", f2_GetEndInnerRadius)
.def("GetEndOuterRadius", f1_GetEndOuterRadius)
.def("GetEndOuterRadius", f2_GetEndOuterRadius)
// operators
.def(self_ns::str(self))
;
// Create solid
def("CreateTwistedTubs", f1_CreateTwistedTubs,
return_value_policy<manage_new_object>());
def("CreateTwistedTubs", f2_CreateTwistedTubs,
return_value_policy<manage_new_object>());
def("CreateTwistedTubs", f3_CreateTwistedTubs,
return_value_policy<manage_new_object>());
def("CreateTwistedTubs", f4_CreateTwistedTubs,
return_value_policy<manage_new_object>());
}
@@ -24,7 +24,7 @@
// ********************************************************************
//
// $Id: pyG4UniformMagField.cc,v 1.4 2006/06/29 15:32:48 gunter Exp $
// $Name: geant4-09-00 $
// $Name: geant4-09-01 $
// ====================================================================
// pyG4UniformMagField.cc
//
@@ -0,0 +1,55 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: pyG4UnionSolid.cc,v 1.1 2007/08/07 03:35:53 kmura Exp $
// $Name: geant4-09-01 $
// ====================================================================
// pyG4UnionSolid.cc
//
// 2007 Q
// ====================================================================
#include <boost/python.hpp>
#include "G4UnionSolid.hh"
using namespace boost::python;
// ====================================================================
// module definition
// ====================================================================
void export_G4UnionSolid()
{
class_<G4UnionSolid, G4UnionSolid*,
bases<G4BooleanSolid>,boost::noncopyable>
("G4UnionSolid", "union solid class", no_init)
// ---
.def(init<const G4String&, G4VSolid*, G4VSolid*>())
.def(init<const G4String&, G4VSolid*, G4VSolid*,
G4RotationMatrix*, const G4ThreeVector&>())
.def(init<const G4String&, G4VSolid*, G4VSolid*,
const G4Transform3D&>())
;
}
@@ -24,7 +24,7 @@
// ********************************************************************
//
// $Id: pyG4VPhysicalVolume.cc,v 1.6 2006/11/21 06:03:22 kmura Exp $
// $Name: geant4-09-00 $
// $Name: geant4-09-01 $
// ====================================================================
// pyG4VPhysicalVolume.cc
//
@@ -23,14 +23,15 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: pyG4VSolid.cc,v 1.4 2006/06/29 15:32:54 gunter Exp $
// $Name: geant4-09-00 $
// $Id: pyG4VSolid.cc,v 1.5 2007/07/11 15:21:24 kmura Exp $
// $Name: geant4-09-01 $
// ====================================================================
// pyG4VSolid.cc
//
// 2005 Q
// ====================================================================
#include <boost/python.hpp>
#include "pyG4Version.hh"
#include "G4VSolid.hh"
using namespace boost::python;
@@ -43,9 +44,17 @@ void export_G4VSolid()
class_<G4VSolid, G4VSolid*, boost::noncopyable>
("G4VSolid", "solid class", no_init)
// ---
.def("GetName", &G4VSolid::GetName)
.def("SetName", &G4VSolid::SetName)
.def("DumpInfo", &G4VSolid::DumpInfo)
.def("GetName", &G4VSolid::GetName)
.def("SetName", &G4VSolid::SetName)
.def("DumpInfo", &G4VSolid::DumpInfo)
.def("GetCubicVolume", &G4VSolid::GetCubicVolume)
#if G4VERSION_NUMBER >=820
.def("GetSurfaceArea", &G4VSolid::GetSurfaceArea)
#endif
#if G4VERSION_NUMBER >=800
.def("GetPointOnSurface", &G4VSolid::GetPointOnSurface)
#endif
// operators
.def(self == self)
;
@@ -24,7 +24,7 @@
// ********************************************************************
//
// $Id: pyG4VTouchable.cc,v 1.4 2006/06/29 15:32:57 gunter Exp $
// $Name: geant4-09-00 $
// $Name: geant4-09-01 $
// ====================================================================
// pyG4VTouchable.cc
//
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: pymodG4geometry.cc,v 1.4 2006/06/29 15:33:00 gunter Exp $
// $Name: geant4-09-00 $
// $Id: pymodG4geometry.cc,v 1.9 2007/11/13 08:05:27 kmura Exp $
// $Name: geant4-09-01 $
// ====================================================================
// pymodG4geometry.cc [Geant4Py module]
//
@@ -54,7 +54,23 @@ void export_G4Orb();
void export_G4Sphere();
void export_G4Trap();
void export_G4Tubs();
void export_G4Polycone();
void export_G4Polyhedra();
void export_G4EllipticalTube();
void export_G4Ellipsoid();
void export_G4EllipticalCone();
void export_G4Hype();
void export_G4Tet();
void export_G4TwistedBox();
void export_G4TwistedTrap();
void export_G4TwistedTrd();
void export_G4TwistedTubs();
void export_G4BooleanSolid();
void export_G4UnionSolid();
void export_G4IntersectionSolid();
void export_G4SubtractionSolid();
void export_G4TransportationManager();
void export_G4Navigator();
void export_G4FieldManager();
void export_G4Field();
void export_G4MagneticField();
@@ -80,7 +96,23 @@ BOOST_PYTHON_MODULE(G4geometry)
export_G4Sphere();
export_G4Trap();
export_G4Tubs();
export_G4Polycone();
export_G4Polyhedra();
export_G4EllipticalTube();
export_G4Ellipsoid();
export_G4EllipticalCone();
export_G4Hype();
export_G4Tet();
export_G4TwistedBox();
export_G4TwistedTrap();
export_G4TwistedTrd();
export_G4TwistedTubs();
export_G4BooleanSolid();
export_G4UnionSolid();
export_G4IntersectionSolid();
export_G4SubtractionSolid();
export_G4TransportationManager();
export_G4Navigator();
export_G4FieldManager();
export_G4Field();
export_G4MagneticField();