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

#include <F01DetectorConstruction.hh>

Inheritance diagram for F01DetectorConstruction:
G4VUserDetectorConstruction

Public Member Functions

 F01DetectorConstruction ()
 
virtual ~F01DetectorConstruction ()
 
void SetAbsorberMaterial (G4String)
 
void SetAbsorberThickness (G4double)
 
void SetAbsorberRadius (G4double)
 
void SetAbsorberZpos (G4double)
 
void SetWorldMaterial (G4String)
 
void SetWorldSizeZ (G4double)
 
void SetWorldSizeR (G4double)
 
virtual G4VPhysicalVolumeConstruct ()
 
virtual void ConstructSDandField ()
 
void PrintCalorParameters ()
 
G4MaterialGetWorldMaterial ()
 
G4double GetWorldSizeZ ()
 
G4double GetWorldSizeR ()
 
G4double GetAbsorberZpos ()
 
G4double GetZStartAbs ()
 
G4double GetZEndAbs ()
 
G4MaterialGetAbsorberMaterial ()
 
G4double GetAbsorberThickness ()
 
G4double GetAbsorberRadius ()
 
const G4VPhysicalVolumeGetPhysiWorld ()
 
const G4VPhysicalVolumeGetAbsorber ()
 
G4LogicalVolumeGetLogicalAbsorber ()
 
- 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 56 of file F01DetectorConstruction.hh.

Constructor & Destructor Documentation

F01DetectorConstruction::F01DetectorConstruction ( )

Definition at line 59 of file F01DetectorConstruction.cc.

References python.hepunit::mm.

61  fDetectorMessenger(0),
62  fSolidWorld(0), fLogicWorld(0), fPhysiWorld(0),
63  fSolidAbsorber(0), fLogicAbsorber(0), fPhysiAbsorber(0),
64  fAbsorberMaterial(0), fAbsorberThickness(0.), fAbsorberRadius(0.),
65  fZAbsorber(0.), fZStartAbs(0.), fZEndAbs(0.),
66  fWorldMaterial(0), fWorldSizeR(0.), fWorldSizeZ(0.)
67 {
68  // default parameter values of the calorimeter
69 
70  fWorldSizeZ = 44000.*mm;
71  fWorldSizeR = 22000.*mm;
72 
73  fAbsorberThickness = 1.0*mm;
74 
75  fAbsorberRadius = 20000.*mm;
76  fZAbsorber = 21990.0*mm;
77 
78  // create commands for interactive definition of the calorimeter
79 
80  fDetectorMessenger = new F01DetectorMessenger(this);
81 
82  // create materials
83 
84  DefineMaterials();
85 
86 }
F01DetectorConstruction::~F01DetectorConstruction ( )
virtual

Definition at line 90 of file F01DetectorConstruction.cc.

91 {
92  delete fDetectorMessenger;
93 }

Member Function Documentation

G4VPhysicalVolume * F01DetectorConstruction::Construct ( void  )
virtual

Implements G4VUserDetectorConstruction.

Definition at line 97 of file F01DetectorConstruction.cc.

98 {
99  return ConstructCalorimeter();
100 }
void F01DetectorConstruction::ConstructSDandField ( )
virtual

Reimplemented from G4VUserDetectorConstruction.

Definition at line 383 of file F01DetectorConstruction.cc.

References G4Cache< VALTYPE >::Get(), G4Cache< VALTYPE >::Put(), G4AutoDelete::Register(), G4VUserDetectorConstruction::SetSensitiveDetector(), and python.hepunit::tesla.

384 {
385  // Sensitive Detectors: Absorber
386 
387  if (!fCalorimeterSD.Get()) {
388  F01CalorimeterSD* calorimeterSD = new F01CalorimeterSD("CalorSD",this);
389  fCalorimeterSD.Put(calorimeterSD);
390  }
391  SetSensitiveDetector(fLogicAbsorber, fCalorimeterSD.Get());
392 
393  // Construct the field creator - this will register the field it creates
394  if (!fEmFieldSetup.Get()) {
395  F01FieldSetup* fieldSetup
396  = new F01FieldSetup(G4ThreeVector( 3.3*tesla, 0.0, 0.0 ) );
397  G4AutoDelete::Register(fieldSetup); // Kernel will delete the F01FieldSetup
398  fEmFieldSetup.Put(fieldSetup);
399  }
400 }
CLHEP::Hep3Vector G4ThreeVector
value_type & Get() const
Definition: G4Cache.hh:253
void Register(T *inst)
Definition: G4AutoDelete.hh:65
void SetSensitiveDetector(const G4String &logVolName, G4VSensitiveDetector *aSD, G4bool multi=false)
void Put(const value_type &val) const
Definition: G4Cache.hh:257
const G4VPhysicalVolume* F01DetectorConstruction::GetAbsorber ( )
inline

