Geant4_10
G4LogicalBorderSurface.hh
Go to the documentation of this file.
1 //
2 // ********************************************************************
3 // * License and Disclaimer *
4 // * *
5 // * The Geant4 software is copyright of the Copyright Holders of *
6 // * the Geant4 Collaboration. It is provided under the terms and *
7 // * conditions of the Geant4 Software License, included in the file *
8 // * LICENSE and available at http://cern.ch/geant4/license . These *
9 // * include a list of copyright holders. *
10 // * *
11 // * Neither the authors of this software system, nor their employing *
12 // * institutes,nor the agencies providing financial support for this *
13 // * work make any representation or warranty, express or implied, *
14 // * regarding this software system or assume any liability for its *
15 // * use. Please see the license in the file LICENSE and URL above *
16 // * for the full disclaimer and the limitation of liability. *
17 // * *
18 // * This code implementation is the result of the scientific and *
19 // * technical work of the GEANT4 collaboration. *
20 // * By using, copying, modifying or distributing the software (or *
21 // * any work based on the software) you agree to acknowledge its *
22 // * use in resulting scientific publications, and indicate your *
23 // * acceptance of all terms of the Geant4 Software license. *
24 // ********************************************************************
25 //
26 //
27 // $Id: G4LogicalBorderSurface.hh 73926 2013-09-17 07:59:06Z gcosmo $
28 //
29 // class G4LogicalBorderSurface
30 //
31 // Class description:
32 //
33 // A Logical Surface class for surfaces defined by the boundary
34 // of two physical volumes.
35 
36 // History:
37 // -------
38 // Created: 1997-06-17
39 // Author: John Apostolakis (John.Apostolakis@cern.ch)
40 //
41 // --------------------------------------------------------------------
42 #ifndef G4LogicalBorderSurface_h
43 #define G4LogicalBorderSurface_h 1
44 
45 #include <vector>
46 
47 #include "G4LogicalSurface.hh"
48 #include "G4VPhysicalVolume.hh"
49 
50 class G4VPhysicalVolume;
52 
53 typedef std::vector<G4LogicalBorderSurface*> G4LogicalBorderSurfaceTable;
54 
56 {
57 
58  public: // with description
59 
61  G4VPhysicalVolume* vol1,
62  G4VPhysicalVolume* vol2,
63  G4SurfaceProperty* surfaceProperty );
65  // Constructor and destructor
66 
68  const G4VPhysicalVolume* vol2 );
69  inline void SetPhysicalVolumes( G4VPhysicalVolume* vol1,
70  G4VPhysicalVolume* vol2 );
71  inline const G4VPhysicalVolume* GetVolume1() const;
72  inline const G4VPhysicalVolume* GetVolume2() const;
73  // Generic accessors.
74 
75  inline void SetVolume1( G4VPhysicalVolume* vol1 );
76  inline void SetVolume2( G4VPhysicalVolume* vol2 );
77  // To use with care!
78 
79  static void CleanSurfaceTable();
81  static size_t GetNumberOfBorderSurfaces();
82  static void DumpInfo();
83  // To handle the table of surfaces.
84 
86  G4int operator!=( const G4LogicalBorderSurface &right ) const;
87  // Operators.
88 
89  private:
90 
92  const G4LogicalBorderSurface& operator=(const G4LogicalBorderSurface &right);
93 
94  private:
95 
96  G4VPhysicalVolume* Volume1; // Physical Volume pointer on side 1
97  G4VPhysicalVolume* Volume2; // Physical Volume pointer on side 2
98 
99  static G4LogicalBorderSurfaceTable *theBorderSurfaceTable;
100  // The static Table of BorderSurfaces.
101 };
102 
103 // ********************************************************************
104 // Inline methods
105 // ********************************************************************
106 
107 #include "G4LogicalBorderSurface.icc"
108 
109 #endif /* G4LogicalBorderSurface_h */
110 
std::vector< G4LogicalBorderSurface * > G4LogicalBorderSurfaceTable
G4LogicalBorderSurface(const G4String &name, G4VPhysicalVolume *vol1, G4VPhysicalVolume *vol2, G4SurfaceProperty *surfaceProperty)
const G4VPhysicalVolume * GetVolume2() const
const XML_Char * name
Definition: expat.h:151
void SetPhysicalVolumes(G4VPhysicalVolume *vol1, G4VPhysicalVolume *vol2)
int G4int
Definition: G4Types.hh:78
static G4LogicalBorderSurface * GetSurface(const G4VPhysicalVolume *vol1, const G4VPhysicalVolume *vol2)
static size_t GetNumberOfBorderSurfaces()
G4int operator!=(const G4LogicalBorderSurface &right) const
static const G4LogicalBorderSurfaceTable * GetSurfaceTable()
void SetVolume2(G4VPhysicalVolume *vol2)
void SetVolume1(G4VPhysicalVolume *vol1)
const G4VPhysicalVolume * GetVolume1() const
G4int operator==(const G4LogicalBorderSurface &right) const