Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-26 08:56:44

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 // G4LogicalSurface
0027 //
0028 // Class description:
0029 //
0030 // An abstraction of a geometrical surface, it is an abstract 
0031 // base class for different implementations of surfaces.
0032 // Its primary function is to hold pointers to objects that describe the
0033 // surface's physical properties. For example it holds a pointer to a
0034 // surface's optical properties, and because of this it is used in processes
0035 // like G4OpBoundaryProcess. 
0036 //
0037 // Methods:
0038 //   G4SurfaceProperty*  GetSurfaceProperty() const
0039 //   void     SetSurfaceProperty(G4SurfaceProperty*)
0040 //
0041 //   G4String GetName() const
0042 //   void     SetName(const G4String&)
0043 //
0044 //   G4TransitionRadiationSurface*  GetTransitionRadiationSurface() const
0045 //   void SetTransitionRadiationSurface(G4TransitionRadiationSurface*)
0046 //
0047 // Data members:
0048 //   G4String                       theName
0049 //   G4SurfaceProperty*             theSurfaceProperty
0050 //   G4TransitionRadiationSurface*  theTransRadSurface
0051 
0052 // Authors: John Apostolakis (CERN) & Peter Gumplinger (TRIUMF), 26.06.1997
0053 // ------------------------------------------------------------------------
0054 #ifndef G4LOGICALSURFACE_HH
0055 #define G4LOGICALSURFACE_HH
0056 
0057 #include "G4Types.hh"
0058 #include "G4String.hh"
0059 
0060 class G4SurfaceProperty;
0061 class G4TransitionRadiationSurface;
0062 
0063 /**
0064  * @brief G4LogicalSurface is an abstraction of a geometrical surface, it is
0065  * an abstract base class for different implementations of surfaces.
0066  * Its primary function is to hold pointers to objects that describe the
0067  * surface's physical properties. For example it holds a pointer to a
0068  * surface's optical properties, and because of this it is used in processes
0069  * like G4OpBoundaryProcess.
0070  */
0071 
0072 class G4LogicalSurface
0073 {
0074   public:
0075 
0076     /**
0077      * Default Destructor.
0078      */
0079     virtual ~G4LogicalSurface() = default;
0080 
0081     /**
0082      * Copy constructor and assignment operator not allowed.
0083      */
0084     G4LogicalSurface(const G4LogicalSurface&) = delete;
0085     G4LogicalSurface& operator=(const G4LogicalSurface&) = delete;
0086 
0087     /**
0088      * Getter and setter for the surface property object.
0089      */
0090     inline G4SurfaceProperty* GetSurfaceProperty() const;
0091     inline void SetSurfaceProperty(G4SurfaceProperty* ptrSurfaceProperty);
0092 
0093     /**
0094      * Getter and setter for the surface name.
0095      */
0096     inline const G4String& GetName() const;
0097     inline void SetName(const G4String& name);
0098 
0099     /**
0100      * Getter and setter for the transition radiation surface attribute.
0101      */
0102     inline G4TransitionRadiationSurface* GetTransitionRadiationSurface() const;
0103     inline void SetTransitionRadiationSurface(G4TransitionRadiationSurface* trs);
0104 
0105     /**
0106      * Equality and disequality operators.
0107      */
0108     inline G4bool operator==(const G4LogicalSurface &right) const;
0109     inline G4bool operator!=(const G4LogicalSurface &right) const;
0110 
0111   protected:
0112 
0113     /**
0114      * Protected constructor. There should be no free instances of this class.
0115      */
0116     G4LogicalSurface(const G4String& name, G4SurfaceProperty* prop); 
0117 
0118   private:
0119 
0120     /** Surface name. */
0121     G4String theName;
0122 
0123     G4SurfaceProperty* theSurfaceProperty = nullptr;
0124     G4TransitionRadiationSurface* theTransRadSurface = nullptr;
0125 };
0126 
0127 #include "G4LogicalSurface.icc"
0128 
0129 #endif