Definition at line 95 of file F01DetectorConstruction.hh.

Referenced by F01CalorimeterSD::ProcessHits().

95 {return fPhysiAbsorber;}
G4Material* F01DetectorConstruction::GetAbsorberMaterial ( )
inline

Definition at line 90 of file F01DetectorConstruction.hh.

90 {return fAbsorberMaterial;}
G4double F01DetectorConstruction::GetAbsorberRadius ( )
inline

Definition at line 92 of file F01DetectorConstruction.hh.

Referenced by F01PrimaryGeneratorAction::GeneratePrimaries().

92 {return fAbsorberRadius;}
G4double F01DetectorConstruction::GetAbsorberThickness ( )
inline

Definition at line 91 of file F01DetectorConstruction.hh.

Referenced by F01PrimaryGeneratorAction::F01PrimaryGeneratorAction(), and F01PrimaryGeneratorAction::GeneratePrimaries().

91 {return fAbsorberThickness;}
G4double F01DetectorConstruction::GetAbsorberZpos ( )
inline
G4LogicalVolume* F01DetectorConstruction::GetLogicalAbsorber ( )
inline

Definition at line 96 of file F01DetectorConstruction.hh.

96 {return fLogicAbsorber;}
const G4VPhysicalVolume* F01DetectorConstruction::GetPhysiWorld ( )
inline

Definition at line 94 of file F01DetectorConstruction.hh.

94 {return fPhysiWorld;}
G4Material* F01DetectorConstruction::GetWorldMaterial ( )
inline

Definition at line 82 of file F01DetectorConstruction.hh.

82 {return fWorldMaterial;}
G4double F01DetectorConstruction::GetWorldSizeR ( )
inline

Definition at line 84 of file F01DetectorConstruction.hh.

84 {return fWorldSizeR;}
G4double F01DetectorConstruction::GetWorldSizeZ ( )
inline

Definition at line 83 of file F01DetectorConstruction.hh.

83 {return fWorldSizeZ;}
G4double F01DetectorConstruction::GetZEndAbs ( )
inline

Definition at line 88 of file F01DetectorConstruction.hh.

88 {return fZEndAbs;}
G4double F01DetectorConstruction::GetZStartAbs ( )
inline

Definition at line 87 of file F01DetectorConstruction.hh.

87 {return fZStartAbs;}
void F01DetectorConstruction::PrintCalorParameters ( )

Definition at line 279 of file F01DetectorConstruction.cc.

References G4cout, G4endl, G4Material::GetName(), and python.hepunit::mm.

280 {
281  G4cout << "\n The WORLD is made of "
282  << fWorldSizeZ/mm << "mm of " << fWorldMaterial->GetName();
283  G4cout << ", the transverse size (R) of the world is "
284  << fWorldSizeR/mm << " mm. " << G4endl;
285  G4cout << " The ABSORBER is made of "
286  << fAbsorberThickness/mm << "mm of " << fAbsorberMaterial->GetName();
287  G4cout << ", the transverse size (R) is " << fAbsorberRadius/mm
288  << " mm. " << G4endl;
289  G4cout << " Z position of the (middle of the) absorber "
290  << fZAbsorber/mm << " mm." << G4endl;
291  G4cout << G4endl;
292 }
const G4String & GetName() const
Definition: G4Material.hh:176
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61
void F01DetectorConstruction::SetAbsorberMaterial ( G4String  materialChoice)

Definition at line 296 of file F01DetectorConstruction.cc.

References G4Material::GetMaterialTable(), G4Material::GetName(), G4RunManager::GetRunManager(), eplot::material, G4RunManager::PhysicsHasBeenModified(), and G4LogicalVolume::SetMaterial().

Referenced by F01DetectorMessenger::SetNewValue().

297 {
298  // get the pointer to the material table
299  const G4MaterialTable* theMaterialTable = G4Material::GetMaterialTable();
300 
301  // search the material by its name
303  for (size_t j=0 ; j<theMaterialTable->size() ; j++)
304  { material = (*theMaterialTable)[j];
305  if (material->GetName() == materialChoice)
306  {
307  fAbsorberMaterial = material;
308  fLogicAbsorber->SetMaterial(material);
310  }
311  }
312 }
const G4String & GetName() const
Definition: G4Material.hh:176
static G4MaterialTable * GetMaterialTable()
Definition: G4Material.cc:564
std::vector< G4Material * > G4MaterialTable
string material
Definition: eplot.py:19
void PhysicsHasBeenModified()
static G4RunManager * GetRunManager()
Definition: G4RunManager.cc:74
void SetMaterial(G4Material *pMaterial)
void F01DetectorConstruction::SetAbsorberRadius ( G4double  val)

