ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
pyG4TwistedTubs.cc
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file pyG4TwistedTubs.cc
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 // pyG4TwistedTubs.cc
28 //
29 // 2007 Q
30 // ====================================================================
31 #include <boost/python.hpp>
32 #include "G4TwistedTubs.hh"
33 
34 using namespace boost::python;
35 
36 
37 // ====================================================================
38 // thin wrappers
39 // ====================================================================
40 namespace pyG4TwistedTubs {
41 
42 // GetEndInnerRadius
47 
48 // GetOuterRadius
53 
54 
55 // Create Solid
57  G4double twistedangle,
58  G4double endinnerrad,
59  G4double endouterrad,
60  G4double halfzlen,
61  G4double dphi)
62 {
63  return new G4TwistedTubs(name, twistedangle, endinnerrad,
64  endouterrad, halfzlen, dphi);
65 }
66 
68  G4double twistedangle,
69  G4double endinnerrad,
70  G4double endouterrad,
71  G4double halfzlen,
72  G4int nseg,
73  G4double totphi)
74 {
75  return new G4TwistedTubs(name, twistedangle, endinnerrad,
76  endouterrad, halfzlen, nseg, totphi);
77 }
78 
80  G4double twistedangle,
83  G4double negativeEndz,
84  G4double positiveEndz,
85  G4double dphi)
86 {
87  return new G4TwistedTubs(name, twistedangle, innerrad, outerrad,
88  negativeEndz, positiveEndz, dphi);
89 }
90 
92  G4double twistedangle,
95  G4double negativeEndz,
96  G4double positiveEndz,
97  G4int nseg,
98  G4double totphi)
99 {
100  return new G4TwistedTubs(name, twistedangle, innerrad, outerrad,
101  negativeEndz, positiveEndz, nseg, totphi);
102 }
103 
104 
105 }
106 
107 using namespace pyG4TwistedTubs;
108 
109 // ====================================================================
110 // module definition
111 // ====================================================================
113 {
114  class_<G4TwistedTubs, G4TwistedTubs*, bases<G4VSolid> >
115  ("G4TwistedTubs", "twisted tube solid class", no_init)
116  // constructors
117  .def(init<const G4String&, G4double, G4double, G4double,
118  G4double, G4double>())
119  .def(init<const G4String&, G4double, G4double, G4double,
120  G4double, G4int, G4double>())
121  .def(init<const G4String&, G4double, G4double, G4double,
123  .def(init<const G4String&, G4double, G4double, G4double,
125  // ---
126  .def("GetDPhi", &G4TwistedTubs::GetDPhi)
127  .def("GetPhiTwist", &G4TwistedTubs::GetPhiTwist)
128  .def("GetInnerRadius", &G4TwistedTubs::GetInnerRadius)
129  .def("GetOuterRadius", &G4TwistedTubs::GetOuterRadius)
130  .def("GetInnerStereo", &G4TwistedTubs::GetInnerStereo)
131  .def("GetOuterStereo", &G4TwistedTubs::GetOuterStereo)
132  .def("GetZHalfLength", &G4TwistedTubs::GetZHalfLength)
133  .def("GetKappa", &G4TwistedTubs::GetKappa)
134  .def("GetTanInnerStereo", &G4TwistedTubs::GetTanInnerStereo)
135  .def("GetTanInnerStereo2", &G4TwistedTubs::GetTanInnerStereo2)
136  .def("GetTanOuterStereo", &G4TwistedTubs::GetTanOuterStereo)
137  .def("GetTanOuterStereo2", &G4TwistedTubs::GetTanOuterStereo2)
138  .def("GetEndZ", &G4TwistedTubs::GetEndZ)
139  .def("GetEndPhi", &G4TwistedTubs::GetEndPhi)
140  .def("GetEndInnerRadius", f1_GetEndInnerRadius)
141  .def("GetEndInnerRadius", f2_GetEndInnerRadius)
142  .def("GetEndOuterRadius", f1_GetEndOuterRadius)
143  .def("GetEndOuterRadius", f2_GetEndOuterRadius)
144  // operators
145  .def(self_ns::str(self))
146  ;
147 
148  // Create solid
149  def("CreateTwistedTubs", f1_CreateTwistedTubs,
150  return_value_policy<manage_new_object>());
151  def("CreateTwistedTubs", f2_CreateTwistedTubs,
152  return_value_policy<manage_new_object>());
153  def("CreateTwistedTubs", f3_CreateTwistedTubs,
154  return_value_policy<manage_new_object>());
155  def("CreateTwistedTubs", f4_CreateTwistedTubs,
156  return_value_policy<manage_new_object>());
157 
158 }
159