Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:59:17

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 // G4UParaboloid
0027 //
0028 // Class description:
0029 //
0030 // Wrapper class for G4Paraboloid to make use of VecGeom Paraboloid.
0031 
0032 // 19.08.15 Guilherme Lima, FNAL
0033 // --------------------------------------------------------------------
0034 #ifndef G4UPARABOLOID_HH
0035 #define G4UPARABOLOID_HH
0036 
0037 #include "G4UAdapter.hh"
0038 
0039 #if ( defined(G4GEOM_USE_USOLIDS) || defined(G4GEOM_USE_PARTIAL_USOLIDS) )
0040 
0041 #include <VecGeom/volumes/UnplacedParaboloid.h>
0042 
0043 #include "G4Polyhedron.hh"
0044 
0045 class G4UParaboloid : public G4UAdapter<vecgeom::UnplacedParaboloid>
0046 {
0047   using Shape_t = vecgeom::UnplacedParaboloid;
0048   using Base_t  = G4UAdapter<vecgeom::UnplacedParaboloid>;
0049 
0050   public:
0051 
0052     G4UParaboloid(const G4String& name, G4double dz,
0053                                         G4double rlo,
0054                                         G4double rhi);
0055    ~G4UParaboloid() override;
0056 
0057     G4VSolid* Clone() const override;
0058 
0059     G4double GetZHalfLength() const;
0060     G4double GetRadiusMinusZ() const;
0061     G4double GetRadiusPlusZ() const;
0062 
0063     void SetZHalfLength(G4double dz);
0064     void SetRadiusMinusZ(G4double r1);
0065     void SetRadiusPlusZ(G4double r2);
0066 
0067     inline G4GeometryType GetEntityType() const override;
0068 
0069     G4UParaboloid(__void__&);
0070       // Fake default constructor for usage restricted to direct object
0071       // persistency for clients requiring preallocation of memory for
0072       // persistifiable objects.
0073 
0074     G4UParaboloid( const G4UParaboloid& source );
0075     G4UParaboloid& operator=( const G4UParaboloid& source );
0076       // Copy constructor and assignment operator.
0077 
0078     void BoundingLimits(G4ThreeVector& pMin, G4ThreeVector& pMax) const override;
0079     G4bool CalculateExtent(const EAxis pAxis,
0080                            const G4VoxelLimits& pVoxelLimit,
0081                            const G4AffineTransform& pTransform,
0082                            G4double& pmin, G4double& pmax) const override;
0083     G4Polyhedron* CreatePolyhedron() const override;
0084 };
0085 
0086 // --------------------------------------------------------------------
0087 // Inline methods
0088 // --------------------------------------------------------------------
0089 
0090 inline G4GeometryType G4UParaboloid::GetEntityType() const
0091 {
0092   return "G4Paraboloid";
0093 }
0094 
0095 #endif  // G4GEOM_USE_USOLIDS
0096 
0097 #endif