Geant4  10.02.p03
GB04DetectorConstruction Class Reference

#include <GB04DetectorConstruction.hh>

Inheritance diagram for GB04DetectorConstruction:
Collaboration diagram for GB04DetectorConstruction:

Public Member Functions

 GB04DetectorConstruction ()
 
 ~GB04DetectorConstruction ()
 
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 46 of file GB04DetectorConstruction.hh.

Constructor & Destructor Documentation

◆ GB04DetectorConstruction()

GB04DetectorConstruction::GB04DetectorConstruction ( )

Definition at line 53 of file GB04DetectorConstruction.cc.

54 {}

◆ ~GB04DetectorConstruction()

GB04DetectorConstruction::~GB04DetectorConstruction ( )

Definition at line 58 of file GB04DetectorConstruction.cc.

59 {}

Member Function Documentation

◆ Construct()

G4VPhysicalVolume * GB04DetectorConstruction::Construct ( void  )
virtual

Implements G4VUserDetectorConstruction.

Definition at line 63 of file GB04DetectorConstruction.cc.

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

◆ ConstructSDandField()

void GB04DetectorConstruction::ConstructSDandField ( )
virtual

Reimplemented from G4VUserDetectorConstruction.

Definition at line 107 of file GB04DetectorConstruction.cc.

108 {
109  // -- Fetch volume for biasing:
110  G4LogicalVolume* logicTest =
111  G4LogicalVolumeStore::GetInstance()->GetVolume("test.logical");
112 
113  // ----------------------------------------------
114  // -- operator creation and attachment to volume:
115  // ----------------------------------------------
116  GB04BOptrBremSplitting* bremSplittingOperator = new GB04BOptrBremSplitting();
117  bremSplittingOperator->AttachTo(logicTest);
118  G4cout << " Attaching biasing operator " << bremSplittingOperator->GetName()
119  << " to logical volume " << logicTest->GetName()
120  << G4endl;
121 }
G4GLOB_DLL std::ostream G4cout
const G4String & GetName() const
G4LogicalVolume * GetVolume(const G4String &name, G4bool verbose=true) const
static G4LogicalVolumeStore * GetInstance()
void AttachTo(const G4LogicalVolume *)
#define G4endl
Definition: G4ios.hh:61
const G4String GetName() const
Here is the call graph for this function:

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