source: trunk/source/geometry/solids/specific/include/G4EllipticalCone.icc@ 1347

Last change on this file since 1347 was 1337, checked in by garnier, 15 years ago

tag geant4.9.4 beta 1 + modifs locales

File size: 3.6 KB
Line 
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: G4EllipticalCone.icc,v 1.7 2008/11/21 09:26:22 gcosmo Exp $
28// GEANT4 tag $Name: geant4-09-04-beta-01 $
29//
30//
31// --------------------------------------------------------------------
32// GEANT 4 inline definitions file
33//
34// G4EllipticalCone.icc
35//
36// Implementation of inline methods of G4EllipticalCone
37// --------------------------------------------------------------------
38// Author: Dionysios Anninos
39// --------------------------------------------------------------------
40
41inline
42G4double G4EllipticalCone::GetSemiAxisMax () const
43{
44 return ySemiAxis > xSemiAxis ? ySemiAxis : xSemiAxis;
45}
46
47inline
48G4double G4EllipticalCone::GetSemiAxisX () const
49{
50 return xSemiAxis;
51}
52
53inline
54G4double G4EllipticalCone::GetSemiAxisY () const
55{
56 return ySemiAxis;
57}
58
59inline
60G4double G4EllipticalCone::GetZMax() const
61{
62 return zheight;
63}
64
65inline
66G4double G4EllipticalCone::GetZTopCut() const
67{
68 return zTopCut;
69}
70
71inline
72void G4EllipticalCone::SetSemiAxis (G4double newxSemiAxis,
73 G4double newySemiAxis,
74 G4double newzMax)
75{
76 xSemiAxis = newxSemiAxis;
77 ySemiAxis = newySemiAxis;
78 zheight = newzMax;
79 semiAxisMax = xSemiAxis > ySemiAxis ? xSemiAxis : ySemiAxis;
80 if (zTopCut > +zheight) { zTopCut = +zheight; }
81}
82
83inline
84void G4EllipticalCone::SetZCut (G4double newzTopCut)
85{
86 if (newzTopCut > +zheight)
87 { zTopCut = +zheight; }
88 else
89 { zTopCut = newzTopCut; }
90}
91
92inline
93G4double G4EllipticalCone::GetCubicVolume()
94{
95 if(fCubicVolume != 0 ) {;}
96 else
97 {
98 if (zTopCut > +zheight )
99 {
100 fCubicVolume = (8./3.)*pi*xSemiAxis*ySemiAxis*zheight*zheight*zheight;
101 }
102 else
103 {
104 fCubicVolume = pi*xSemiAxis*ySemiAxis*
105 (2./3.*std::pow(zTopCut,3.)+2.*sqr(zheight)*zTopCut);
106 }
107 }
108 return fCubicVolume;
109}
110
111inline
112G4double G4EllipticalCone::GetSurfaceArea()
113{
114 if(fSurfaceArea != 0.) {;}
115 else { fSurfaceArea = G4VSolid::GetSurfaceArea(); }
116 return fSurfaceArea;
117}
Note: See TracBrowser for help on using the repository browser.