Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RE04ParallelWorldConstruction Class Reference

#include <RE04ParallelWorldConstruction.hh>

Inheritance diagram for RE04ParallelWorldConstruction:
Collaboration diagram for RE04ParallelWorldConstruction:

Public Member Functions

 RE04ParallelWorldConstruction (G4String &parallelWorldName)
 
virtual ~RE04ParallelWorldConstruction ()
 
virtual void Construct ()
 
- Public Member Functions inherited from G4VUserParallelWorld
 G4VUserParallelWorld (G4String worldName)
 
virtual ~G4VUserParallelWorld ()
 
virtual void ConstructSD ()
 
G4String GetName ()
 

Additional Inherited Members

- Protected Member Functions inherited from G4VUserParallelWorld
G4VPhysicalVolumeGetWorld ()
 
void SetSensitiveDetector (const G4String &logVolName, G4VSensitiveDetector *aSD, G4bool multi=false)
 
void SetSensitiveDetector (G4LogicalVolume *logVol, G4VSensitiveDetector *aSD)
 
- Protected Attributes inherited from G4VUserParallelWorld
G4String fWorldName
 

Detailed Description

A parallel world construction class

  • void Construct() creates a parallel world in the mass world and parameterized volumes

Definition at line 46 of file RE04ParallelWorldConstruction.hh.

Constructor & Destructor Documentation

RE04ParallelWorldConstruction::RE04ParallelWorldConstruction ( G4String parallelWorldName)

Definition at line 43 of file RE04ParallelWorldConstruction.cc.

44 :G4VUserParallelWorld(parallelWorldName),fConstructed(false)
45 {;}
G4VUserParallelWorld(G4String worldName)
RE04ParallelWorldConstruction::~RE04ParallelWorldConstruction ( )
virtual

Definition at line 48 of file RE04ParallelWorldConstruction.cc.

49 {;}

Member Function Documentation

void RE04ParallelWorldConstruction::Construct ( void  )
virtual

Implements G4VUserParallelWorld.

Definition at line 52 of file RE04ParallelWorldConstruction.cc.

53 {
54  if(fConstructed) return;
55  fConstructed = true;
56 
57  //
58  // World
59  //
60  G4VPhysicalVolume* ghostWorld = GetWorld();
61  G4LogicalVolume* worldLogical = ghostWorld->GetLogicalVolume();
62 
63  //
64  // material defined in the mass world
65  //
66  G4Material* water = G4Material::GetMaterial("G4_WATER");
67 
68  //
69  // parallel world placement box
70  //
71  G4VSolid* paraBox = new G4Box("paraBox",5.0*cm,30.0*cm,5.0*cm);
72  G4LogicalVolume* paraBoxLogical = new G4LogicalVolume(paraBox,water,
73  "paraBox");
74  new G4PVPlacement(0,G4ThreeVector(-25.0*cm,0.,0.),paraBoxLogical,
75  "paraBox",worldLogical,false,0);
76 
77  //
78  // mother of parallel world parameterized volumes
79  //
80  G4VSolid* paraMom = new G4Box("paraMom",20.0*cm,40.0*cm,20.0*cm);
81  G4LogicalVolume* paraMomLogical = new G4LogicalVolume(paraMom,0,"paraMom");
82  new G4PVPlacement(0,G4ThreeVector(10.0*cm,0.,0.),paraMomLogical,"paraMom",
83  worldLogical,false,0);
84 
85  //
86  // parallel world parameterized volumes
87  //
88  G4VSolid* paraPara = new G4Box("paraPara",5.0*cm,15.0*cm,10.0*cm);
89  G4LogicalVolume* paraParaLogical = new G4LogicalVolume(paraPara,water,
90  "paraPara");
92  new G4PVParameterised("paraPara",paraParaLogical,paraMomLogical,
93  kXAxis, 2, param);
94 
95 }
CLHEP::Hep3Vector G4ThreeVector
G4VPhysicalVolume * GetWorld()
static G4Material * GetMaterial(const G4String &name, G4bool warning=true)
Definition: G4Material.cc:602
Definition: G4Box.hh:64
static constexpr double cm
Definition: G4SIunits.hh:119
G4LogicalVolume * GetLogicalVolume() const

Here is the call graph for this function:


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