Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4VUserDetectorConstruction Class Referenceabstract

#include <G4VUserDetectorConstruction.hh>

Public Member Functions

 G4VUserDetectorConstruction ()
 
virtual ~G4VUserDetectorConstruction ()
 
virtual G4VPhysicalVolumeConstruct ()=0
 
void RegisterParallelWorld (G4VUserParallelWorld *)
 
G4int ConstructParallelGeometries ()
 
G4int GetNumberOfParallelWorld () const
 
G4VUserParallelWorldGetParallelWorld (G4int i) const
 

Detailed Description

Definition at line 48 of file G4VUserDetectorConstruction.hh.

Constructor & Destructor Documentation

◆ G4VUserDetectorConstruction()

G4VUserDetectorConstruction::G4VUserDetectorConstruction ( )

Definition at line 34 of file G4VUserDetectorConstruction.cc.

35{;}

◆ ~G4VUserDetectorConstruction()

G4VUserDetectorConstruction::~G4VUserDetectorConstruction ( )
virtual

Definition at line 37 of file G4VUserDetectorConstruction.cc.

38{;}

Member Function Documentation

◆ Construct()

virtual G4VPhysicalVolume * G4VUserDetectorConstruction::Construct ( )
pure virtual

◆ ConstructParallelGeometries()

G4int G4VUserDetectorConstruction::ConstructParallelGeometries ( )

Definition at line 57 of file G4VUserDetectorConstruction.cc.

58{
59 G4int nP = 0;
60 std::vector<G4VUserParallelWorld*>::iterator pwItr;
61 for(pwItr=parallelWorld.begin();pwItr!=parallelWorld.end();pwItr++)
62 {
63 (*pwItr)->Construct();
64 nP++;
65 }
66 return nP;
67}
int G4int
Definition: G4Types.hh:66

Referenced by G4RunManager::InitializeGeometry().

◆ GetNumberOfParallelWorld()

G4int G4VUserDetectorConstruction::GetNumberOfParallelWorld ( ) const

Definition at line 69 of file G4VUserDetectorConstruction.cc.

70{ return parallelWorld.size(); }

Referenced by GetParallelWorld().

◆ GetParallelWorld()

G4VUserParallelWorld * G4VUserDetectorConstruction::GetParallelWorld ( G4int  i) const

Definition at line 72 of file G4VUserDetectorConstruction.cc.

73{
74 if(i<0||i>=GetNumberOfParallelWorld()) return 0;
75 return parallelWorld[i];
76}

◆ RegisterParallelWorld()

void G4VUserDetectorConstruction::RegisterParallelWorld ( G4VUserParallelWorld aPW)

Definition at line 40 of file G4VUserDetectorConstruction.cc.

41{
42 std::vector<G4VUserParallelWorld*>::iterator pwItr;
43 for(pwItr=parallelWorld.begin();pwItr!=parallelWorld.end();pwItr++)
44 {
45 if((*pwItr)->GetName()==aPW->GetName())
46 {
47 G4String eM = "A parallel world <";
48 eM += aPW->GetName();
49 eM += "> is already registered to the user detector construction.";
50 G4Exception("G4VUserDetectorConstruction::RegisterParallelWorld",
51 "Run0051",FatalErrorInArgument,eM);
52 }
53 }
54 parallelWorld.push_back(aPW);
55}
@ FatalErrorInArgument
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41

The documentation for this class was generated from the following files: