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

#include <GB02DetectorConstruction.hh>

Inheritance diagram for GB02DetectorConstruction:
Collaboration diagram for GB02DetectorConstruction:

Public Member Functions

 GB02DetectorConstruction ()
 
 ~GB02DetectorConstruction ()
 
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 GB02DetectorConstruction.hh.

Constructor & Destructor Documentation

GB02DetectorConstruction::GB02DetectorConstruction ( )

Definition at line 50 of file GB02DetectorConstruction.cc.

51 {}
GB02DetectorConstruction::~GB02DetectorConstruction ( )

Definition at line 55 of file GB02DetectorConstruction.cc.

56 {}

Member Function Documentation

G4VPhysicalVolume * GB02DetectorConstruction::Construct ( void  )
virtual

Implements G4VUserDetectorConstruction.

Definition at line 60 of file GB02DetectorConstruction.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 GB02DetectorConstruction::ConstructSDandField ( )
virtual

Reimplemented from G4VUserDetectorConstruction.

Definition at line 103 of file GB02DetectorConstruction.cc.

104 {
105  // -- Fetch volume for biasing:
106  G4LogicalVolume* logicTest = G4LogicalVolumeStore::GetInstance()->GetVolume("test.logical");
107 
108  // ----------------------------------------------
109  // -- operator creation and attachment to volume:
110  // ----------------------------------------------
112  testMany->AddParticle("gamma");
113  testMany->AddParticle("neutron");
114  testMany->AttachTo(logicTest);
115  G4cout << " Attaching biasing operator " << testMany->GetName()
116  << " to logical volume " << logicTest->GetName()
117  << G4endl;
118 }
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: