Import Geant4 9.1.0 source tree
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
# $Id: GNUmakefile,v 1.4 2006/11/20 08:56:26 kmura Exp $
|
||||
# $Name: geant4-09-00 $
|
||||
# $Id: GNUmakefile,v 1.6 2007/11/25 19:38:17 kmura Exp $
|
||||
# $Name: geant4-09-01 $
|
||||
# ===========================================================
|
||||
# Makefile for building Geant4Py modules
|
||||
# ===========================================================
|
||||
@@ -11,6 +11,14 @@ SUBDIR2 := visualization graphics_reps physics_lists
|
||||
SUBDIR3 := python
|
||||
SUBDIR4 := boost version
|
||||
|
||||
ifeq ($(Q_ENABLE_G4GDML), 1)
|
||||
SUBDIR2 += g4gdml
|
||||
endif
|
||||
|
||||
ifeq ($(Q_ENABLE_GDML), 1)
|
||||
SUBDIR2 += gdml
|
||||
endif
|
||||
|
||||
.PHONY: all install clean uninstall
|
||||
|
||||
all:
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# $Id: GNUmakefile,v 1.2 2006/04/25 08:09:43 kmura Exp $
|
||||
# $Name: geant4-09-00 $
|
||||
# $Name: geant4-09-01 $
|
||||
# ===========================================================
|
||||
# Makefile for building Geant4Py modules
|
||||
# ===========================================================
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: pyG4indexing.hh,v 1.4 2006/06/29 15:30:24 gunter Exp $
|
||||
// $Name: geant4-09-00 $
|
||||
// $Name: geant4-09-01 $
|
||||
// ====================================================================
|
||||
// pyG4indexing.hh
|
||||
//
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# $Id: GNUmakefile,v 1.2 2006/04/25 08:09:43 kmura Exp $
|
||||
# $Name: geant4-09-00 $
|
||||
# $Name: geant4-09-01 $
|
||||
# ===========================================================
|
||||
# Makefile for building Geant4Py modules
|
||||
# ===========================================================
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: pyG4VSensitiveDetector.cc,v 1.4 2006/06/29 15:30:26 gunter Exp $
|
||||
// $Name: geant4-09-00 $
|
||||
// $Name: geant4-09-01 $
|
||||
// ====================================================================
|
||||
// pyG4VSensitiveDetector.cc
|
||||
//
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: pymodG4digits_hits.cc,v 1.4 2006/06/29 15:30:29 gunter Exp $
|
||||
// $Name: geant4-09-00 $
|
||||
// $Name: geant4-09-01 $
|
||||
// ====================================================================
|
||||
// pymodG4digits_hits.cc [Geant4Py module]
|
||||
//
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# $Id: GNUmakefile,v 1.2 2006/04/25 08:09:44 kmura Exp $
|
||||
# $Name: geant4-09-00 $
|
||||
# $Name: geant4-09-01 $
|
||||
# ===========================================================
|
||||
# Makefile for building Geant4Py modules
|
||||
# ===========================================================
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: pyG4ClassificationOfNewTrack.cc,v 1.4 2006/06/29 15:30:44 gunter Exp $
|
||||
// $Name: geant4-09-00 $
|
||||
// $Name: geant4-09-01 $
|
||||
// ====================================================================
|
||||
// pyG4ClassificationOfNewTrack.cc
|
||||
//
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: pyG4Event.cc,v 1.4 2006/06/29 15:31:29 gunter Exp $
|
||||
// $Name: geant4-09-00 $
|
||||
// $Name: geant4-09-01 $
|
||||
// ====================================================================
|
||||
// pyG4Event.cc
|
||||
//
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: pyG4EventManager.cc,v 1.4 2006/06/29 15:31:34 gunter Exp $
|
||||
// $Name: geant4-09-00 $
|
||||
// $Name: geant4-09-01 $
|
||||
// ====================================================================
|
||||
// pyG4EventManager.cc
|
||||
//
|
||||
|
||||
@@ -23,20 +23,22 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: pyG4ParticleGun.cc,v 1.4 2006/06/29 15:31:36 gunter Exp $
|
||||
// $Name: geant4-09-00 $
|
||||
// $Id: pyG4ParticleGun.cc,v 1.7 2007/11/08 06:42:03 kmura Exp $
|
||||
// $Name: geant4-09-01 $
|
||||
// ====================================================================
|
||||
// pyG4ParticleGun.cc
|
||||
//
|
||||
// 2005 Q
|
||||
// ====================================================================
|
||||
#include <boost/python.hpp>
|
||||
#include "G4Version.hh"
|
||||
#include "G4ParticleGun.hh"
|
||||
#include "G4ParticleTable.hh"
|
||||
#include "G4Event.hh"
|
||||
|
||||
using namespace boost::python;
|
||||
|
||||
#if G4VERSION_NUMBER < 910
|
||||
// ====================================================================
|
||||
// miscs
|
||||
// ====================================================================
|
||||
@@ -77,11 +79,23 @@ G4int G4ParticleGun::operator!=(const G4ParticleGun &right) const
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
// ====================================================================
|
||||
// thin wrappers
|
||||
// ====================================================================
|
||||
namespace pyG4ParticleGun {
|
||||
|
||||
#if G4VERSION_NUMBER >= 910
|
||||
// SetParticleMomentum
|
||||
void (G4ParticleGun::*f1_SetParticleMomentum)(G4double)
|
||||
= &G4ParticleGun::SetParticleMomentum;
|
||||
void (G4ParticleGun::*f2_SetParticleMomentum)(G4ParticleMomentum)
|
||||
= &G4ParticleGun::SetParticleMomentum;
|
||||
#endif
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
void SetParticleByName(G4ParticleGun* gun, const std::string& pname)
|
||||
////////////////////////////////////////////////////////////////////
|
||||
@@ -113,7 +127,11 @@ using namespace pyG4ParticleGun;
|
||||
// ====================================================================
|
||||
void export_G4ParticleGun()
|
||||
{
|
||||
#if G4VERSION_NUMBER < 910
|
||||
class_<G4ParticleGun>
|
||||
#else
|
||||
class_<G4ParticleGun, boost::noncopyable>
|
||||
#endif
|
||||
("G4ParticleGun", "particle gun")
|
||||
// constructor
|
||||
.def(init<G4int>())
|
||||
@@ -124,7 +142,12 @@ void export_G4ParticleGun()
|
||||
.def("SetParticleDefinition", &G4ParticleGun::SetParticleDefinition)
|
||||
.def("GetParticleDefinition", &G4ParticleGun::GetParticleDefinition,
|
||||
return_value_policy<reference_existing_object>())
|
||||
#if G4VERSION_NUMBER >= 910
|
||||
.def("SetParticleMomentum", f1_SetParticleMomentum)
|
||||
.def("SetParticleMomentum", f2_SetParticleMomentum)
|
||||
#else
|
||||
.def("SetParticleMomentum", &G4ParticleGun::SetParticleMomentum)
|
||||
#endif
|
||||
.def("SetParticleMomentumDirection",
|
||||
&G4ParticleGun::SetParticleMomentumDirection)
|
||||
.def("GetParticleMomentumDirection",
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
|
||||
// $Id: pyG4StackManager.cc,v 1.4 2006/06/29 15:31:38 gunter Exp $
|
||||
// $Name: geant4-09-00 $
|
||||
// $Name: geant4-09-01 $
|
||||
// ====================================================================
|
||||
// pyG4StackManager.cc
|
||||
//
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: pyG4UserEventAction.cc,v 1.6 2006/06/29 15:31:41 gunter Exp $
|
||||
// $Name: geant4-09-00 $
|
||||
// $Name: geant4-09-01 $
|
||||
// ====================================================================
|
||||
// pyG4UserEventAction.cc
|
||||
//
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: pyG4UserStackingAction.cc,v 1.7 2006/06/29 15:31:44 gunter Exp $
|
||||
// $Name: geant4-09-00 $
|
||||
// $Name: geant4-09-01 $
|
||||
// ====================================================================
|
||||
// pyG4UserStackingAction.cc
|
||||
//
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: pymodG4event.cc,v 1.4 2006/06/29 15:31:47 gunter Exp $
|
||||
// $Name: geant4-09-00 $
|
||||
// $Name: geant4-09-01 $
|
||||
// ====================================================================
|
||||
// pymodG4event.cc [Geant4Py module]
|
||||
//
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
# $Id: GNUmakefile,v 1.1 2007/11/25 19:39:37 kmura Exp $
|
||||
# $Name: geant4-09-01 $
|
||||
# ===========================================================
|
||||
# Makefile for building Geant4Py modules
|
||||
# ===========================================================
|
||||
include ../../config/config.gmk
|
||||
|
||||
# python module name
|
||||
MODULE := G4g4gdml#
|
||||
|
||||
include $(G4PY_INSTALL)/config/g4py.gmk
|
||||
include $(G4PY_INSTALL)/config/module.gmk
|
||||
include $(G4PY_INSTALL)/config/install.gmk
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: pyG4GDMLParser.cc,v 1.1 2007/11/25 19:39:47 kmura Exp $
|
||||
// $Name: geant4-09-01 $
|
||||
// ====================================================================
|
||||
// pyG4GDMLParser.cc
|
||||
//
|
||||
// 2007 Q
|
||||
// ====================================================================
|
||||
#include <boost/python.hpp>
|
||||
#include "G4GDMLParser.hh"
|
||||
|
||||
using namespace boost::python;
|
||||
|
||||
// ====================================================================
|
||||
// thin wrappers
|
||||
// ====================================================================
|
||||
namespace pyG4GDMLParser {
|
||||
|
||||
// GetWorldVolume
|
||||
BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(f_GetWorldVolume,
|
||||
GetWorldVolume, 0, 1);
|
||||
}
|
||||
|
||||
using namespace pyG4GDMLParser;
|
||||
|
||||
// ====================================================================
|
||||
// module definition
|
||||
// ====================================================================
|
||||
void export_G4GDMLParser()
|
||||
{
|
||||
class_<G4GDMLParser>("G4GDMLParser", "GDML parser")
|
||||
// ---
|
||||
.def("Read", &G4GDMLParser::Read)
|
||||
.def("GetWorldVolume", &G4GDMLParser::GetWorldVolume,
|
||||
f_GetWorldVolume()
|
||||
[return_value_policy<reference_existing_object>()])
|
||||
;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: pymodG4g4gdml.cc,v 1.1 2007/11/25 19:39:47 kmura Exp $
|
||||
// $Name: geant4-09-01 $
|
||||
// ====================================================================
|
||||
// pymodG4g4gdml.cc [Geant4Py module]
|
||||
//
|
||||
// 2007 Q
|
||||
// ====================================================================
|
||||
#include <boost/python.hpp>
|
||||
|
||||
using namespace boost::python;
|
||||
|
||||
// ====================================================================
|
||||
// module definition
|
||||
// ====================================================================
|
||||
|
||||
void export_G4GDMLParser();
|
||||
|
||||
BOOST_PYTHON_MODULE(G4g4gdml)
|
||||
{
|
||||
export_G4GDMLParser();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
# $Id: GNUmakefile,v 1.1 2007/11/13 10:03:33 kmura Exp $
|
||||
# $Name: geant4-09-01 $
|
||||
# ===========================================================
|
||||
# Makefile for building Geant4Py modules
|
||||
# ===========================================================
|
||||
include ../../config/config.gmk
|
||||
|
||||
# python module name
|
||||
MODULE := G4gdml#
|
||||
|
||||
include $(G4PY_INSTALL)/config/g4py.gmk
|
||||
include $(G4PY_INSTALL)/config/module.gmk
|
||||
include $(G4PY_INSTALL)/config/install.gmk
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: pyG4GDMLWriter.cc,v 1.1 2007/11/13 10:03:23 kmura Exp $
|
||||
// $Name: geant4-09-01 $
|
||||
// ====================================================================
|
||||
// pyG4GDMLWriter.cc
|
||||
//
|
||||
// based on 2.10.0
|
||||
//
|
||||
// 2007 Q
|
||||
// ====================================================================
|
||||
#include <boost/python.hpp>
|
||||
#include "G4Writer/G4GDMLWriter.h"
|
||||
|
||||
using namespace boost::python;
|
||||
|
||||
// ====================================================================
|
||||
// thin wrappers
|
||||
// ====================================================================
|
||||
namespace pyG4GDMLWriter {
|
||||
|
||||
// DumpGeometryInfo
|
||||
void (G4GDMLWriter::*f1_DumpGeometryInfo)(G4VPhysicalVolume*)
|
||||
= &G4GDMLWriter::DumpGeometryInfo;
|
||||
|
||||
}
|
||||
|
||||
using namespace pyG4GDMLWriter;
|
||||
|
||||
// ====================================================================
|
||||
// module definition
|
||||
// ====================================================================
|
||||
void export_G4GDMLWriter()
|
||||
{
|
||||
class_<G4GDMLWriter>("G4GDMLWriter", "GDML writer class")
|
||||
.def(init<>())
|
||||
.def(init<int>())
|
||||
.def(init<std::string, std::string>())
|
||||
.def(init<std::string, std::string, int>())
|
||||
// ---
|
||||
.def("DumpGeometryInfo", f1_DumpGeometryInfo)
|
||||
;
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: pyGDMLProcessor.cc,v 1.1 2007/11/13 10:03:23 kmura Exp $
|
||||
// $Name: geant4-09-01 $
|
||||
// ====================================================================
|
||||
// pyGDMLProcessor.cc
|
||||
//
|
||||
// based on 2.10.0
|
||||
//
|
||||
// 2007 Q
|
||||
// ====================================================================
|
||||
#include <boost/python.hpp>
|
||||
#include "G4Processor/GDMLProcessor.h"
|
||||
|
||||
using namespace boost::python;
|
||||
|
||||
// ====================================================================
|
||||
// thin wrappers
|
||||
// ====================================================================
|
||||
namespace pyG4GDMLProcessor {
|
||||
|
||||
// GetWorldVolumeOfParsedFile
|
||||
const G4VPhysicalVolume* (GDMLProcessor::*f1_GetWorldVolumeOfParsedFile)
|
||||
(const std::string&)= &GDMLProcessor::GetWorldVolumeOfParsedFile;
|
||||
|
||||
const G4VPhysicalVolume* (GDMLProcessor::*f2_GetWorldVolumeOfParsedFile)
|
||||
(const char*)= &GDMLProcessor::GetWorldVolumeOfParsedFile;
|
||||
|
||||
// GetWorldVolume
|
||||
const G4VPhysicalVolume* (GDMLProcessor::*f1_GetWorldVolume)()
|
||||
= &GDMLProcessor::GetWorldVolume;
|
||||
|
||||
G4VPhysicalVolume* (GDMLProcessor::*f2_GetWorldVolume)(int)
|
||||
= &GDMLProcessor::GetWorldVolume;
|
||||
|
||||
}
|
||||
|
||||
using namespace pyG4GDMLProcessor;
|
||||
|
||||
// ====================================================================
|
||||
// module definition
|
||||
// ====================================================================
|
||||
void export_GDMLProcessor()
|
||||
{
|
||||
class_<GDMLProcessor, boost::noncopyable>
|
||||
("GDMLProcessor", "GDML processor", no_init)
|
||||
// ---
|
||||
.def("GetInstance", &GDMLProcessor::GetInstance,
|
||||
return_value_policy<reference_existing_object>())
|
||||
.staticmethod("GetInstance")
|
||||
// ---
|
||||
.def("GetWorldVolumeOfParsedFile", f1_GetWorldVolumeOfParsedFile,
|
||||
return_value_policy<reference_existing_object>())
|
||||
.def("GetWorldVolumeOfParsedFile", f2_GetWorldVolumeOfParsedFile,
|
||||
return_value_policy<reference_existing_object>())
|
||||
.def("GetWorldVolume", f1_GetWorldVolume,
|
||||
return_value_policy<reference_existing_object>())
|
||||
.def("GetWorldVolume", f2_GetWorldVolume,
|
||||
return_value_policy<reference_existing_object>())
|
||||
;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: pyProcessingConfigurator.cc,v 1.1 2007/11/13 10:03:23 kmura Exp $
|
||||
// $Name: geant4-09-01 $
|
||||
// ====================================================================
|
||||
// pyProcessingConfigurator.cc
|
||||
//
|
||||
// based on 2.10.0
|
||||
//
|
||||
// 2007 Q
|
||||
// ====================================================================
|
||||
#include <boost/python.hpp>
|
||||
#include "Saxana/ProcessingConfigurator.h"
|
||||
|
||||
using namespace boost::python;
|
||||
|
||||
// ====================================================================
|
||||
// module definition
|
||||
// ====================================================================
|
||||
void export_ProcessingConfigurator()
|
||||
{
|
||||
scope in_ProcessingConfigurator=
|
||||
class_<ProcessingConfigurator>("ProcessingConfigurator",
|
||||
"processing configurator class")
|
||||
// ---
|
||||
.def("SetMode", &ProcessingConfigurator::SetMode)
|
||||
.def("Mode", &ProcessingConfigurator::Mode)
|
||||
.def("SetURI", &ProcessingConfigurator::SetURI)
|
||||
.def("URI", &ProcessingConfigurator::URI,
|
||||
return_value_policy<return_by_value>())
|
||||
.def("SetType", &ProcessingConfigurator::SetType)
|
||||
.def("Type", &ProcessingConfigurator::Type,
|
||||
return_value_policy<return_by_value>())
|
||||
.def("SetSetupName", &ProcessingConfigurator::SetSetupName)
|
||||
.def("SetupName", &ProcessingConfigurator::SetupName,
|
||||
return_value_policy<return_by_value>())
|
||||
.def("SetSetupVersion", &ProcessingConfigurator::SetSetupVersion)
|
||||
.def("SetupVersion", &ProcessingConfigurator::SetupVersion,
|
||||
return_value_policy<return_by_value>())
|
||||
;
|
||||
|
||||
enum_<ProcessingConfigurator::SAXMode>("SAXMode")
|
||||
.value("eBatch", ProcessingConfigurator::eBatch)
|
||||
.value("eProgressive", ProcessingConfigurator::eProgressive)
|
||||
.value("eSearch", ProcessingConfigurator::eSearch)
|
||||
;
|
||||
}
|
||||
|
||||
@@ -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: pySAXProcessor.cc,v 1.1 2007/11/13 10:03:23 kmura Exp $
|
||||
// $Name: geant4-09-01 $
|
||||
// ====================================================================
|
||||
// pySAXProcessor.cc
|
||||
//
|
||||
// based on 2.10.0
|
||||
//
|
||||
// 2007 Q
|
||||
// ====================================================================
|
||||
#include <boost/python.hpp>
|
||||
#include "Saxana/SAXProcessor.h"
|
||||
#include "Saxana/ProcessingConfigurator.h"
|
||||
|
||||
using namespace boost::python;
|
||||
|
||||
// ====================================================================
|
||||
// module definition
|
||||
// ====================================================================
|
||||
void export_SAXProcessor()
|
||||
{
|
||||
class_<SAXProcessor>("SAXProcessor", "SAX processor class")
|
||||
// ---
|
||||
.def("Initialize", &SAXProcessor::Initialize)
|
||||
.def("Configure", &SAXProcessor::Configure)
|
||||
.def("Run", &SAXProcessor::Run)
|
||||
.def("Finalize", &SAXProcessor::Finalize)
|
||||
;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: pyStatusCode.cc,v 1.1 2007/11/13 10:03:23 kmura Exp $
|
||||
// $Name: geant4-09-01 $
|
||||
// ====================================================================
|
||||
// pyStatusCode.cc
|
||||
//
|
||||
// based on 2.10.0
|
||||
//
|
||||
// 2007 Q
|
||||
// ====================================================================
|
||||
#include <boost/python.hpp>
|
||||
#include "Saxana/StatusCode.h"
|
||||
|
||||
using namespace boost::python;
|
||||
|
||||
// ====================================================================
|
||||
// module definition
|
||||
// ====================================================================
|
||||
void export_StatusCode()
|
||||
{
|
||||
scope in_StatusCode=
|
||||
class_<StatusCode>("StatusCode", "status code")
|
||||
.def(init<>())
|
||||
.def(init<StatusCode::EInfo>())
|
||||
// ---
|
||||
.def("IsOk", &StatusCode::IsOk)
|
||||
.def("IsFailure", &StatusCode::IsFailure)
|
||||
.def("Info", &StatusCode::Info)
|
||||
;
|
||||
|
||||
enum_<StatusCode::EInfo>("EInfo")
|
||||
.value("eError", StatusCode::eError)
|
||||
.value("eOk", StatusCode::eOk)
|
||||
.value("eWarning", StatusCode::eWarning)
|
||||
.value("eParserInitFailure", StatusCode::eParserInitFailure)
|
||||
;
|
||||
}
|
||||
|
||||
@@ -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: pymodG4gdml.cc,v 1.1 2007/11/13 10:03:23 kmura Exp $
|
||||
// $Name: geant4-09-01 $
|
||||
// ====================================================================
|
||||
// pymodG4gdml.cc [Geant4Py module]
|
||||
//
|
||||
// 2007 Q
|
||||
// ====================================================================
|
||||
#include <boost/python.hpp>
|
||||
|
||||
using namespace boost::python;
|
||||
|
||||
// ====================================================================
|
||||
// module definition
|
||||
// ====================================================================
|
||||
|
||||
void export_G4GDMLWriter();
|
||||
void export_GDMLProcessor();
|
||||
void export_SAXProcessor();
|
||||
void export_StatusCode();
|
||||
void export_ProcessingConfigurator();
|
||||
|
||||
BOOST_PYTHON_MODULE(G4gdml)
|
||||
{
|
||||
export_G4GDMLWriter();
|
||||
export_GDMLProcessor();
|
||||
export_SAXProcessor();
|
||||
export_StatusCode();
|
||||
export_ProcessingConfigurator();
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
;
|
||||
|
||||
}
|
||||
|
||||
@@ -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
|
||||
//
|
||||
|
||||
@@ -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)
|
||||
;
|
||||
}
|
||||
|
||||
@@ -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
|
||||
//
|
||||
|
||||
@@ -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>());
|
||||
|
||||
}
|
||||
@@ -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
|
||||
//
|
||||
|
||||
@@ -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>());
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -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>());
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4PyCoutDestination.cc,v 1.3 2006/06/29 15:33:03 gunter Exp $
|
||||
// $Name: geant4-09-00 $
|
||||
// $Name: geant4-09-01 $
|
||||
// ====================================================================
|
||||
// G4PyCoutDistination.cc
|
||||
//
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4PyCoutDestination.hh,v 1.3 2006/06/29 15:33:06 gunter Exp $
|
||||
// $Name: geant4-09-00 $
|
||||
// $Name: geant4-09-01 $
|
||||
// ====================================================================
|
||||
// G4PyCoutDestination.hh
|
||||
//
|
||||
|
||||
@@ -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
|
||||
# ===========================================================
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: pyG4ApplicationState.cc,v 1.5 2006/11/20 05:56:46 kmura Exp $
|
||||
// $Name: geant4-09-00 $
|
||||
// $Name: geant4-09-01 $
|
||||
// ====================================================================
|
||||
// pyG4ApplicationState.cc
|
||||
//
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: pyG4Exception.cc,v 1.1 2006/11/20 05:57:16 kmura Exp $
|
||||
// $Name: geant4-09-00 $
|
||||
// $Name: geant4-09-01 $
|
||||
// ====================================================================
|
||||
// pyG4Exception.cc
|
||||
//
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: pyG4ExceptionHandler.cc,v 1.1 2006/11/21 05:58:33 kmura Exp $
|
||||
// $Name: geant4-09-00 $
|
||||
// $Name: geant4-09-01 $
|
||||
// ====================================================================
|
||||
// pyG4ExceptionHandler.cc
|
||||
//
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: pyG4ExceptionSeverity.cc,v 1.1 2006/11/20 05:57:16 kmura Exp $
|
||||
// $Name: geant4-09-00 $
|
||||
// $Name: geant4-09-01 $
|
||||
// ====================================================================
|
||||
// pyG4ExceptionSeverity.cc
|
||||
//
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: pyG4RandomDirection.cc,v 1.4 2006/06/29 15:33:12 gunter Exp $
|
||||
// $Name: geant4-09-00 $
|
||||
// $Name: geant4-09-01 $
|
||||
// ====================================================================
|
||||
// pyG4RandomDirection.cc
|
||||
//
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: pyG4RotationMatrix.cc,v 1.4 2006/06/29 15:33:15 gunter Exp $
|
||||
// $Name: geant4-09-00 $
|
||||
// $Name: geant4-09-01 $
|
||||
// ====================================================================
|
||||
// pyG4RotationMatrix.cc
|
||||
//
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: pyG4StateManager.cc,v 1.4 2006/06/29 15:33:18 gunter Exp $
|
||||
// $Name: geant4-09-00 $
|
||||
// $Name: geant4-09-01 $
|
||||
// ====================================================================
|
||||
// pyG4StateManager.cc
|
||||
//
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: pyG4String.cc,v 1.4 2006/06/29 15:33:21 gunter Exp $
|
||||
// $Name: geant4-09-00 $
|
||||
// $Name: geant4-09-01 $
|
||||
// ====================================================================
|
||||
// pyG4String.cc
|
||||
//
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: pyG4ThreeVector.cc,v 1.5 2006/06/29 15:33:24 gunter Exp $
|
||||
// $Name: geant4-09-00 $
|
||||
// $Name: geant4-09-01 $
|
||||
// ====================================================================
|
||||
// pyG4ThreeVector.cc
|
||||
//
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: pyG4Timer.cc,v 1.3 2006/06/29 15:33:27 gunter Exp $
|
||||
// $Name: geant4-09-00 $
|
||||
// $Name: geant4-09-01 $
|
||||
// ====================================================================
|
||||
// pyG4Timer.cc
|
||||
//
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: pyG4Transform3D.cc,v 1.4 2006/06/29 15:33:30 gunter Exp $
|
||||
// $Name: geant4-09-00 $
|
||||
// $Name: geant4-09-01 $
|
||||
// ====================================================================
|
||||
// pyG4Transform3D.cc
|
||||
//
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: pyG4TwoVector.cc,v 1.1 2007/05/28 03:03:21 kmura Exp $
|
||||
// $Name: geant4-09-00 $
|
||||
// $Name: geant4-09-01 $
|
||||
// ====================================================================
|
||||
// pyG4TwoVector.cc
|
||||
//
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: pyG4UnitsTable.cc,v 1.4 2006/06/29 15:33:33 gunter Exp $
|
||||
// $Name: geant4-09-00 $
|
||||
// $Name: geant4-09-01 $
|
||||
// ====================================================================
|
||||
// pyG4UnitsTable.cc
|
||||
//
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: pyG4UserLimits.cc,v 1.4 2006/06/29 15:33:36 gunter Exp $
|
||||
// $Name: geant4-09-00 $
|
||||
// $Name: geant4-09-01 $
|
||||
// ====================================================================
|
||||
// pyG4UserLimits.cc
|
||||
//
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: pyG4Version.cc,v 1.1 2006/08/23 04:43:27 kmura Exp $
|
||||
// $Name: geant4-09-00 $
|
||||
// $Name: geant4-09-01 $
|
||||
// ====================================================================
|
||||
// pyG4Version.cc
|
||||
//
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: pyRandomEngines.cc,v 1.4 2006/06/29 15:33:39 gunter Exp $
|
||||
// $Name: geant4-09-00 $
|
||||
// $Name: geant4-09-01 $
|
||||
// ====================================================================
|
||||
// pyRandomEngines.cc
|
||||
//
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: pyRandomize.cc,v 1.4 2006/06/29 15:33:42 gunter Exp $
|
||||
// $Name: geant4-09-00 $
|
||||
// $Name: geant4-09-01 $
|
||||
// ====================================================================
|
||||
// pyRandomize.cc
|
||||
//
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: pygeomdefs.cc,v 1.4 2006/06/29 15:33:45 gunter Exp $
|
||||
// $Name: geant4-09-00 $
|
||||
// $Name: geant4-09-01 $
|
||||
// ====================================================================
|
||||
// pygeomdefs.cc
|
||||
//
|
||||
|
||||
@@ -23,17 +23,20 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: pyglobals.cc,v 1.4 2006/06/29 15:33:48 gunter Exp $
|
||||
// $Name: geant4-09-00 $
|
||||
// $Id: pyglobals.cc,v 1.5 2007/07/12 09:38:01 kmura Exp $
|
||||
// $Name: geant4-09-01 $
|
||||
// ====================================================================
|
||||
// pyglobals.cc
|
||||
//
|
||||
// 2005 Q
|
||||
// ====================================================================
|
||||
#include <boost/python.hpp>
|
||||
#include "pyG4Version.hh"
|
||||
#include "G4strstreambuf.hh"
|
||||
#include "G4UImanager.hh"
|
||||
#include "G4PyCoutDestination.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
#include "G4TwoVector.hh"
|
||||
#include "pyG4indexing.hh"
|
||||
#include <vector>
|
||||
|
||||
@@ -62,7 +65,10 @@ void ResetG4PyCoutDestination()
|
||||
typedef std::vector<G4int> G4intVector;
|
||||
typedef std::vector<G4double> G4doubleVector;
|
||||
typedef std::vector<G4String> G4StringVector;
|
||||
|
||||
typedef std::vector<G4ThreeVector> G4ThreeVectorVector;
|
||||
#if G4VERSION_NUMBER >= 830
|
||||
typedef std::vector<G4TwoVector> G4TwoVectorVector;
|
||||
#endif
|
||||
};
|
||||
|
||||
using namespace pyglobals;
|
||||
@@ -86,5 +92,16 @@ void export_globals()
|
||||
class_<G4StringVector> ("G4StringVector", "string vector")
|
||||
.def(vector_indexing_suite<G4StringVector>())
|
||||
;
|
||||
|
||||
class_<G4ThreeVectorVector> ("G4ThreeVectorVector", "3-vector vector")
|
||||
.def(vector_indexing_suite<G4ThreeVectorVector>())
|
||||
;
|
||||
|
||||
#if G4VERSION_NUMBER >= 830
|
||||
class_<G4TwoVectorVector> ("G4StringVector", "2-vector vector")
|
||||
.def(vector_indexing_suite<G4TwoVectorVector>())
|
||||
;
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: pymodG4global.cc,v 1.8 2007/05/28 03:03:21 kmura Exp $
|
||||
// $Name: geant4-09-00 $
|
||||
// $Name: geant4-09-01 $
|
||||
// ====================================================================
|
||||
// pymodG4global.cc [Geant4Py module]
|
||||
//
|
||||
|
||||
@@ -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
|
||||
# ===========================================================
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: pyG4Colour.cc,v 1.4 2006/06/29 15:33:54 gunter Exp $
|
||||
// $Name: geant4-09-00 $
|
||||
// $Name: geant4-09-01 $
|
||||
// ====================================================================
|
||||
// pyG4Colour.cc
|
||||
//
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: pyG4VisAttributes.cc,v 1.4 2006/06/29 15:33:57 gunter Exp $
|
||||
// $Name: geant4-09-00 $
|
||||
// $Name: geant4-09-01 $
|
||||
// ====================================================================
|
||||
// pyG4VisAttributes.cc
|
||||
//
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: pymodG4graphics_reps.cc,v 1.4 2006/06/29 15:33:59 gunter Exp $
|
||||
// $Name: geant4-09-00 $
|
||||
// $Name: geant4-09-01 $
|
||||
// ====================================================================
|
||||
// pymodG4graphics_reps.cc [Geant4Py module]
|
||||
//
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# $Id: GNUmakefile,v 1.1 2006/08/08 05:20:57 kmura Exp $
|
||||
# $Name: geant4-09-00 $
|
||||
# $Name: geant4-09-01 $
|
||||
# ===========================================================
|
||||
# Makefile for building Geant4Py modules
|
||||
# ===========================================================
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: pyG4UIcommand.cc,v 1.1 2006/08/08 05:20:57 kmura Exp $
|
||||
// $Name: geant4-09-00 $
|
||||
// $Name: geant4-09-01 $
|
||||
// ====================================================================
|
||||
// pyG4UIcommand.cc
|
||||
//
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: pyG4UIcommandTree.cc,v 1.1 2006/08/08 05:20:57 kmura Exp $
|
||||
// $Name: geant4-09-00 $
|
||||
// $Name: geant4-09-01 $
|
||||
// ====================================================================
|
||||
// pyG4UIcommandTree.cc
|
||||
//
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: pyG4UImanager.cc,v 1.1 2006/08/08 05:20:57 kmura Exp $
|
||||
// $Name: geant4-09-00 $
|
||||
// $Name: geant4-09-01 $
|
||||
// ====================================================================
|
||||
// pyG4UImanager.cc
|
||||
//
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: pyG4UIparameter.cc,v 1.1 2006/08/08 05:20:57 kmura Exp $
|
||||
// $Name: geant4-09-00 $
|
||||
// $Name: geant4-09-01 $
|
||||
// ====================================================================
|
||||
// pyG4UIparameter.cc
|
||||
//
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: pymodG4intercoms.cc,v 1.1 2006/08/08 05:20:57 kmura Exp $
|
||||
// $Name: geant4-09-00 $
|
||||
// $Name: geant4-09-01 $
|
||||
// ====================================================================
|
||||
// pymodG4intercoms.cc [Geant4Py module]
|
||||
//
|
||||
|
||||
@@ -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
|
||||
# ===========================================================
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user