Geant4-11
pyG4Region.cc
Go to the documentation of this file.
1//
2// ********************************************************************
3// * License and Disclaimer *
4// * *
5// * The Geant4 software is copyright of the Copyright Holders of *
6// * the Geant4 Collaboration. It is provided under the terms and *
7// * conditions of the Geant4 Software License, included in the file *
8// * LICENSE and available at http://cern.ch/geant4/license . These *
9// * include a list of copyright holders. *
10// * *
11// * Neither the authors of this software system, nor their employing *
12// * institutes,nor the agencies providing financial support for this *
13// * work make any representation or warranty, express or implied, *
14// * regarding this software system or assume any liability for its *
15// * use. Please see the license in the file LICENSE and URL above *
16// * for the full disclaimer and the limitation of liability. *
17// * *
18// * This code implementation is the result of the scientific and *
19// * technical work of the GEANT4 collaboration. *
20// * By using, copying, modifying or distributing the software (or *
21// * any work based on the software) you agree to acknowledge its *
22// * use in resulting scientific publications, and indicate your *
23// * acceptance of all terms of the Geant4 Software license. *
24// ********************************************************************
25//
26// ====================================================================
27// pyG4Region.cc
28//
29// 2005 Q
30// ====================================================================
31#include <boost/python.hpp>
32#include "G4Version.hh"
33#include "G4Region.hh"
34#include "G4LogicalVolume.hh"
35#include "G4ProductionCuts.hh"
37#include "G4UserLimits.hh"
40
41using namespace boost::python;
42
43// ====================================================================
44// module definition
45// ====================================================================
47{
48 class_<G4Region, G4Region*, boost::noncopyable>
49 ("G4Region", "region class", no_init)
50 // constructors
51 .def(init<const G4String&>())
52 // ---
53 .def("AddRootLogicalVolume", &G4Region::AddRootLogicalVolume)
54 .def("RemoveRootLogicalVolume", &G4Region::RemoveRootLogicalVolume)
55 .def("SetName", &G4Region::SetName)
56 .def("GetName", &G4Region::GetName,
57 return_value_policy<return_by_value>())
58 .def("RegionModified", &G4Region::RegionModified)
59 .def("IsModified", &G4Region::IsModified)
60 .def("SetProductionCuts", &G4Region::SetProductionCuts)
61 .def("GetProductionCuts", &G4Region::GetProductionCuts,
62 return_internal_reference<>())
63 .def("GetNumberOfMaterials", &G4Region::GetNumberOfMaterials)
64 .def("GetNumberOfRootVolumes", &G4Region::GetNumberOfRootVolumes)
65 .def("UpdateMaterialList", &G4Region::UpdateMaterialList)
66 .def("ClearMaterialList", &G4Region::ClearMaterialList)
67 .def("ScanVolumeTree", &G4Region::ScanVolumeTree)
68 .def("SetUserInformation", &G4Region::SetUserInformation)
69 .def("GetUserInformation", &G4Region::GetUserInformation,
70 return_internal_reference<>())
71#if G4VERSION_NUMBER >= 710
72 .def("SetUserLimits", &G4Region::SetUserLimits)
73 .def("GetUserLimits", &G4Region::GetUserLimits,
74 return_internal_reference<>())
75#endif
76 .def("ClearMap", &G4Region::ClearMap)
77 .def("RegisterMaterialCouplePair", &G4Region::RegisterMaterialCouplePair)
78 .def("FindCouple", &G4Region::FindCouple,
79 return_value_policy<reference_existing_object>())
80#if G4VERSION_NUMBER >= 800
81 .def("SetFastSimulationManager", &G4Region::SetFastSimulationManager)
82 .def("GetFastSimulationManager", &G4Region::GetFastSimulationManager,
83 return_internal_reference<>())
84 .def("ClearFastSimulationManager", &G4Region::ClearFastSimulationManager)
85 .def("GetWorldPhysical", &G4Region::GetWorldPhysical,
86 return_internal_reference<>())
87 .def("SetWorld", &G4Region::SetWorld)
88 .def("BelongsTo", &G4Region::BelongsTo)
89 .def("GetParentRegion", &G4Region::GetParentRegion,
90 return_value_policy<reference_existing_object>())
91#endif
92 ;
93 }
G4bool IsModified() const
G4bool BelongsTo(G4VPhysicalVolume *thePhys) const
Definition: G4Region.cc:414
void ScanVolumeTree(G4LogicalVolume *lv, G4bool region)
Definition: G4Region.cc:172
void ClearMaterialList()
Definition: G4Region.cc:366
G4Region * GetParentRegion(G4bool &unique) const
Definition: G4Region.cc:469
G4FastSimulationManager * GetFastSimulationManager() const
Definition: G4Region.cc:140
G4VUserRegionInformation * GetUserInformation() const
void SetWorld(G4VPhysicalVolume *wp)
Definition: G4Region.cc:398
G4ProductionCuts * GetProductionCuts() const
void RemoveRootLogicalVolume(G4LogicalVolume *lv, G4bool scan=true)
Definition: G4Region.cc:328
G4MaterialCutsCouple * FindCouple(G4Material *mat)
void RegionModified(G4bool flag)
G4VPhysicalVolume * GetWorldPhysical() const
void SetProductionCuts(G4ProductionCuts *cut)
G4UserLimits * GetUserLimits() const
const G4String & GetName() const
void UpdateMaterialList()
Definition: G4Region.cc:377
void SetFastSimulationManager(G4FastSimulationManager *fsm)
Definition: G4Region.cc:131
void ClearMap()
void SetUserInformation(G4VUserRegionInformation *ui)
void SetName(const G4String &name)
Definition: G4Region.cc:121
size_t GetNumberOfRootVolumes() const
size_t GetNumberOfMaterials() const
void ClearFastSimulationManager()
Definition: G4Region.cc:434
void RegisterMaterialCouplePair(G4Material *mat, G4MaterialCutsCouple *couple)
void SetUserLimits(G4UserLimits *ul)
void AddRootLogicalVolume(G4LogicalVolume *lv, G4bool search=true)
Definition: G4Region.cc:293
void export_G4Region()
Definition: pyG4Region.cc:46