LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
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"
36 #include "G4VUserRegionInformation.hh"
37 #include "G4UserLimits.hh"
38 #include "G4MaterialCutsCouple.hh"
39 #include "G4FastSimulationManager.hh"
40 
41 using 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  }
void export_G4Region()
Definition: pyG4Region.cc:46