Geant4  10.01.p03
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 // $Id: pyG4Region.cc 66892 2013-01-17 10:57:59Z gunter $
27 // ====================================================================
28 // pyG4Region.cc
29 //
30 // 2005 Q
31 // ====================================================================
32 #include <boost/python.hpp>
33 #include "G4Version.hh"
34 #include "G4Region.hh"
35 #include "G4LogicalVolume.hh"
36 #include "G4ProductionCuts.hh"
38 #include "G4UserLimits.hh"
39 #include "G4MaterialCutsCouple.hh"
41 
42 using namespace boost::python;
43 
44 // ====================================================================
45 // module definition
46 // ====================================================================
48 {
49  class_<G4Region, G4Region*, boost::noncopyable>
50  ("G4Region", "region class", no_init)
51  // constructors
52  .def(init<const G4String&>())
53  // ---
54  .def("AddRootLogicalVolume", &G4Region::AddRootLogicalVolume)
55  .def("RemoveRootLogicalVolume", &G4Region::RemoveRootLogicalVolume)
56  .def("SetName", &G4Region::SetName)
57  .def("GetName", &G4Region::GetName,
58  return_value_policy<return_by_value>())
59  .def("RegionModified", &G4Region::RegionModified)
60  .def("IsModified", &G4Region::IsModified)
61  .def("SetProductionCuts", &G4Region::SetProductionCuts)
62  .def("GetProductionCuts", &G4Region::GetProductionCuts,
63  return_internal_reference<>())
64  .def("GetNumberOfMaterials", &G4Region::GetNumberOfMaterials)
65  .def("GetNumberOfRootVolumes", &G4Region::GetNumberOfRootVolumes)
66  .def("UpdateMaterialList", &G4Region::UpdateMaterialList)
67  .def("ClearMaterialList", &G4Region::ClearMaterialList)
68  .def("ScanVolumeTree", &G4Region::ScanVolumeTree)
69  .def("SetUserInformation", &G4Region::SetUserInformation)
70  .def("GetUserInformation", &G4Region::GetUserInformation,
71  return_internal_reference<>())
72 #if G4VERSION_NUMBER >= 710
73  .def("SetUserLimits", &G4Region::SetUserLimits)
74  .def("GetUserLimits", &G4Region::GetUserLimits,
75  return_internal_reference<>())
76 #endif
77  .def("ClearMap", &G4Region::ClearMap)
78  .def("RegisterMaterialCouplePair", &G4Region::RegisterMaterialCouplePair)
79  .def("FindCouple", &G4Region::FindCouple,
80  return_value_policy<reference_existing_object>())
81 #if G4VERSION_NUMBER >= 800
82  .def("SetFastSimulationManager", &G4Region::SetFastSimulationManager)
83  .def("GetFastSimulationManager", &G4Region::GetFastSimulationManager,
84  return_internal_reference<>())
85  .def("ClearFastSimulationManager", &G4Region::ClearFastSimulationManager)
86  .def("GetWorldPhysical", &G4Region::GetWorldPhysical,
87  return_internal_reference<>())
88  .def("SetWorld", &G4Region::SetWorld)
89  .def("BelongsTo", &G4Region::BelongsTo)
90  .def("GetParentRegion", &G4Region::GetParentRegion,
91  return_value_policy<reference_existing_object>())
92 #endif
93  ;
94  }
void RegisterMaterialCouplePair(G4Material *mat, G4MaterialCutsCouple *couple)
void SetUserInformation(G4VUserRegionInformation *ui)
G4ProductionCuts * GetProductionCuts() const
const G4String & GetName() const
void AddRootLogicalVolume(G4LogicalVolume *lv)
Definition: G4Region.cc:254
G4bool IsModified() const
G4VUserRegionInformation * GetUserInformation() const
void RegionModified(G4bool flag)
void export_G4Region()
Definition: pyG4Region.cc:47
void ClearMap()
void SetFastSimulationManager(G4FastSimulationManager *fsm)
G4VPhysicalVolume * GetWorldPhysical() const
void ScanVolumeTree(G4LogicalVolume *lv, G4bool region)
Definition: G4Region.cc:133
void SetName(const G4String &name)
void ClearFastSimulationManager()
Definition: G4Region.cc:382
G4MaterialCutsCouple * FindCouple(G4Material *mat)
G4bool BelongsTo(G4VPhysicalVolume *thePhys) const
Definition: G4Region.cc:362
void SetWorld(G4VPhysicalVolume *wp)
Definition: G4Region.cc:346
G4Region * GetParentRegion(G4bool &unique) const
Definition: G4Region.cc:417
G4FastSimulationManager * GetFastSimulationManager() const
void SetProductionCuts(G4ProductionCuts *cut)
void SetUserLimits(G4UserLimits *ul)
void UpdateMaterialList()
Definition: G4Region.cc:324
size_t GetNumberOfMaterials() const
size_t GetNumberOfRootVolumes() const
void RemoveRootLogicalVolume(G4LogicalVolume *lv, G4bool scan=true)
Definition: G4Region.cc:283
G4UserLimits * GetUserLimits() const
void ClearMaterialList()
Definition: G4Region.cc:313