Geant4  10.03.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
pyG4TwistedTubs.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: pyG4TwistedTubs.cc 66892 2013-01-17 10:57:59Z gunter $
27 // ====================================================================
28 // pyG4TwistedTubs.cc
29 //
30 // 2007 Q
31 // ====================================================================
32 #include <boost/python.hpp>
33 #include "G4TwistedTubs.hh"
34 
35 using namespace boost::python;
36 
37 
38 // ====================================================================
39 // thin wrappers
40 // ====================================================================
41 namespace pyG4TwistedTubs {
42 
43 // GetEndInnerRadius
48 
49 // GetOuterRadius
54 
55 
56 // Create Solid
58  G4double twistedangle,
59  G4double endinnerrad,
60  G4double endouterrad,
61  G4double halfzlen,
62  G4double dphi)
63 {
64  return new G4TwistedTubs(name, twistedangle, endinnerrad,
65  endouterrad, halfzlen, dphi);
66 }
67 
69  G4double twistedangle,
70  G4double endinnerrad,
71  G4double endouterrad,
72  G4double halfzlen,
73  G4int nseg,
74  G4double totphi)
75 {
76  return new G4TwistedTubs(name, twistedangle, endinnerrad,
77  endouterrad, halfzlen, nseg, totphi);
78 }
79 
81  G4double twistedangle,
82  G4double innerrad,
83  G4double outerrad,
84  G4double negativeEndz,
85  G4double positiveEndz,
86  G4double dphi)
87 {
88  return new G4TwistedTubs(name, twistedangle, innerrad, outerrad,
89  negativeEndz, positiveEndz, dphi);
90 }
91 
93  G4double twistedangle,
94  G4double innerrad,
95  G4double outerrad,
96  G4double negativeEndz,
97  G4double positiveEndz,
98  G4int nseg,
99  G4double totphi)
100 {
101  return new G4TwistedTubs(name, twistedangle, innerrad, outerrad,
102  negativeEndz, positiveEndz, nseg, totphi);
103 }
104 
105 
106 }
107 
108 using namespace pyG4TwistedTubs;
109 
110 // ====================================================================
111 // module definition
112 // ====================================================================
114 {
115  class_<G4TwistedTubs, G4TwistedTubs*, bases<G4VSolid> >
116  ("G4TwistedTubs", "twisted tube solid class", no_init)
117  // constructors
118  .def(init<const G4String&, G4double, G4double, G4double,
119  G4double, G4double>())
120  .def(init<const G4String&, G4double, G4double, G4double,
121  G4double, G4int, G4double>())
122  .def(init<const G4String&, G4double, G4double, G4double,
124  .def(init<const G4String&, G4double, G4double, G4double,
126  // ---
127  .def("GetDPhi", &G4TwistedTubs::GetDPhi)
128  .def("GetPhiTwist", &G4TwistedTubs::GetPhiTwist)
129  .def("GetInnerRadius", &G4TwistedTubs::GetInnerRadius)
130  .def("GetOuterRadius", &G4TwistedTubs::GetOuterRadius)
131  .def("GetInnerStereo", &G4TwistedTubs::GetInnerStereo)
132  .def("GetOuterStereo", &G4TwistedTubs::GetOuterStereo)
133  .def("GetZHalfLength", &G4TwistedTubs::GetZHalfLength)
134  .def("GetKappa", &G4TwistedTubs::GetKappa)
135  .def("GetTanInnerStereo", &G4TwistedTubs::GetTanInnerStereo)
136  .def("GetTanInnerStereo2", &G4TwistedTubs::GetTanInnerStereo2)
137  .def("GetTanOuterStereo", &G4TwistedTubs::GetTanOuterStereo)
138  .def("GetTanOuterStereo2", &G4TwistedTubs::GetTanOuterStereo2)
139  .def("GetEndZ", &G4TwistedTubs::GetEndZ)
140  .def("GetEndPhi", &G4TwistedTubs::GetEndPhi)
141  .def("GetEndInnerRadius", f1_GetEndInnerRadius)
142  .def("GetEndInnerRadius", f2_GetEndInnerRadius)
143  .def("GetEndOuterRadius", f1_GetEndOuterRadius)
144  .def("GetEndOuterRadius", f2_GetEndOuterRadius)
145  // operators
146  .def(self_ns::str(self))
147  ;
148 
149  // Create solid
150  def("CreateTwistedTubs", f1_CreateTwistedTubs,
151  return_value_policy<manage_new_object>());
152  def("CreateTwistedTubs", f2_CreateTwistedTubs,
153  return_value_policy<manage_new_object>());
154  def("CreateTwistedTubs", f3_CreateTwistedTubs,
155  return_value_policy<manage_new_object>());
156  def("CreateTwistedTubs", f4_CreateTwistedTubs,
157  return_value_policy<manage_new_object>());
158 
159 }
160 
const XML_Char * name
Definition: expat.h:151
G4TwistedTubs * f1_CreateTwistedTubs(const G4String &name, G4double twistedangle, G4double endinnerrad, G4double endouterrad, G4double halfzlen, G4double dphi)
G4double GetEndInnerRadius() const
G4double GetEndPhi(G4int i) const
G4double GetOuterStereo() const
G4double(G4TwistedTubs::* f1_GetEndInnerRadius)(G4int) const
G4double GetKappa() const
G4double GetInnerRadius() const
int G4int
Definition: G4Types.hh:78
G4double GetEndOuterRadius() const
G4double GetPhiTwist() const
G4TwistedTubs * f3_CreateTwistedTubs(const G4String &name, G4double twistedangle, G4double innerrad, G4double outerrad, G4double negativeEndz, G4double positiveEndz, G4double dphi)
G4double GetTanInnerStereo() const
G4double GetDPhi() const
G4double GetTanInnerStereo2() const
G4TwistedTubs * f2_CreateTwistedTubs(const G4String &name, G4double twistedangle, G4double endinnerrad, G4double endouterrad, G4double halfzlen, G4int nseg, G4double totphi)
G4double(G4TwistedTubs::* f2_GetEndInnerRadius)(G4int) const
G4double GetTanOuterStereo() const
G4TwistedTubs * f4_CreateTwistedTubs(const G4String &name, G4double twistedangle, G4double innerrad, G4double outerrad, G4double negativeEndz, G4double positiveEndz, G4int nseg, G4double totphi)
G4double GetZHalfLength() const
G4double GetEndZ(G4int i) const
G4double GetTanOuterStereo2() const
G4double GetInnerStereo() const
G4double(G4TwistedTubs::* f2_GetEndOuterRadius)() const
G4double(G4TwistedTubs::* f1_GetEndOuterRadius)(G4int) const
void export_G4TwistedTubs()
double G4double
Definition: G4Types.hh:76
G4double GetOuterRadius() const