Import Geant4 8.1.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 14:44:26 +02:00
parent 8a51e0bc40
commit 216a75eeb1
8717 changed files with 360418 additions and 141343 deletions
@@ -0,0 +1,14 @@
# $Id: GNUmakefile,v 1.2 2006/04/25 08:09:45 kmura Exp $
# $Name: geant4-08-01 $
# ===========================================================
# Makefile for building Geant4Py modules
# ===========================================================
include ../../config/config.gmk
# python module name
MODULE := G4particles#
include $(G4PY_INSTALL)/config/g4py.gmk
include $(G4PY_INSTALL)/config/module.gmk
include $(G4PY_INSTALL)/config/install.gmk
@@ -0,0 +1,53 @@
//
// ********************************************************************
// * 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: pyG4DecayTable.cc,v 1.4 2006/06/29 15:34:27 gunter Exp $
// $Name: geant4-08-01 $
// ====================================================================
// pyG4DecayTable.cc
//
// 2005 Q
// ====================================================================
#include <boost/python.hpp>
#include "G4DecayTable.hh"
using namespace boost::python;
// ====================================================================
// module definition
// ====================================================================
void export_G4DecayTable()
{
class_<G4DecayTable, G4DecayTable*, boost::noncopyable>
("G4DecayTable", "decay table")
// ---
.def("DumpInfo", &G4DecayTable::DumpInfo)
;
// reduced functionality...
// ...
}
@@ -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: pyG4DynamicParticle.cc,v 1.4 2006/06/29 15:34:30 gunter Exp $
// $Name: geant4-08-01 $
// ====================================================================
// pyG4DynamicParticle.cc
//
// 2005 Q
// ====================================================================
#include <boost/python.hpp>
#include "G4DynamicParticle.hh"
#include "pyG4Version.hh"
using namespace boost::python;
// ====================================================================
// module definition
// ====================================================================
void export_G4DynamicParticle()
{
class_<G4DynamicParticle, G4DynamicParticle*>
("G4DynamicParticle", "dynamic particle")
// ---
.def("GetMomentumDirection", &G4DynamicParticle::GetMomentumDirection,
return_value_policy<return_by_value>())
.def("GetMomentum", &G4DynamicParticle::GetMomentum,
return_value_policy<return_by_value>())
//.def("Get4Momentum", &G4DynamicParticle::Get4Momentum,
//return_value_policy<return_by_value>())
.def("GetTotalMomentum", &G4DynamicParticle::GetTotalMomentum)
.def("GetTotalEnergy", &G4DynamicParticle::GetTotalEnergy)
.def("GetKineticEnergy", &G4DynamicParticle::GetKineticEnergy)
.def("GetProperTime", &G4DynamicParticle::GetProperTime)
.def("GetPolarization", &G4DynamicParticle::GetPolarization,
return_value_policy<return_by_value>())
.def("GetMass", &G4DynamicParticle::GetMass)
.def("GetCharge", &G4DynamicParticle::GetCharge)
//.def("GetElectronOccupancy", &G4DynamicParticle::GetElectronOccupancy,
//return_internal_reference<>())
.def("GetTotalOccupancy", &G4DynamicParticle::GetTotalOccupancy)
.def("GetOccupancy", &G4DynamicParticle::GetOccupancy)
.def("GetDefinition", &G4DynamicParticle::GetDefinition,
return_internal_reference<>())
.def("GetPreAssignedDecayProperTime",
&G4DynamicParticle::GetPreAssignedDecayProperTime)
.def("DumpInfo", &G4DynamicParticle::DumpInfo)
.def("SetVerboseLevel", &G4DynamicParticle::SetVerboseLevel)
.def("GetVerboseLevel", &G4DynamicParticle::GetVerboseLevel)
.def("GetPrimaryParticle", &G4DynamicParticle::GetPrimaryParticle,
return_internal_reference<>())
#if G4VERSION_NUMBER >= 710
.def("GetPDGcode", &G4DynamicParticle::GetPDGcode)
#endif
;
}
@@ -0,0 +1,96 @@
//
// ********************************************************************
// * 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: pyG4ParticleDefinition.cc,v 1.4 2006/06/29 15:34:33 gunter Exp $
// $Name: geant4-08-01 $
// ====================================================================
// pyG4ParticleDefinition.cc
//
// 2005 Q
// ====================================================================
#include <boost/python.hpp>
#include "G4ParticleDefinition.hh"
#include "G4ParticleTable.hh"
#include "G4DecayTable.hh"
#include "G4ProcessManager.hh"
using namespace boost::python;
// ====================================================================
// module definition
// ====================================================================
void export_G4ParticleDefinition()
{
class_<G4ParticleDefinition, G4ParticleDefinition*, boost::noncopyable>
("G4ParticleDefinition", "particle definition", no_init)
// ---
.def("GetParticleName", &G4ParticleDefinition::GetParticleName,
return_value_policy<return_by_value>())
.def("GetPDGMass", &G4ParticleDefinition::GetPDGMass)
.def("GetPDGWidth", &G4ParticleDefinition::GetPDGWidth)
.def("GetPDGCharge", &G4ParticleDefinition::GetPDGCharge)
.def("GetPDGSpin", &G4ParticleDefinition::GetPDGSpin)
.def("GetPDGiSpin", &G4ParticleDefinition::GetPDGiSpin)
.def("GetPDGiParity", &G4ParticleDefinition::GetPDGiParity)
.def("GetPDGiConjugation", &G4ParticleDefinition::GetPDGiConjugation)
.def("GetPDGIsospin", &G4ParticleDefinition::GetPDGIsospin)
.def("GetPDGIsospin3", &G4ParticleDefinition::GetPDGIsospin3)
.def("GetPDGiIsospin", &G4ParticleDefinition::GetPDGiIsospin)
.def("GetPDGiIsospin3", &G4ParticleDefinition::GetPDGiIsospin3)
.def("GetPDGiGParity", &G4ParticleDefinition::GetPDGiGParity)
.def("GetParticleType", &G4ParticleDefinition::GetParticleType,
return_value_policy<return_by_value>())
.def("GetParticleSubType", &G4ParticleDefinition::GetParticleSubType,
return_value_policy<return_by_value>())
.def("GetLeptonNumber", &G4ParticleDefinition::GetLeptonNumber)
.def("GetBaryonNumber", &G4ParticleDefinition::GetBaryonNumber)
.def("GetPDGEncoding", &G4ParticleDefinition::GetPDGEncoding)
.def("GetAntiPDGEncoding", &G4ParticleDefinition::GetAntiPDGEncoding)
.def("GetQuarkContent", &G4ParticleDefinition::GetQuarkContent)
.def("GetAntiQuarkContent",&G4ParticleDefinition::GetAntiQuarkContent)
.def("IsShortLived", &G4ParticleDefinition::IsShortLived)
.def("GetPDGStable", &G4ParticleDefinition::GetPDGStable)
.def("SetPDGStable", &G4ParticleDefinition::SetPDGStable)
.def("GetPDGLifeTime", &G4ParticleDefinition::GetPDGLifeTime)
.def("SetPDGLifeTime", &G4ParticleDefinition::SetPDGLifeTime)
.def("GetDecayTable", &G4ParticleDefinition::GetDecayTable,
return_internal_reference<>())
.def("SetDecayTable", &G4ParticleDefinition::SetDecayTable)
.def("GetProcessManager", &G4ParticleDefinition::GetProcessManager,
return_internal_reference<>())
.def("SetProcessManager", &G4ParticleDefinition::SetProcessManager)
// cludge!! (G4ParticleTable object is sigleton!!)
.def("GetParticleTable", &G4ParticleDefinition::GetParticleTable,
return_value_policy<reference_existing_object>())
.def("DumpTable", &G4ParticleDefinition::DumpTable)
.def("GetAtomicNumber", &G4ParticleDefinition::GetAtomicNumber)
.def("GetAtomicMass", &G4ParticleDefinition::GetAtomicMass)
.def("SetVerboseLevel", &G4ParticleDefinition::SetVerboseLevel)
.def("GetVerboseLevel", &G4ParticleDefinition::GetVerboseLevel)
.def("SetApplyCutsFlag", &G4ParticleDefinition::SetApplyCutsFlag)
.def("GetApplyCutsFlag", &G4ParticleDefinition::GetApplyCutsFlag)
;
}
@@ -0,0 +1,94 @@
//
// ********************************************************************
// * 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: pyG4ParticleList.cc,v 1.3 2006/06/29 15:34:35 gunter Exp $
// $Name: geant4-08-01 $
// ====================================================================
// pyG4ParticleList.cc
//
// 2005 Q
// ====================================================================
#include <boost/python.hpp>
#include "G4ParticleTable.hh"
using namespace boost::python;
// ====================================================================
// internal class
// ====================================================================
class PyG4ParticleList {
public:
typedef std::vector<G4ParticleDefinition*> ParticleList;
typedef ParticleList::iterator p_iterator;
static ParticleList particleTableCache;
p_iterator p_begin() {
G4ParticleTable* particleTable= G4ParticleTable::GetParticleTable();
if(particleTableCache.size() != particleTable-> size() ) {
particleTableCache.clear();
G4ParticleTable::G4PTblDicIterator*
theParticleIterator= particleTable-> GetIterator();
theParticleIterator-> reset();
while( (*theParticleIterator)() ){
G4ParticleDefinition* particle= theParticleIterator-> value();
particleTableCache.push_back(particle);
}
}
return particleTableCache.begin();
}
p_iterator p_end() {
G4ParticleTable* particleTable= G4ParticleTable::GetParticleTable();
if(particleTableCache.size() != particleTable-> size() ) {
particleTableCache.clear();
G4ParticleTable::G4PTblDicIterator*
theParticleIterator= particleTable-> GetIterator();
theParticleIterator-> reset();
while( (*theParticleIterator)() ){
G4ParticleDefinition* particle= theParticleIterator-> value();
particleTableCache.push_back(particle);
}
}
return particleTableCache.end();
}
};
PyG4ParticleList::ParticleList PyG4ParticleList::particleTableCache;
// ====================================================================
// module definition
// ====================================================================
void export_PyG4ParticleList()
{
class_<PyG4ParticleList>("PyG4ParticleList", "particle list")
.def("__iter__", iterator<PyG4ParticleList::ParticleList>())
.add_property("particles", range(&PyG4ParticleList::p_begin,
&PyG4ParticleList::p_end))
;
}
@@ -0,0 +1,153 @@
//
// ********************************************************************
// * 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: pyG4ParticleTable.cc,v 1.4 2006/06/29 15:34:37 gunter Exp $
// $Name: geant4-08-01 $
// ====================================================================
// pyG4ParticleTable.cc
//
// 2005 Q
// ====================================================================
#include <boost/python.hpp>
#include "G4ParticleTable.hh"
using namespace boost::python;
// ====================================================================
// thin wrappers
// ====================================================================
namespace pyG4ParticleTable {
// contains...
G4bool(G4ParticleTable::*f1_contains)(const G4ParticleDefinition*)
= &G4ParticleTable::contains;
G4bool(G4ParticleTable::*f2_contains)(const G4String&)
= &G4ParticleTable::contains;
// FindParticle...
G4ParticleDefinition*(G4ParticleTable::*f1_FindParticle)(G4int)
= &G4ParticleTable::FindParticle;
G4ParticleDefinition*(G4ParticleTable::*f2_FindParticle)(const G4String&)
= &G4ParticleTable::FindParticle;
G4ParticleDefinition*(G4ParticleTable::*f3_FindParticle)(
const G4ParticleDefinition*)= &G4ParticleTable::FindParticle;
// FindAntiParticle...
G4ParticleDefinition*(G4ParticleTable::*f1_FindAntiParticle)(G4int)
= &G4ParticleTable::FindAntiParticle;
G4ParticleDefinition*(G4ParticleTable::*f2_FindAntiParticle)(const G4String&)
= &G4ParticleTable::FindAntiParticle;
G4ParticleDefinition*(G4ParticleTable::*f3_FindAntiParticle)(
const G4ParticleDefinition*)= &G4ParticleTable::FindAntiParticle;
// FindIon
G4ParticleDefinition*(G4ParticleTable::*f1_FindIon)(G4int, G4int, G4double)
= &G4ParticleTable::FindIon;
G4ParticleDefinition*(G4ParticleTable::*f2_FindIon)(
G4int, G4int, G4int, G4int)= &G4ParticleTable::FindIon;
// DumpTable
BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(f_DumpTable, DumpTable, 0, 1);
// --------------------------------------------------------------------
// GetParticleList (returning python list)
list GetParticleList(G4ParticleTable* particleTable)
{
list particleList;
G4ParticleTable::G4PTblDicIterator*
theParticleIterator= particleTable-> GetIterator();
theParticleIterator-> reset();
while( (*theParticleIterator)() ){
G4ParticleDefinition* particle= theParticleIterator-> value();
particleList.append(&particle);
}
return particleList;
}
};
using namespace pyG4ParticleTable;
// ====================================================================
// module definition
// ====================================================================
void export_G4ParticleTable()
{
class_<G4ParticleTable, G4ParticleTable*, boost::noncopyable>
("G4ParticleTable", "particle table", no_init)
// ---
.def("GetParticleTable", &G4ParticleTable::GetParticleTable,
return_value_policy<reference_existing_object>())
.staticmethod("GetParticleTable")
.def("contains", f1_contains)
.def("contains", f2_contains)
.def("entries", &G4ParticleTable::entries)
.def("size", &G4ParticleTable::size)
// ---
.def("GetParticle", &G4ParticleTable::GetParticle,
return_value_policy<reference_existing_object>())
.def("GetParticleName", &G4ParticleTable::GetParticleName,
return_value_policy<return_by_value>())
.def("FindParticle", f1_FindParticle,
return_value_policy<reference_existing_object>())
.def("FindParticle", f2_FindParticle,
return_value_policy<reference_existing_object>())
.def("FindParticle", f3_FindParticle,
return_value_policy<reference_existing_object>())
.def("FindAntiParticle", f1_FindAntiParticle,
return_value_policy<reference_existing_object>())
.def("FindAntiParticle", f2_FindAntiParticle,
return_value_policy<reference_existing_object>())
.def("FindAntiParticle", f3_FindAntiParticle,
return_value_policy<reference_existing_object>())
.def("FindIon", f1_FindIon,
return_value_policy<reference_existing_object>())
.def("FindIon", f2_FindIon,
return_value_policy<reference_existing_object>())
.def("GetIon", &G4ParticleTable::GetIon,
return_value_policy<reference_existing_object>())
.def("DumpTable", &G4ParticleTable::DumpTable, f_DumpTable())
//.def("GetIonTable", &G4ParticleTable::GetIonTable,
//...)
//.def("GetShortLivedTable", &G4ParticleTable::GetShortLivedTable,
//...)
.def("SetVerboseLevel", &G4ParticleTable::SetVerboseLevel)
.def("GetVerboseLevel", &G4ParticleTable::GetVerboseLevel)
.def("SetReadiness", &G4ParticleTable::SetReadiness)
.def("GetReadiness", &G4ParticleTable::GetReadiness)
// ---
// additionals
.def("GetParticleList", GetParticleList)
;
}
@@ -0,0 +1,77 @@
//
// ********************************************************************
// * 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: pyG4PrimaryParticle.cc,v 1.4 2006/06/29 15:34:40 gunter Exp $
// $Name: geant4-08-01 $
// ====================================================================
// pyG4PrimaryParticle.cc
//
// 2005 Q
// ====================================================================
#include <boost/python.hpp>
#include "G4PrimaryParticle.hh"
#include "G4ParticleDefinition.hh"
using namespace boost::python;
// ====================================================================
// module definition
// ====================================================================
void export_G4PrimaryParticle()
{
class_<G4PrimaryParticle, G4PrimaryParticle*>
("G4PrimaryParticle", "primary particle")
// ---
.add_property("Px", &G4PrimaryParticle::GetPx)
.add_property("Py", &G4PrimaryParticle::GetPy)
.add_property("Pz", &G4PrimaryParticle::GetPz)
// ---
.def("Print", &G4PrimaryParticle::Print)
.def("GetPDGcode", &G4PrimaryParticle::GetPDGcode)
.def("GetG4code", &G4PrimaryParticle::GetG4code,
return_internal_reference<>())
.def("GetMomentun", &G4PrimaryParticle::GetMomentum,
return_value_policy<return_by_value>())
.def("GetPx", &G4PrimaryParticle::GetPx)
.def("GetPy", &G4PrimaryParticle::GetPy)
.def("GetPz", &G4PrimaryParticle::GetPz)
.def("GetNext", &G4PrimaryParticle::GetNext,
return_internal_reference<>())
.def("GetDaughter", &G4PrimaryParticle::GetNext,
return_internal_reference<>())
.def("GetTrackID", &G4PrimaryParticle::GetTrackID)
.def("GetMass", &G4PrimaryParticle::GetMass)
.def("GetCharge", &G4PrimaryParticle::GetCharge)
.def("GetPolarization", &G4PrimaryParticle::GetPolarization,
return_value_policy<return_by_value>())
.def("GetPolX", &G4PrimaryParticle::GetPolX)
.def("GetPolY", &G4PrimaryParticle::GetPolY)
.def("GetPolZ", &G4PrimaryParticle::GetPolZ)
.def("GetWeight", &G4PrimaryParticle::GetWeight)
.def("SetWeight", &G4PrimaryParticle::SetWeight)
.def("GetProperTime", &G4PrimaryParticle::GetProperTime)
;
}
@@ -0,0 +1,75 @@
//
// ********************************************************************
// * 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: pyG4PrimaryVertex.cc,v 1.4 2006/06/29 15:34:43 gunter Exp $
// $Name: geant4-08-01 $
// ====================================================================
// pyG4PrimaryVertex.cc
//
// 2005 Q
// ====================================================================
#include <boost/python.hpp>
#include "G4PrimaryVertex.hh"
using namespace boost::python;
// ====================================================================
// thin wrappers
// ====================================================================
namespace pyG4PrimaryVertex {
BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(f_GetPrimary, GetPrimary, 0, 1);
};
using namespace pyG4PrimaryVertex;
// ====================================================================
// module definition
// ====================================================================
void export_G4PrimaryVertex()
{
class_<G4PrimaryVertex, G4PrimaryVertex*>
("G4PrimaryVertex", "primary vertex")
// ---
.add_property("X0", &G4PrimaryVertex::GetX0)
.add_property("Y0", &G4PrimaryVertex::GetY0)
.add_property("Z0", &G4PrimaryVertex::GetZ0)
.add_property("T0", &G4PrimaryVertex::GetT0)
// ---
.def("GetPosition", &G4PrimaryVertex::GetPosition,
return_value_policy<return_by_value>())
.def("GetX0", &G4PrimaryVertex::GetX0)
.def("GetY0", &G4PrimaryVertex::GetY0)
.def("GetZ0", &G4PrimaryVertex::GetZ0)
.def("GetT0", &G4PrimaryVertex::GetT0)
.def("GetNumberOfParticle", &G4PrimaryVertex::GetNumberOfParticle)
.def("GetPrimary", &G4PrimaryVertex::GetPrimary,
return_internal_reference<>(), f_GetPrimary())
.def("GetWeight", &G4PrimaryVertex::GetWeight)
.def("SetWeight", &G4PrimaryVertex::SetWeight)
.def("Print", &G4PrimaryVertex::Print)
;
}
@@ -0,0 +1,59 @@
//
// ********************************************************************
// * 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: pymodG4particles.cc,v 1.4 2006/06/29 15:34:46 gunter Exp $
// $Name: geant4-08-01 $
// ====================================================================
// pymodG4particles.cc
//
// 2005 Q
// ====================================================================
#include <boost/python.hpp>
using namespace boost::python;
// ====================================================================
// module definition
// ====================================================================
void export_G4ParticleDefinition();
void export_G4DynamicParticle();
void export_G4ParticleTable();
void export_G4DecayTable();
void export_G4PrimaryParticle();
void export_G4PrimaryVertex();
void export_PyG4ParticleList();
BOOST_PYTHON_MODULE(G4particles)
{
export_G4ParticleDefinition();
export_G4DynamicParticle();
export_G4ParticleTable();
export_G4DecayTable();
export_G4PrimaryParticle();
export_G4PrimaryVertex();
export_PyG4ParticleList();
}