Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/Geant4/G4UCons.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 // * 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 // G4UCons
0027 //
0028 // Class description:
0029 //
0030 // Wrapper class for G4Cons to make use of VecGeom Cone.
0031 
0032 // 30.10.13 G.Cosmo, CERN/PH
0033 // --------------------------------------------------------------------
0034 #ifndef G4UCONS_HH
0035 #define G4UCONS_HH
0036 
0037 #include "G4UAdapter.hh"
0038 
0039 #if ( defined(G4GEOM_USE_USOLIDS) || defined(G4GEOM_USE_PARTIAL_USOLIDS) )
0040 
0041 #include <VecGeom/volumes/UnplacedCone.h>
0042 
0043 #include "G4Polyhedron.hh"
0044 
0045 class G4UCons : public G4UAdapter<vecgeom::GenericUnplacedCone>
0046 {
0047   using Shape_t = vecgeom::GenericUnplacedCone;
0048   using Base_t = G4UAdapter<vecgeom::GenericUnplacedCone>;
0049 
0050   public:  // with description
0051 
0052     G4UCons(const G4String& pName,
0053                   G4double pRmin1, G4double pRmax1,
0054                   G4double pRmin2, G4double pRmax2,
0055                   G4double pDz,
0056                   G4double pSPhi, G4double pDPhi);
0057       // Constructs a cone with the given name and dimensions
0058 
0059    ~G4UCons() override;
0060 
0061     void ComputeDimensions(       G4VPVParameterisation* p,
0062                             const G4int n,
0063                             const G4VPhysicalVolume* pRep ) override;
0064 
0065     G4VSolid* Clone() const override;
0066 
0067     G4double GetInnerRadiusMinusZ() const;
0068     G4double GetOuterRadiusMinusZ() const;
0069     G4double GetInnerRadiusPlusZ()  const;
0070     G4double GetOuterRadiusPlusZ()  const;
0071     G4double GetZHalfLength()       const;
0072     G4double GetStartPhiAngle()     const;
0073     G4double GetDeltaPhiAngle()     const;
0074     G4double GetSinStartPhi()       const;
0075     G4double GetCosStartPhi()       const;
0076     G4double GetSinEndPhi()         const;
0077     G4double GetCosEndPhi()         const;
0078   
0079     void SetInnerRadiusMinusZ (G4double Rmin1 );
0080     void SetOuterRadiusMinusZ (G4double Rmax1 );
0081     void SetInnerRadiusPlusZ  (G4double Rmin2 );
0082     void SetOuterRadiusPlusZ  (G4double Rmax2 );
0083     void SetZHalfLength       (G4double newDz );
0084     void SetStartPhiAngle     (G4double newSPhi, G4bool trig=true);
0085     void SetDeltaPhiAngle     (G4double newDPhi);
0086 
0087     inline G4GeometryType GetEntityType() const override;
0088 
0089     void BoundingLimits(G4ThreeVector& pMin, G4ThreeVector& pMax) const override;
0090 
0091     G4bool CalculateExtent(const EAxis pAxis,
0092                            const G4VoxelLimits& pVoxelLimit,
0093                            const G4AffineTransform& pTransform,
0094                                  G4double& pMin, G4double& pMax) const override;
0095 
0096     G4Polyhedron* CreatePolyhedron() const override;
0097 
0098   public:  // without description
0099        
0100     G4UCons(__void__&);
0101       // Fake default constructor for usage restricted to direct object
0102       // persistency for clients requiring preallocation of memory for
0103       // persistifiable objects.
0104 
0105     G4UCons(const G4UCons& rhs);
0106     G4UCons& operator=(const G4UCons& rhs); 
0107       // Copy constructor and assignment operator.
0108 };
0109 
0110 // --------------------------------------------------------------------
0111 // Inline methods
0112 // --------------------------------------------------------------------
0113 
0114 inline G4GeometryType G4UCons::GetEntityType() const
0115 {
0116   return "G4Cons";
0117 }
0118 
0119 #endif  // G4GEOM_USE_USOLIDS
0120 
0121 #endif