File indexing completed on 2025-01-18 09:58:57
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 #ifndef G4POLYHEDRON_HH
0029 #define G4POLYHEDRON_HH
0030
0031
0032
0033
0034
0035
0036
0037
0038
0039
0040
0041
0042
0043
0044
0045
0046
0047
0048
0049
0050
0051
0052
0053
0054
0055
0056
0057
0058
0059
0060
0061
0062
0063
0064
0065
0066
0067
0068
0069
0070
0071
0072
0073
0074
0075
0076
0077
0078
0079
0080
0081
0082
0083
0084
0085
0086
0087
0088
0089
0090
0091
0092
0093
0094
0095
0096
0097
0098
0099
0100
0101
0102
0103
0104
0105
0106
0107
0108
0109
0110
0111
0112
0113
0114
0115
0116
0117
0118
0119
0120
0121
0122
0123
0124
0125
0126
0127
0128 #include "globals.hh"
0129 #include "HepPolyhedron.h"
0130 #include "G4Visible.hh"
0131
0132 class G4Polyhedron : public HepPolyhedron, public G4Visible {
0133 public:
0134
0135 G4Polyhedron ();
0136
0137
0138 G4Polyhedron (G4int Nvert, G4int Nface);
0139 G4Polyhedron (const HepPolyhedron& from);
0140
0141
0142 G4Polyhedron (const G4Polyhedron& from) = default;
0143 G4Polyhedron (G4Polyhedron&& from) = default;
0144
0145
0146 G4Polyhedron & operator=(const G4Polyhedron & from) = default;
0147 G4Polyhedron & operator=(G4Polyhedron && from) = default;
0148
0149
0150 ~G4Polyhedron () override;
0151
0152 G4int GetNumberOfRotationStepsAtTimeOfCreation() const {
0153 return fNumberOfRotationStepsAtTimeOfCreation;
0154 }
0155 private:
0156 G4int fNumberOfRotationStepsAtTimeOfCreation = fNumberOfRotationSteps;
0157 };
0158
0159 class G4PolyhedronBox: public G4Polyhedron {
0160 public:
0161 G4PolyhedronBox (G4double dx, G4double dy, G4double dz);
0162 ~G4PolyhedronBox () override;
0163 };
0164
0165 class G4PolyhedronCone: public G4Polyhedron {
0166 public:
0167 G4PolyhedronCone (G4double Rmn1, G4double Rmx1,
0168 G4double Rmn2, G4double Rmx2, G4double Dz);
0169 ~G4PolyhedronCone () override;
0170 };
0171
0172 class G4PolyhedronCons: public G4Polyhedron {
0173 public:
0174 G4PolyhedronCons (G4double Rmn1, G4double Rmx1,
0175 G4double Rmn2, G4double Rmx2, G4double Dz,
0176 G4double Phi1, G4double Dphi);
0177 ~G4PolyhedronCons () override;
0178 };
0179
0180 class G4PolyhedronPara: public G4Polyhedron {
0181 public:
0182 G4PolyhedronPara (G4double Dx, G4double Dy, G4double Dz,
0183 G4double Alpha, G4double Theta, G4double Phi);
0184 ~G4PolyhedronPara () override;
0185 };
0186
0187 class G4PolyhedronPcon: public G4Polyhedron {
0188 public:
0189 G4PolyhedronPcon (G4double phi, G4double dphi, G4int nz,
0190 const G4double *z,
0191 const G4double *rmin,
0192 const G4double *rmax);
0193 G4PolyhedronPcon (G4double phi, G4double dphi,
0194 const std::vector<G4TwoVector> &rz);
0195 ~G4PolyhedronPcon () override;
0196 };
0197
0198 class G4PolyhedronPgon: public G4Polyhedron {
0199 public:
0200 G4PolyhedronPgon (G4double phi, G4double dphi, G4int npdv, G4int nz,
0201 const G4double *z,
0202 const G4double *rmin,
0203 const G4double *rmax);
0204 G4PolyhedronPgon (G4double phi, G4double dphi, G4int npdv,
0205 const std::vector<G4TwoVector> &rz);
0206
0207 ~G4PolyhedronPgon () override;
0208 };
0209
0210 class G4PolyhedronSphere: public G4Polyhedron {
0211 public:
0212 G4PolyhedronSphere (G4double rmin, G4double rmax,
0213 G4double phi, G4double dphi,
0214 G4double the, G4double dthe);
0215 ~G4PolyhedronSphere () override;
0216 };
0217
0218 class G4PolyhedronTet: public G4Polyhedron {
0219 public:
0220 G4PolyhedronTet (const G4double p0[3],
0221 const G4double p1[3],
0222 const G4double p2[3],
0223 const G4double p3[3]);
0224 ~G4PolyhedronTet () override;
0225 };
0226
0227 class G4PolyhedronTorus: public G4Polyhedron {
0228 public:
0229 G4PolyhedronTorus (G4double rmin, G4double rmax, G4double rtor,
0230 G4double phi, G4double dphi);
0231 ~G4PolyhedronTorus () override;
0232 };
0233
0234 class G4PolyhedronTrap: public G4Polyhedron {
0235 public:
0236 G4PolyhedronTrap (G4double Dz, G4double Theta, G4double Phi,
0237 G4double Dy1,
0238 G4double Dx1, G4double Dx2, G4double Alp1,
0239 G4double Dy2,
0240 G4double Dx3, G4double Dx4, G4double Alp2);
0241 ~G4PolyhedronTrap () override;
0242 };
0243
0244 class G4PolyhedronTrd1: public G4Polyhedron {
0245 public:
0246 G4PolyhedronTrd1 (G4double Dx1, G4double Dx2,
0247 G4double Dy, G4double Dz);
0248 ~G4PolyhedronTrd1 () override;
0249 };
0250
0251 class G4PolyhedronTrd2: public G4Polyhedron {
0252 public:
0253 G4PolyhedronTrd2 (G4double Dx1, G4double Dx2,
0254 G4double Dy1, G4double Dy2, G4double Dz);
0255 ~G4PolyhedronTrd2 () override;
0256 };
0257
0258 class G4PolyhedronTube: public G4Polyhedron {
0259 public:
0260 G4PolyhedronTube (G4double Rmin, G4double Rmax, G4double Dz);
0261 ~G4PolyhedronTube () override;
0262 };
0263
0264 class G4PolyhedronTubs: public G4Polyhedron {
0265 public:
0266 G4PolyhedronTubs (G4double Rmin, G4double Rmax, G4double Dz,
0267 G4double Phi1, G4double Dphi);
0268 ~G4PolyhedronTubs () override;
0269 };
0270
0271 class G4PolyhedronParaboloid: public G4Polyhedron {
0272 public:
0273 G4PolyhedronParaboloid(G4double r1, G4double r2, G4double dz,
0274 G4double sPhi, G4double dPhi);
0275 ~G4PolyhedronParaboloid () override;
0276 };
0277
0278 class G4PolyhedronHype: public G4Polyhedron {
0279 public:
0280 G4PolyhedronHype(G4double r1, G4double r2, G4double tan1,
0281 G4double tan2, G4double halfZ);
0282 ~G4PolyhedronHype () override;
0283 };
0284
0285 class G4PolyhedronEllipsoid : public G4Polyhedron {
0286 public:
0287 G4PolyhedronEllipsoid(G4double dx, G4double dy, G4double dz,
0288 G4double zcut1, G4double zcut2);
0289 ~G4PolyhedronEllipsoid () override;
0290 };
0291
0292 class G4PolyhedronEllipticalCone : public G4Polyhedron {
0293 public:
0294 G4PolyhedronEllipticalCone(G4double dx, G4double dy, G4double z,
0295 G4double zcut1);
0296 ~G4PolyhedronEllipticalCone () override;
0297 };
0298
0299 class G4PolyhedronHyperbolicMirror : public G4Polyhedron {
0300 public:
0301 G4PolyhedronHyperbolicMirror(G4double a, G4double h, G4double r);
0302 ~G4PolyhedronHyperbolicMirror () override;
0303 };
0304
0305 class G4PolyhedronTetMesh : public G4Polyhedron {
0306 public:
0307 G4PolyhedronTetMesh(const std::vector<G4ThreeVector>& tetrahedra);
0308 ~G4PolyhedronTetMesh () override;
0309 };
0310
0311 class G4PolyhedronBoxMesh : public G4Polyhedron {
0312 public:
0313 G4PolyhedronBoxMesh(G4double sizeX, G4double sizeY, G4double sizeZ,
0314 const std::vector<G4ThreeVector>& positions);
0315
0316 ~G4PolyhedronBoxMesh () override;
0317 };
0318
0319 std::ostream& operator<<(std::ostream& os, const G4Polyhedron&);
0320
0321 #endif