00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060 #ifndef G4Polycone_hh
00061 #define G4Polycone_hh
00062
00063 #include "G4VCSGfaceted.hh"
00064 #include "G4PolyconeSide.hh"
00065
00066 class G4EnclosingCylinder;
00067 class G4ReduciblePolygon;
00068 class G4VCSGface;
00069 class G4PolyconeHistorical
00070 {
00071 public:
00072 G4PolyconeHistorical();
00073 ~G4PolyconeHistorical();
00074 G4PolyconeHistorical( const G4PolyconeHistorical& source );
00075 G4PolyconeHistorical& operator=( const G4PolyconeHistorical& right );
00076
00077 G4double Start_angle;
00078 G4double Opening_angle;
00079 G4int Num_z_planes;
00080 G4double *Z_values;
00081 G4double *Rmin;
00082 G4double *Rmax;
00083 };
00084
00085 class G4Polycone : public G4VCSGfaceted
00086 {
00087
00088 public:
00089
00090 G4Polycone( const G4String& name,
00091 G4double phiStart,
00092 G4double phiTotal,
00093 G4int numZPlanes,
00094 const G4double zPlane[],
00095 const G4double rInner[],
00096 const G4double rOuter[] );
00097
00098 G4Polycone( const G4String& name,
00099 G4double phiStart,
00100 G4double phiTotal,
00101 G4int numRZ,
00102 const G4double r[],
00103 const G4double z[] );
00104
00105 virtual ~G4Polycone();
00106
00107
00108
00109 EInside Inside( const G4ThreeVector &p ) const;
00110 G4double DistanceToIn( const G4ThreeVector &p, const G4ThreeVector &v ) const;
00111 G4double DistanceToIn( const G4ThreeVector &p ) const;
00112
00113 G4ThreeVector GetPointOnSurface() const;
00114
00115 void ComputeDimensions( G4VPVParameterisation* p,
00116 const G4int n,
00117 const G4VPhysicalVolume* pRep );
00118
00119 G4GeometryType GetEntityType() const;
00120
00121 G4VSolid* Clone() const;
00122
00123 std::ostream& StreamInfo(std::ostream& os) const;
00124
00125 G4Polyhedron* CreatePolyhedron() const;
00126 G4NURBS* CreateNURBS() const;
00127
00128 G4bool Reset();
00129
00130
00131
00132 inline G4double GetStartPhi() const;
00133 inline G4double GetEndPhi() const;
00134 inline G4bool IsOpen() const;
00135 inline G4bool IsGeneric() const;
00136 inline G4int GetNumRZCorner() const;
00137 inline G4PolyconeSideRZ GetCorner(G4int index) const;
00138 inline G4PolyconeHistorical* GetOriginalParameters() const;
00139 inline void SetOriginalParameters(G4PolyconeHistorical* pars);
00140
00141 public:
00142
00143 G4Polycone(__void__&);
00144
00145
00146
00147
00148 G4Polycone( const G4Polycone &source );
00149 const G4Polycone &operator=( const G4Polycone &source );
00150
00151
00152 protected:
00153
00154
00155
00156 inline void SetOriginalParameters();
00157
00158 void Create( G4double phiStart,
00159 G4double phiTotal,
00160 G4ReduciblePolygon *rz );
00161
00162 void CopyStuff( const G4Polycone &source );
00163
00164
00165
00166 G4ThreeVector GetPointOnCone(G4double fRmin1, G4double fRmax1,
00167 G4double fRmin2, G4double fRmax2,
00168 G4double zOne, G4double zTwo,
00169 G4double& totArea) const;
00170
00171 G4ThreeVector GetPointOnTubs(G4double fRMin, G4double fRMax,
00172 G4double zOne, G4double zTwo,
00173 G4double& totArea) const;
00174
00175 G4ThreeVector GetPointOnCut(G4double fRMin1, G4double fRMax1,
00176 G4double fRMin2, G4double fRMax2,
00177 G4double zOne, G4double zTwo,
00178 G4double& totArea) const;
00179
00180 G4ThreeVector GetPointOnRing(G4double fRMin, G4double fRMax,
00181 G4double fRMin2, G4double fRMax2,
00182 G4double zOne) const;
00183
00184 protected:
00185
00186
00187
00188 G4double startPhi;
00189 G4double endPhi;
00190 G4bool phiIsOpen;
00191 G4bool genericPcon;
00192 G4int numCorner;
00193 G4PolyconeSideRZ *corners;
00194 G4PolyconeHistorical *original_parameters;
00195
00196
00197
00198 G4EnclosingCylinder *enclosingCylinder;
00199
00200 };
00201
00202 #include "G4Polycone.icc"
00203
00204 #endif