|
||||
File indexing completed on 2025-01-18 09:59:16
0001 // 0002 // ******************************************************************** 0003 // * License and Disclaimer * 0004 // * * 0005 // * The Geant4 software is copyright of the Copyright Holders of * 0006 // * the Geant4 Collaboration. It is provided under the terms and * 0007 // * conditions of the Geant4 Software License, included in the file * 0008 // * LICENSE and available at http://cern.ch/geant4/license . These * 0009 // * include a list of copyright holders. * 0010 // * * 0011 // * Neither the authors of this software system, nor their employing * 0012 // * institutes,nor the agencies providing financial support for this * 0013 // * work make any representation or warranty, express or implied, * 0014 // * regarding this software system or assume any liability for its * 0015 // * use. Please see the license in the file LICENSE and URL above * 0016 // * for the full disclaimer and the limitation of liability. * 0017 // * * 0018 // * This code implementation is the result of the scientific and * 0019 // * technical work of the GEANT4 collaboration. * 0020 // * By using, copying, modifying or distributing the software (or * 0021 // * any work based on the software) you agree to acknowledge its * 0022 // * use in resulting scientific publications, and indicate your * 0023 // * acceptance of all terms of the Geant4 Software license. * 0024 // ******************************************************************** 0025 // 0026 // G4UGenericPolycone 0027 // 0028 // Class description: 0029 // 0030 // Wrapper class for G4GenericPolycone to make use of VecGeom GenericPolycone. 0031 0032 // 30.10.13 G.Cosmo, CERN 0033 // -------------------------------------------------------------------- 0034 #ifndef G4UGENERICPOLYCONE_HH 0035 #define G4UGENERICPOLYCONE_HH 0036 0037 #include "G4UAdapter.hh" 0038 0039 #if ( defined(G4GEOM_USE_USOLIDS) || defined(G4GEOM_USE_PARTIAL_USOLIDS) ) 0040 0041 #include <VecGeom/volumes/UnplacedGenericPolycone.h> 0042 0043 #include "G4TwoVector.hh" 0044 #include "G4PolyconeSide.hh" 0045 0046 class G4UGenericPolycone : public G4UAdapter<vecgeom::UnplacedGenericPolycone> 0047 { 0048 using Shape_t = vecgeom::UnplacedGenericPolycone; 0049 using Base_t = G4UAdapter<vecgeom::UnplacedGenericPolycone>; 0050 0051 public: 0052 0053 G4UGenericPolycone(const G4String& name, 0054 G4double phiStart, // initial phi starting angle 0055 G4double phiTotal, // total phi angle 0056 G4int numRZ, // number corners in r,z space 0057 const G4double r[], // r coordinate of these corners 0058 const G4double z[] ); // z coordinate of these corners 0059 0060 ~G4UGenericPolycone() override; 0061 0062 G4double GetStartPhi() const; 0063 G4double GetEndPhi() const; 0064 G4double GetSinStartPhi() const; 0065 G4double GetCosStartPhi() const; 0066 G4double GetSinEndPhi() const; 0067 G4double GetCosEndPhi() const; 0068 G4bool IsOpen() const; 0069 G4int GetNumRZCorner() const; 0070 G4PolyconeSideRZ GetCorner(G4int index) const; 0071 0072 inline G4GeometryType GetEntityType() const override; 0073 0074 G4VSolid* Clone() const override; 0075 0076 G4UGenericPolycone(__void__&); 0077 // Fake default constructor for usage restricted to direct object 0078 // persistency for clients requiring preallocation of memory for 0079 // persistifiable objects. 0080 0081 G4UGenericPolycone( const G4UGenericPolycone& source ); 0082 G4UGenericPolycone& operator=(const G4UGenericPolycone& source); 0083 // Copy constructor and assignment operator. 0084 0085 void BoundingLimits(G4ThreeVector& pMin, G4ThreeVector& pMax) const override; 0086 0087 G4bool CalculateExtent(const EAxis pAxis, 0088 const G4VoxelLimits& pVoxelLimit, 0089 const G4AffineTransform& pTransform, 0090 G4double& pMin, G4double& pMax) const override; 0091 0092 G4Polyhedron* CreatePolyhedron() const override; 0093 0094 private: 0095 0096 G4double wrStart; 0097 G4double wrDelta; 0098 std::vector<G4TwoVector> rzcorners; 0099 }; 0100 0101 // -------------------------------------------------------------------- 0102 // Inline methods 0103 // -------------------------------------------------------------------- 0104 0105 inline G4GeometryType G4UGenericPolycone::GetEntityType() const 0106 { 0107 return "G4GenericPolycone"; 0108 } 0109 0110 #endif // G4GEOM_USE_USOLIDS 0111 0112 #endif
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |