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

#include <GB02DetectorConstruction.hh>

Inheritance diagram for GB02DetectorConstruction:
G4VUserDetectorConstruction

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 41 of file GB02DetectorConstruction.hh.

Constructor & Destructor Documentation

GB02DetectorConstruction::GB02DetectorConstruction ( )

Definition at line 48 of file GB02DetectorConstruction.cc.

49 {}
GB02DetectorConstruction::~GB02DetectorConstruction ( )

Definition at line 53 of file GB02DetectorConstruction.cc.

54 {}

Member Function Documentation

G4VPhysicalVolume * GB02DetectorConstruction::Construct ( void  )
virtual

Implements G4VUserDetectorConstruction.

Definition at line 58 of file GB02DetectorConstruction.cc.

References python.hepunit::cm, G4NistManager::FindOrBuildMaterial(), G4NistManager::Instance(), and python.hepunit::m.

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

Reimplemented from G4VUserDetectorConstruction.

Definition at line 101 of file GB02DetectorConstruction.cc.

References GB02BOptrMultiParticleForceCollision::AddParticle(), G4VBiasingOperator::AttachTo(), G4cout, G4endl, G4LogicalVolumeStore::GetInstance(), G4LogicalVolume::GetName(), G4VBiasingOperator::GetName(), and G4LogicalVolumeStore::GetVolume().

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

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