#include <DetectorConstruction.h>
|
static G4VPhysicalVolume * | fWorld = nullptr |
| pointer to the world volume More...
|
|
static G4FieldManager * | fFieldMgr = nullptr |
| pointer to the field manager More...
|
|
Definition at line 19 of file DetectorConstruction.h.
g4b::DetectorConstruction::DetectorConstruction |
( |
std::string const & |
gdmlFile, |
|
|
bool const & |
overlapCheck = false , |
|
|
bool const & |
validateSchema = true |
|
) |
| |
|
explicit |
Standard constructor and destructor.
Definition at line 30 of file DetectorConstruction.cxx.
34 if ( gdmlFile.empty() ) {
35 throw cet::exception(
"DetectorConstruction") <<
"Supplied GDML filename is empty\n" 36 << __FILE__ <<
":" << __LINE__ <<
"\n";
39 const G4String GDMLfile =
static_cast<const G4String
>( gdmlFile );
43 parser.SetOverlapCheck(overlapCheck);
44 parser.Read(GDMLfile,validateSchema);
49 fWorld = parser.GetWorldVolume();
static G4VPhysicalVolume * fWorld
pointer to the world volume
cet::coded_exception< error, detail::translate > exception
g4b::DetectorConstruction::~DetectorConstruction |
( |
| ) |
|
|
virtual |
G4VPhysicalVolume * g4b::DetectorConstruction::Construct |
( |
| ) |
|
The key method in this class; returns the Geant4 version of the detector geometry. Required of any class that inherits from G4VUserDetectorConstruction.
Definition at line 60 of file DetectorConstruction.cxx.
66 for(
auto fd : bField->
Fields()){
73 G4LogicalVolume *bvol = G4LogicalVolumeStore::GetInstance()->GetVolume(fd.fVolume);
76 G4UniformMagField* magField =
new G4UniformMagField( fd.fField *
CLHEP::tesla );
82 <<
"Setting uniform magnetic field to be " 83 << magField->GetConstantFieldValue().x() <<
" " 84 << magField->GetConstantFieldValue().y() <<
" " 85 << magField->GetConstantFieldValue().z() <<
" " 86 <<
" in " << bvol->GetName();
98 <<
"Unknown or illegal Magneticfield " 101 <<
". Note that AutomaticBFieldMode is reserved.";
#define MF_LOG_ERROR(category)
static G4VPhysicalVolume * fWorld
pointer to the world volume
std::vector< MagneticFieldDescription > const & Fields() const
#define MF_LOG_INFO(category)
static G4FieldManager * fFieldMgr
pointer to the field manager
static G4FieldManager* g4b::DetectorConstruction::GetFieldMgr |
( |
| ) |
|
|
inlinestatic |
Magnetic field.
Definition at line 40 of file DetectorConstruction.h.
static G4FieldManager * fFieldMgr
pointer to the field manager
static G4VPhysicalVolume* g4b::DetectorConstruction::GetWorld |
( |
| ) |
|
|
inlinestatic |
Return a pointer to the world volume. This returns the same pointer as Construct(), but Construct() also does other actions such as setting up sensitive detectors. World() just returns the pointer to the top physical volume.
Definition at line 37 of file DetectorConstruction.h.
static G4VPhysicalVolume * fWorld
pointer to the world volume
G4FieldManager * g4b::DetectorConstruction::fFieldMgr = nullptr |
|
staticprivate |
G4VPhysicalVolume * g4b::DetectorConstruction::fWorld = nullptr |
|
staticprivate |
The documentation for this class was generated from the following files: