Warning, file /include/Geant4/G4UPara.hh was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
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 G4UPARA_HH
0035 #define G4UPARA_HH
0036
0037 #include "G4UAdapter.hh"
0038
0039 #if ( defined(G4GEOM_USE_USOLIDS) || defined(G4GEOM_USE_PARTIAL_USOLIDS) )
0040
0041 #include <VecGeom/volumes/UnplacedParallelepiped.h>
0042
0043 #include "G4Polyhedron.hh"
0044
0045 class G4UPara : public G4UAdapter<vecgeom::UnplacedParallelepiped>
0046 {
0047 using Shape_t = vecgeom::UnplacedParallelepiped;
0048 using Base_t = G4UAdapter<vecgeom::UnplacedParallelepiped>;
0049
0050 public:
0051
0052 G4UPara(const G4String& pName,
0053 G4double pDx, G4double pDy, G4double pDz,
0054 G4double pAlpha, G4double pTheta, G4double pPhi);
0055
0056 G4UPara(const G4String& pName,
0057 const G4ThreeVector pt[8]);
0058
0059 ~G4UPara() override;
0060
0061
0062
0063 G4double GetZHalfLength() const;
0064 G4double GetYHalfLength() const;
0065 G4double GetXHalfLength() const;
0066 G4ThreeVector GetSymAxis() const;
0067 G4double GetTanAlpha() const;
0068
0069 G4double GetAlpha() const;
0070 G4double GetTheta() const;
0071 G4double GetPhi() const;
0072
0073
0074
0075
0076 void SetXHalfLength(G4double val);
0077 void SetYHalfLength(G4double val);
0078 void SetZHalfLength(G4double val);
0079 void SetAlpha(G4double alpha);
0080 void SetTanAlpha(G4double val);
0081 void SetThetaAndPhi(double pTheta, double pPhi);
0082
0083 void SetAllParameters(G4double pDx, G4double pDy, G4double pDz,
0084 G4double pAlpha, G4double pTheta, G4double pPhi);
0085
0086 void ComputeDimensions(G4VPVParameterisation* p,
0087 const G4int n,
0088 const G4VPhysicalVolume* pRep) override;
0089
0090 inline G4GeometryType GetEntityType() const override;
0091
0092 inline G4bool IsFaceted() const override;
0093
0094 void BoundingLimits(G4ThreeVector& pMin, G4ThreeVector& pMax) const override;
0095
0096 G4bool CalculateExtent(const EAxis pAxis,
0097 const G4VoxelLimits& pVoxelLimit,
0098 const G4AffineTransform& pTransform,
0099 G4double& pMin, G4double& pMax) const override;
0100
0101 G4VSolid* Clone() const override;
0102
0103 G4Polyhedron* CreatePolyhedron () const override;
0104
0105 G4UPara(const G4UPara& rhs);
0106 G4UPara& operator=(const G4UPara& rhs);
0107
0108
0109 private:
0110
0111 void CheckParameters();
0112
0113
0114 void MakePlanes();
0115
0116
0117 private:
0118
0119 G4double fTalpha,fTthetaCphi,fTthetaSphi;
0120 struct { G4double a,b,c,d; } fPlanes[4];
0121 };
0122
0123
0124
0125
0126
0127 inline G4GeometryType G4UPara::GetEntityType() const
0128 {
0129 return "G4Para";
0130 }
0131
0132 inline G4bool G4UPara::IsFaceted() const
0133 {
0134 return true;
0135 }
0136
0137 #endif
0138
0139 #endif