Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 ( )

Definition at line 52 of file GB04DetectorConstruction.cc.

53 {}
GB04DetectorConstruction::~GB04DetectorConstruction ( )

Definition at line 57 of file GB04DetectorConstruction.cc.

58 {}

Member Function Documentation

G4VPhysicalVolume * GB04DetectorConstruction::Construct ( void  )
virtual

Implements G4VUserDetectorConstruction.

Definition at line 62 of file GB04DetectorConstruction.cc.

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

Here is the call graph for this function:

void GB04DetectorConstruction::ConstructSDandField ( )
virtual

Reimplemented from G4VUserDetectorConstruction.

Definition at line 105 of file GB04DetectorConstruction.cc.

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