Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions
GB01DetectorConstruction Class Reference

#include <GB01DetectorConstruction.hh>

Inheritance diagram for GB01DetectorConstruction:
G4VUserDetectorConstruction

Public Member Functions

 GB01DetectorConstruction ()
 
 ~GB01DetectorConstruction ()
 
virtual G4VPhysicalVolumeConstruct ()
 
- Public Member Functions inherited from G4VUserDetectorConstruction
 G4VUserDetectorConstruction ()
 
virtual ~G4VUserDetectorConstruction ()
 
virtual void ConstructSDandField ()
 
virtual void CloneSD ()
 
virtual void CloneF ()
 
void RegisterParallelWorld (G4VUserParallelWorld *)
 
G4int ConstructParallelGeometries ()
 
void ConstructParallelSD ()
 
G4int GetNumberOfParallelWorld () const
 
G4VUserParallelWorldGetParallelWorld (G4int i) const
 

Additional Inherited Members

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

Detailed Description

Definition at line 41 of file GB01DetectorConstruction.hh.

Constructor & Destructor Documentation

GB01DetectorConstruction::GB01DetectorConstruction ( )

Definition at line 47 of file GB01DetectorConstruction.cc.

48 {}
GB01DetectorConstruction::~GB01DetectorConstruction ( )

Definition at line 52 of file GB01DetectorConstruction.cc.

53 {}

Member Function Documentation

G4VPhysicalVolume * GB01DetectorConstruction::Construct ( void  )
virtual

Implements G4VUserDetectorConstruction.

Definition at line 57 of file GB01DetectorConstruction.cc.

References GB01BOptrMultiParticleChangeCrossSection::AddParticle(), G4VBiasingOperator::AttachTo(), python.hepunit::cm, G4NistManager::FindOrBuildMaterial(), G4cout, G4endl, G4LogicalVolume::GetName(), G4VBiasingOperator::GetName(), G4NistManager::Instance(), and python.hepunit::m.

58 {
59  G4Material* worldMaterial = G4NistManager::Instance()->FindOrBuildMaterial("G4_Galactic");
60  G4Material* defaultMaterial = G4NistManager::Instance()->FindOrBuildMaterial("G4_lN2");
61 
62 
63  G4VSolid* solidWorld = new G4Box("World", 10*m, 10*m, 10*m );
64 
65  G4LogicalVolume* logicWorld = new G4LogicalVolume(solidWorld, //its solid
66  worldMaterial, //its material
67  "World"); //its name
68 
69  G4PVPlacement* physiWorld = new G4PVPlacement(0, //no rotation
70  G4ThreeVector(), //at (0,0,0)
71  logicWorld, //its logical volume
72  "World", //its name
73  0, //its mother volume
74  false, //no boolean operation
75  0); //copy number
76 
77  // -----------------------------------
78  // -- volume where biasing is applied:
79  // -----------------------------------
80  G4double halfZ = 10*cm;
81  G4VSolid* solidTest = new G4Box("test.solid", 1*m, 1*m, halfZ );
82 
83  G4LogicalVolume* logicTest = new G4LogicalVolume(solidTest, //its solid
84  defaultMaterial, //its material
85  "test.logical"); //its name
86 
87  new G4PVPlacement(0, // no rotation
88  G4ThreeVector(0,0, halfZ), // volume entrance at (0,0,0)
89  logicTest, // its logical volume
90  "test.phys", // its name
91  logicWorld, // its mother volume
92  false, // no boolean operation
93  0); // copy number
94 
95 
96  // ----------------------------------------------
97  // -- operator creation and attachment to volume:
98  // ----------------------------------------------
101  testMany->AddParticle("gamma");
102  testMany->AddParticle("neutron");
103  testMany->AttachTo(logicTest);
104  G4cout << " Attaching biasing operator " << testMany->GetName()
105  << " to logical volume " << logicTest->GetName()
106  << G4endl;
107 
108  return physiWorld;
109 }
G4Material * FindOrBuildMaterial(const G4String &name, G4bool isotopes=true, G4bool warning=false)
G4String GetName() const
CLHEP::Hep3Vector G4ThreeVector
Definition: G4Box.hh:63
static G4NistManager * Instance()
G4GLOB_DLL std::ostream G4cout
void AttachTo(const G4LogicalVolume *)
#define G4endl
Definition: G4ios.hh:61
double G4double
Definition: G4Types.hh:76
const G4String GetName() const

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