Definition at line 346 of file F01DetectorConstruction.cc.

References G4RunManager::GetRunManager(), and G4RunManager::ReinitializeGeometry().

Referenced by F01DetectorMessenger::SetNewValue().

347 {
348  // change the transverse size and recompute the calorimeter parameters
349  fAbsorberRadius = val;
350  ComputeCalorParameters();
352 }
void ReinitializeGeometry(G4bool destroyFirst=false, G4bool prop=true)
static G4RunManager * GetRunManager()
Definition: G4RunManager.cc:74
void F01DetectorConstruction::SetAbsorberThickness ( G4double  val)

Definition at line 336 of file F01DetectorConstruction.cc.

References G4RunManager::GetRunManager(), and G4RunManager::ReinitializeGeometry().

Referenced by F01DetectorMessenger::SetNewValue().

337 {
338  // change Absorber thickness and recompute the calorimeter parameters
339  fAbsorberThickness = val;
340  ComputeCalorParameters();
342 }
void ReinitializeGeometry(G4bool destroyFirst=false, G4bool prop=true)
static G4RunManager * GetRunManager()
Definition: G4RunManager.cc:74
void F01DetectorConstruction::SetAbsorberZpos ( G4double  val)

Definition at line 374 of file F01DetectorConstruction.cc.

References G4RunManager::GetRunManager(), and G4RunManager::ReinitializeGeometry().

Referenced by F01DetectorMessenger::SetNewValue().

375 {
376  fZAbsorber = val;
377  ComputeCalorParameters();
379 }
void ReinitializeGeometry(G4bool destroyFirst=false, G4bool prop=true)
static G4RunManager * GetRunManager()
Definition: G4RunManager.cc:74
void F01DetectorConstruction::SetWorldMaterial ( G4String  materialChoice)

Definition at line 316 of file F01DetectorConstruction.cc.

References G4Material::GetMaterialTable(), G4Material::GetName(), G4RunManager::GetRunManager(), eplot::material, G4RunManager::PhysicsHasBeenModified(), and G4LogicalVolume::SetMaterial().

Referenced by F01DetectorMessenger::SetNewValue().

317 {
318  // get the pointer to the material table
319  const G4MaterialTable* theMaterialTable = G4Material::GetMaterialTable();
320 
321  // search the material by its name
323  for (size_t j=0 ; j<theMaterialTable->size() ; j++)
324  { material = (*theMaterialTable)[j];
325  if(material->GetName() == materialChoice)
326  {
327  fWorldMaterial = material;
328  fLogicWorld->SetMaterial(material);
330  }
331  }
332 }
const G4String & GetName() const
Definition: G4Material.hh:176
static G4MaterialTable * GetMaterialTable()
Definition: G4Material.cc:564
std::vector< G4Material * > G4MaterialTable
string material
Definition: eplot.py:19
void PhysicsHasBeenModified()
static G4RunManager * GetRunManager()
Definition: G4RunManager.cc:74
void SetMaterial(G4Material *pMaterial)
void F01DetectorConstruction::SetWorldSizeR ( G4double  val)

Definition at line 365 of file F01DetectorConstruction.cc.

References G4RunManager::GetRunManager(), and G4RunManager::ReinitializeGeometry().

Referenced by F01DetectorMessenger::SetNewValue().

366 {
367  fWorldSizeR = val;
368  ComputeCalorParameters();
370 }
void ReinitializeGeometry(G4bool destroyFirst=false, G4bool prop=true)
static G4RunManager * GetRunManager()
Definition: G4RunManager.cc:74
void F01DetectorConstruction::SetWorldSizeZ ( G4double  val)

Definition at line 356 of file F01DetectorConstruction.cc.

References G4RunManager::GetRunManager(), and G4RunManager::ReinitializeGeometry().

Referenced by F01DetectorMessenger::SetNewValue().

357 {
358  fWorldSizeZ = val;
359  ComputeCalorParameters();
361 }
void ReinitializeGeometry(G4bool destroyFirst=false, G4bool prop=true)
static G4RunManager * GetRunManager()
Definition: G4RunManager.cc:74

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