File indexing completed on 2025-09-17 08:59:39
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
0030
0031
0032
0033
0034 #ifndef G4UPOLYCONE_HH
0035 #define G4UPOLYCONE_HH
0036
0037 #include "G4UAdapter.hh"
0038
0039 #if ( defined(G4GEOM_USE_USOLIDS) || defined(G4GEOM_USE_PARTIAL_USOLIDS) )
0040
0041 #include <VecGeom/volumes/UnplacedPolycone.h>
0042
0043 #include "G4TwoVector.hh"
0044 #include "G4PolyconeSide.hh"
0045 #include "G4PolyconeHistorical.hh"
0046 #include "G4Polyhedron.hh"
0047
0048 class G4UPolycone : public G4UAdapter<vecgeom::GenericUnplacedPolycone>
0049 {
0050 using Shape_t = vecgeom::GenericUnplacedPolycone;
0051 using Base_t = G4UAdapter<vecgeom::GenericUnplacedPolycone>;
0052
0053 public:
0054
0055 G4UPolycone(const G4String& name,
0056 G4double phiStart,
0057 G4double phiTotal,
0058 G4int numZPlanes,
0059 const G4double zPlane[],
0060 const G4double rInner[],
0061 const G4double rOuter[] );
0062
0063 G4UPolycone(const G4String& name,
0064 G4double phiStart,
0065 G4double phiTotal,
0066 G4int numRZ,
0067 const G4double r[],
0068 const G4double z[] );
0069
0070 ~G4UPolycone() override;
0071
0072 void ComputeDimensions( G4VPVParameterisation* p,
0073 const G4int n,
0074 const G4VPhysicalVolume* pRep) override;
0075
0076 G4VSolid* Clone() const override;
0077
0078 G4double GetStartPhi() const;
0079 G4double GetDeltaPhi() const;
0080 G4double GetEndPhi() const;
0081 G4double GetSinStartPhi() const;
0082 G4double GetCosStartPhi() const;
0083 G4double GetSinEndPhi() const;
0084 G4double GetCosEndPhi() const;
0085 G4bool IsOpen() const;
0086 G4int GetNumRZCorner() const;
0087 G4PolyconeSideRZ GetCorner(G4int index) const;
0088 G4PolyconeHistorical* GetOriginalParameters() const;
0089 void SetOriginalParameters(G4PolyconeHistorical* pars);
0090
0091 G4bool Reset();
0092
0093 inline G4GeometryType GetEntityType() const override;
0094
0095 G4UPolycone( const G4UPolycone& source );
0096 G4UPolycone& operator=( const G4UPolycone& source );
0097
0098
0099 void BoundingLimits(G4ThreeVector& pMin, G4ThreeVector& pMax) const override;
0100
0101 G4bool CalculateExtent(const EAxis pAxis,
0102 const G4VoxelLimits& pVoxelLimit,
0103 const G4AffineTransform& pTransform,
0104 G4double& pMin, G4double& pMax) const override;
0105
0106 G4Polyhedron* CreatePolyhedron() const override;
0107
0108 protected:
0109
0110 void SetOriginalParameters();
0111
0112 G4bool fGenericPcon;
0113 G4PolyconeHistorical fOriginalParameters;
0114
0115 private:
0116
0117 G4double wrStart;
0118 G4double wrDelta;
0119 std::vector<G4TwoVector> rzcorners;
0120 };
0121
0122
0123
0124
0125
0126 inline G4GeometryType G4UPolycone::GetEntityType() const
0127 {
0128 return "G4Polycone";
0129 }
0130
0131 #endif
0132
0133 #endif