Geant4-11
pyG4LogicalVolume.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// pyG4LogicalVolume.cc
28//
29// 2005 Q
30// ====================================================================
31#include <boost/python.hpp>
32#include "G4Version.hh"
33#include "G4LogicalVolume.hh"
34#include "G4Material.hh"
35#include "G4VSolid.hh"
36#include "G4FieldManager.hh"
38#include "G4UserLimits.hh"
39#include "G4SmartVoxelHeader.hh"
42#include "G4VisAttributes.hh"
43
44using namespace boost::python;
45
46// ====================================================================
47// thin wrappers
48// ====================================================================
50
53
56
58
61
62BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(f_GetMass, GetMass, 0, 3)
63
64}
65
66using namespace pyG4LogicalVolume;
67
68// ====================================================================
69// module definition
70// ====================================================================
72{
73 class_<G4LogicalVolume, G4LogicalVolume*, boost::noncopyable>
74 ("G4LogicalVolume", "logical volume class", no_init)
75 // constructors
76 .def(init<G4VSolid*, G4Material*, const G4String& >())
77 .def(init<G4VSolid*, G4Material*, const G4String&,
78 G4FieldManager* >())
79 .def(init<G4VSolid*, G4Material*, const G4String&,
81 .def(init<G4VSolid*, G4Material*, const G4String&,
83 G4UserLimits* >())
84 .def(init<G4VSolid*, G4Material*, const G4String&,
86 G4UserLimits*, G4bool >())
87 // ---
88 .def("GetName", &G4LogicalVolume::GetName,
89 return_value_policy<reference_existing_object>())
90 .def("SetName", &G4LogicalVolume::SetName)
91 // ---
92 .def("GetNoDaughters", &G4LogicalVolume::GetNoDaughters)
93 .def("GetDaughter", &G4LogicalVolume::GetDaughter,
94 return_internal_reference<>())
95 .def("AddDaughter", &G4LogicalVolume::AddDaughter)
96 .def("IsDaughter", &G4LogicalVolume::IsDaughter)
97 .def("IsAncestor", &G4LogicalVolume::IsAncestor)
98 .def("RemoveDaughter", &G4LogicalVolume::RemoveDaughter)
99 .def("ClearDaughters", &G4LogicalVolume::ClearDaughters)
100 .def("TotalVolumeEntities", &G4LogicalVolume::TotalVolumeEntities)
101 // ----
102 .def("GetSolid", f1_GetSolid,
103 return_internal_reference<>())
104 .def("SetSolid", f1_SetSolid)
105 .def("GetMaterial", &G4LogicalVolume::GetMaterial,
106 return_internal_reference<>())
107 .def("SetMaterial", &G4LogicalVolume::SetMaterial)
108 .def("UpdateMaterial", &G4LogicalVolume::UpdateMaterial)
109 // ---
110 .def("GetMass", &G4LogicalVolume::GetMass, f_GetMass())
111 .def("GetFieldManager", &G4LogicalVolume::GetFieldManager,
112 return_internal_reference<>())
113 .def("SetFieldManager", &G4LogicalVolume::SetFieldManager)
114 .def("GetSensitiveDetector", &G4LogicalVolume::GetSensitiveDetector,
115 return_internal_reference<>())
116 .def("SetSensitiveDetector", &G4LogicalVolume::SetSensitiveDetector)
117 .def("GetUserLimits", &G4LogicalVolume::GetUserLimits,
118 return_internal_reference<>())
119 .def("SetUserLimits", &G4LogicalVolume::SetUserLimits)
120 // ---
121 .def("GetVoxelHeader", &G4LogicalVolume::GetVoxelHeader,
122 return_internal_reference<>())
123 .def("SetVoxelHeader", &G4LogicalVolume::SetVoxelHeader)
124 .def("GetSmartless", &G4LogicalVolume::GetSmartless)
125 .def("SetSmartless", &G4LogicalVolume::SetSmartless)
126 .def("IsToOptimise", &G4LogicalVolume::IsToOptimise)
127 .def("SetOptimisation", &G4LogicalVolume::SetOptimisation)
128 // ---
129 .def("IsRootRegion", &G4LogicalVolume::IsRootRegion)
130 .def("SetRegionRootFlag", &G4LogicalVolume::SetRegionRootFlag)
131 .def("IsRegion", &G4LogicalVolume::IsRegion)
132 .def("SetRegion", &G4LogicalVolume::SetRegion)
133 .def("GetRegion", &G4LogicalVolume::GetRegion,
134 return_internal_reference<>())
135 .def("PropagateRegion", &G4LogicalVolume::PropagateRegion)
136 .def("GetMaterialCutsCouple", &G4LogicalVolume::GetMaterialCutsCouple,
137 return_internal_reference<>())
138 .def("SetMaterialCutsCouple", &G4LogicalVolume::SetMaterialCutsCouple)
139 // ---
140 .def("GetVisAttributes", &G4LogicalVolume::GetVisAttributes,
141 return_internal_reference<>())
142 .def("SetVisAttributes", f1_SetVisAttributes)
143 .def("SetVisAttributes", f2_SetVisAttributes)
144 // ---
145 .def("GetFastSimulationManager",
147 return_internal_reference<>())
148 // ---
149 .def("SetBiasWeight", &G4LogicalVolume::SetBiasWeight)
150 .def("GetBiasWeight", &G4LogicalVolume::GetBiasWeight)
151 ;
152}
bool G4bool
Definition: G4Types.hh:86
void SetSmartless(G4double s)
G4VSolid * GetSolid() const
G4double GetMass(G4bool forced=false, G4bool propagate=true, G4Material *parMaterial=nullptr)
const G4VisAttributes * GetVisAttributes() const
void SetName(const G4String &pName)
G4bool IsAncestor(const G4VPhysicalVolume *p) const
void SetFieldManager(G4FieldManager *pFieldMgr, G4bool forceToAllDaughters)
void AddDaughter(G4VPhysicalVolume *p)
void SetUserLimits(G4UserLimits *pULimits)
void SetVoxelHeader(G4SmartVoxelHeader *pVoxel)
G4VSensitiveDetector * GetSensitiveDetector() const
void RemoveDaughter(const G4VPhysicalVolume *p)
void SetRegionRootFlag(G4bool rreg)
void SetRegion(G4Region *reg)
size_t GetNoDaughters() const
G4FastSimulationManager * GetFastSimulationManager() const
G4bool IsRootRegion() const
G4Region * GetRegion() const
G4double GetBiasWeight() const
G4bool IsRegion() const
G4double GetSmartless() const
G4bool IsDaughter(const G4VPhysicalVolume *p) const
G4Material * GetMaterial() const
void PropagateRegion()
G4VPhysicalVolume * GetDaughter(const G4int i) const
G4UserLimits * GetUserLimits() const
G4FieldManager * GetFieldManager() const
void SetVisAttributes(const G4VisAttributes *pVA)
G4int TotalVolumeEntities() const
void SetBiasWeight(G4double w)
G4bool IsToOptimise() const
const G4String & GetName() const
const G4MaterialCutsCouple * GetMaterialCutsCouple() const
void SetMaterial(G4Material *pMaterial)
void SetSolid(G4VSolid *pSolid)
G4SmartVoxelHeader * GetVoxelHeader() const
void SetSensitiveDetector(G4VSensitiveDetector *pSDetector)
void SetOptimisation(G4bool optim)
void SetMaterialCutsCouple(G4MaterialCutsCouple *cuts)
void UpdateMaterial(G4Material *pMaterial)
void(G4LogicalVolume::* f1_SetVisAttributes)(const G4VisAttributes *)
void(G4LogicalVolume::* f2_SetVisAttributes)(const G4VisAttributes &)
void(G4LogicalVolume::* f1_SetSolid)(G4VSolid *)
G4VSolid *(G4LogicalVolume::* f1_GetSolid)() const
BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(f_ClearWaitingStack, ClearWaitingStack, 0, 1) BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(f_GetNWaitingTrack
void export_G4LogicalVolume()