Geant4  10.02
G4UParaboloid.hh
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 // $Id:$
28 //
29 //
30 // --------------------------------------------------------------------
31 // GEANT 4 class header file
32 //
33 //
34 // G4UParaboloid
35 //
36 // Class description:
37 //
38 // Wrapper class for UParaboloid to make use of it from USolids module.
39 
40 // History:
41 // 19.08.15 Guilherme Lima, FNAL
42 // --------------------------------------------------------------------
43 #ifndef G4UPARABOLOID_HH
44 #define G4UPARABOLOID_HH
45 
46 #include "G4USolid.hh"
47 
48 #if defined(G4GEOM_USE_USOLIDS)
49 
50 #include "UParaboloid.hh"
51 #include "G4Polyhedron.hh"
52 
53 class G4UParaboloid : public G4USolid {
54 
55 public: // with description
56 
57  G4UParaboloid(const G4String& name, G4double dz, G4double rlo, G4double rhi);
58 
59  ~G4UParaboloid();
60 
61  G4VSolid* Clone() const;
62 
63  inline UParaboloid* GetShape() const;
64 
65  inline G4double GetZHalfLength() const;
66  inline G4double GetRadiusMinusZ() const;
67  inline G4double GetRadiusPlusZ() const;
68 
69  // inline G4bool Reset();
70 
71 public: // without description
72 
73  G4UParaboloid(__void__&);
74  // Fake default constructor for usage restricted to direct object
75  // persistency for clients requiring preallocation of memory for
76  // persistifiable objects.
77 
78  G4UParaboloid( const G4UParaboloid &source );
79  G4UParaboloid &operator=( const G4UParaboloid &source );
80  // Copy constructor and assignment operator.
81  // G4Polyhedron* CreatePolyhedron() const;
82 };
83 
84 // --------------------------------------------------------------------
85 // Inline methods
86 // --------------------------------------------------------------------
87 
88 inline UParaboloid* G4UParaboloid::GetShape() const
89 {
90  return (UParaboloid*) fShape;
91 }
92 
93 inline G4double G4UParaboloid::GetZHalfLength() const {
94  return GetShape()->GetDz();
95 }
96 inline G4double G4UParaboloid::GetRadiusMinusZ() const {
97  return GetShape()->GetRlo();
98 }
99 inline G4double G4UParaboloid::GetRadiusPlusZ() const {
100  return GetShape()->GetRhi();
101 }
102 // inline G4ParaboloidHistorical* G4UParaboloid::GetOriginalParameters() const
103 // {
104 // UParaboloidHistorical* pars = GetShape()->GetOriginalParameters();
105 // G4ParaboloidHistorical* pdata = new G4ParaboloidHistorical(pars->fNumZPlanes);
106 // pdata->Start_angle = pars->fStartAngle;
107 // pdata->Opening_angle = pars->fOpeningAngle;
108 // for (G4int i=0; i<pars->fNumZPlanes; ++i)
109 // {
110 // pdata->Z_values[i] = pars->fZValues[i];
111 // pdata->Rmin[i] = pars->Rmin[i];
112 // pdata->Rmax[i] = pars->Rmax[i];
113 // }
114 // return pdata;
115 // }
116 // inline void G4UParaboloid::SetOriginalParameters(G4ParaboloidHistorical* pars)
117 // {
118 // UParaboloidHistorical* pdata = GetShape()->GetOriginalParameters();
119 // pdata->fStartAngle = pars->Start_angle;
120 // pdata->fOpeningAngle = pars->Opening_angle;
121 // pdata->fNumZPlanes = pars->Num_z_planes;
122 // for (G4int i=0; i<pdata->fNumZPlanes; ++i)
123 // {
124 // pdata->fZValues[i] = pars->Z_values[i];
125 // pdata->Rmin[i] = pars->Rmin[i];
126 // pdata->Rmax[i] = pars->Rmax[i];
127 // }
128 // fRebuildPolyhedron = true;
129 // }
130 // inline G4bool G4UParaboloid::Reset()
131 // {
132 // GetShape()->Reset();
133 // return 0;
134 // }
135 
136 #endif // G4GEOM_USE_USOLIDS
137 
138 #endif
G4String name
Definition: TRTMaterials.hh:40
double G4double
Definition: G4Types.hh:76