File indexing completed on 2025-01-18 09:58:24
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029 inline
0030 G4double G4Hype::GetInnerRadius () const
0031 {
0032 return innerRadius;
0033 }
0034
0035 inline
0036 G4double G4Hype::GetOuterRadius () const
0037 {
0038 return outerRadius;
0039 }
0040
0041 inline
0042 G4double G4Hype::GetZHalfLength () const
0043 {
0044 return halfLenZ;
0045 }
0046
0047 inline
0048 G4double G4Hype::GetInnerStereo () const
0049 {
0050 return innerStereo;
0051 }
0052
0053 inline
0054 G4double G4Hype::GetOuterStereo () const
0055 {
0056 return outerStereo;
0057 }
0058
0059 inline
0060 void G4Hype::SetInnerRadius (G4double newIRad)
0061 {
0062 innerRadius = newIRad;
0063 innerRadius2 = newIRad*newIRad;
0064 endInnerRadius2 = HypeInnerRadius2(halfLenZ);
0065 endInnerRadius = std::sqrt(endInnerRadius2);
0066 fCubicVolume = 0.;
0067 fRebuildPolyhedron = true;
0068 }
0069
0070 inline
0071 void G4Hype::SetOuterRadius (G4double newORad)
0072 {
0073 outerRadius = newORad;
0074 outerRadius2 = newORad*newORad;
0075 endOuterRadius2 = HypeOuterRadius2(halfLenZ);
0076 endOuterRadius = std::sqrt(endOuterRadius2);
0077 fCubicVolume = 0.;
0078 fRebuildPolyhedron = true;
0079 }
0080
0081 inline
0082 void G4Hype::SetZHalfLength (G4double newHLZ)
0083 {
0084 halfLenZ = newHLZ ;
0085 fCubicVolume = 0.;
0086 fRebuildPolyhedron = true;
0087 }
0088
0089 inline
0090 void G4Hype::SetInnerStereo (G4double newISte)
0091 {
0092 innerStereo = std::fabs(newISte);
0093 tanInnerStereo = std::tan(innerStereo);
0094 tanInnerStereo2 = tanInnerStereo*tanInnerStereo;
0095 endInnerRadius2 = HypeInnerRadius2(halfLenZ);
0096 endInnerRadius = std::sqrt(endInnerRadius2);
0097 fCubicVolume = 0.;
0098 fRebuildPolyhedron = true;
0099 }
0100
0101 inline
0102 void G4Hype::SetOuterStereo (G4double newOSte)
0103 {
0104 outerStereo = std::fabs(newOSte);
0105 tanOuterStereo = std::tan(outerStereo);
0106 tanOuterStereo2 = tanOuterStereo*tanOuterStereo;
0107 endOuterRadius2 = HypeOuterRadius2(halfLenZ);
0108 endOuterRadius = std::sqrt(endOuterRadius2);
0109 fCubicVolume = 0.;
0110 fRebuildPolyhedron = true;
0111 }
0112
0113 inline
0114 G4bool G4Hype::InnerSurfaceExists() const
0115 {
0116 return (innerRadius > DBL_MIN) || (innerStereo != 0);
0117 }
0118
0119 inline
0120 G4double G4Hype::HypeInnerRadius2(G4double zVal) const
0121 {
0122 return (tanInnerStereo2*zVal*zVal+innerRadius2);
0123 }
0124
0125 inline
0126 G4double G4Hype::HypeOuterRadius2(G4double zVal) const
0127 {
0128 return (tanOuterStereo2*zVal*zVal+outerRadius2);
0129 }