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

#include <GB01DetectorConstruction.hh>

Inheritance diagram for GB01DetectorConstruction:
Collaboration diagram for GB01DetectorConstruction:

Public Member Functions

 GB01DetectorConstruction ()
 
 ~GB01DetectorConstruction ()
 
virtual G4VPhysicalVolumeConstruct ()
 
virtual void ConstructSDandField ()
 
- Public Member Functions inherited from G4VUserDetectorConstruction
 G4VUserDetectorConstruction ()
 
virtual ~G4VUserDetectorConstruction ()
 
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 44 of file GB01DetectorConstruction.hh.

Constructor & Destructor Documentation

GB01DetectorConstruction::GB01DetectorConstruction ( )

Definition at line 50 of file GB01DetectorConstruction.cc.

51 {}
GB01DetectorConstruction::~GB01DetectorConstruction ( )

Definition at line 55 of file GB01DetectorConstruction.cc.

56 {}

Member Function Documentation

G4VPhysicalVolume * GB01DetectorConstruction::Construct ( void  )
virtual

Implements G4VUserDetectorConstruction.

Definition at line 60 of file GB01DetectorConstruction.cc.

61 {
62  G4Material* worldMaterial = G4NistManager::Instance()->FindOrBuildMaterial("G4_Galactic");
63  G4Material* defaultMaterial = G4NistManager::Instance()->FindOrBuildMaterial("G4_lN2");
64 
65  G4VSolid* solidWorld = new G4Box("World", 10*m, 10*m, 10*m );
66 
67  G4LogicalVolume* logicWorld = new G4LogicalVolume(solidWorld, // its solid
68  worldMaterial, // its material
69  "World"); // its name
70 
71  G4PVPlacement* physiWorld = new G4PVPlacement(0, // no rotation
72  G4ThreeVector(), // at (0,0,0)
73  logicWorld, // its logical volume
74  "World", // its name
75  0, // its mother volume
76  false, // no boolean operation
77  0); // copy number
78 
79  // -----------------------------------
80  // -- volume where biasing is applied:
81  // -----------------------------------
82  G4double halfZ = 10*cm;
83  G4VSolid* solidTest = new G4Box("test.solid", 1*m, 1*m, halfZ );
84 
85  G4LogicalVolume* logicTest = new G4LogicalVolume(solidTest, // its solid
86  defaultMaterial, // its material
87  "test.logical"); // its name
88 
89  new G4PVPlacement(0, // no rotation
90  G4ThreeVector(0,0, halfZ), // volume entrance at (0,0,0)
91  logicTest, // its logical volume
92  "test.phys", // its name
93  logicWorld, // its mother volume
94  false, // no boolean operation
95  0); // copy number
96 
97 
98  return physiWorld;
99 }
G4Material * FindOrBuildMaterial(const G4String &name, G4bool isotopes=true, G4bool warning=false)
CLHEP::Hep3Vector G4ThreeVector
Definition: G4Box.hh:64
static G4NistManager * Instance()
static constexpr double m
Definition: G4SIunits.hh:129
static constexpr double cm
Definition: G4SIunits.hh:119
double G4double
Definition: G4Types.hh:76

Here is the call graph for this function:

void GB01DetectorConstruction::ConstructSDandField ( )
virtual

Reimplemented from G4VUserDetectorConstruction.

Definition at line 101 of file GB01DetectorConstruction.cc.

102 {
103  // -- Fetch volume for biasing:
104  G4LogicalVolume* logicTest = G4LogicalVolumeStore::GetInstance()->GetVolume("test.logical");
105 
106  // ----------------------------------------------
107  // -- operator creation and attachment to volume:
108  // ----------------------------------------------
111  testMany->AddParticle("gamma");
112  testMany->AddParticle("neutron");
113  testMany->AttachTo(logicTest);
114  G4cout << " Attaching biasing operator " << testMany->GetName()
115  << " to logical volume " << logicTest->GetName()
116  << G4endl;
117 }
G4LogicalVolume * GetVolume(const G4String &name, G4bool verbose=true) const
G4GLOB_DLL std::ostream G4cout
static G4LogicalVolumeStore * GetInstance()
void AttachTo(const G4LogicalVolume *)
#define G4endl
Definition: G4ios.hh:61
const G4String & GetName() const
const G4String GetName() const

Here is the call graph for this function:


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