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

#include <F02DetectorConstruction.hh>

Inheritance diagram for F02DetectorConstruction:
G4VUserDetectorConstruction

Public Member Functions

 F02DetectorConstruction ()
 
virtual ~F02DetectorConstruction ()
 
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 F02DetectorConstruction.hh.

Constructor & Destructor Documentation

F02DetectorConstruction::F02DetectorConstruction ( )

Definition at line 59 of file F02DetectorConstruction.cc.

References python.hepunit::cm, and 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  fWorldChanged(false), fZAbsorber(0.), fZStartAbs(0.), fZEndAbs(0.),
66  fWorldMaterial(0), fWorldSizeR(0.), fWorldSizeZ(0.)
67 {
68  // default parameter values of the calorimeter
69 
70  fWorldSizeZ = 80.*cm;
71  fWorldSizeR = 20.*cm;
72 
73  fAbsorberThickness = 40.0*mm;
74 
75  fAbsorberRadius = 10.*cm;
76  fZAbsorber = 36.*cm;
77 
78  // create commands for interactive definition of the calorimeter
79 
80  fDetectorMessenger = new F02DetectorMessenger(this);
81 
82  // create materials
83 
84  DefineMaterials();
85 
86 }
F02DetectorConstruction::~F02DetectorConstruction ( )
virtual

Definition at line 90 of file F02DetectorConstruction.cc.

91 {
92  delete fDetectorMessenger;
93 }

Member Function Documentation

G4VPhysicalVolume * F02DetectorConstruction::Construct ( void  )
virtual

Implements G4VUserDetectorConstruction.

Definition at line 97 of file F02DetectorConstruction.cc.

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

Reimplemented from G4VUserDetectorConstruction.

Definition at line 383 of file F02DetectorConstruction.cc.

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

384 {
385  // Sensitive Detectors: Absorber
386 
387  if (!fCalorimeterSD.Get()) {
388  F02CalorimeterSD* calorimeterSD = new F02CalorimeterSD("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 
395  if (!fEmFieldSetup.Get()) {
396  F02ElectricFieldSetup* fieldSetup = new F02ElectricFieldSetup();
397  G4AutoDelete::Register(fieldSetup); //Kernel will delete the messenger
398  fEmFieldSetup.Put(fieldSetup);
399  }
400 }
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* F02DetectorConstruction::GetAbsorber ( )
inline

Definition at line 95 of file F02DetectorConstruction.hh.

Referenced by F02CalorimeterSD::ProcessHits().

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

Definition at line 90 of file F02DetectorConstruction.hh.

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

Definition at line 92 of file F02DetectorConstruction.hh.

Referenced by F02PrimaryGeneratorAction::GeneratePrimaries().

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

Definition at line 91 of file F02DetectorConstruction.hh.

91 {return fAbsorberThickness;}
G4double F02DetectorConstruction::GetAbsorberZpos ( )
inline

Definition at line 86 of file F02DetectorConstruction.hh.

86 {return fZAbsorber;}
G4LogicalVolume* F02DetectorConstruction::GetLogicalAbsorber ( )
inline

Definition at line 96 of file F02DetectorConstruction.hh.

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

Definition at line 94 of file F02DetectorConstruction.hh.

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

Definition at line 82 of file F02DetectorConstruction.hh.

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

Definition at line 84 of file F02DetectorConstruction.hh.

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

Definition at line 83 of file F02DetectorConstruction.hh.

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

Definition at line 88 of file F02DetectorConstruction.hh.

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

Definition at line 87 of file F02DetectorConstruction.hh.

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

Definition at line 277 of file F02DetectorConstruction.cc.

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

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

Definition at line 294 of file F02DetectorConstruction.cc.

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

Referenced by F02DetectorMessenger::SetNewValue().

295 {
296  // get the pointer to the material table
297  const G4MaterialTable* theMaterialTable = G4Material::GetMaterialTable();
298 
299  // search the material by its name
301  for (size_t j=0 ; j<theMaterialTable->size() ; j++)
302  { material = (*theMaterialTable)[j];
303  if (material->GetName() == materialChoice)
304  {
305  fAbsorberMaterial = material;
306  fLogicAbsorber->SetMaterial(material);
308  }
309  }
310 }
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 F02DetectorConstruction::SetAbsorberRadius ( G4double  val)

Definition at line 344 of file F02DetectorConstruction.cc.

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

Referenced by F02DetectorMessenger::SetNewValue().

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

Definition at line 334 of file F02DetectorConstruction.cc.

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

Referenced by F02DetectorMessenger::SetNewValue().

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

Definition at line 374 of file F02DetectorConstruction.cc.

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

Referenced by F02DetectorMessenger::SetNewValue().

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

Definition at line 314 of file F02DetectorConstruction.cc.

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

Referenced by F02DetectorMessenger::SetNewValue().

315 {
316  // get the pointer to the material table
317  const G4MaterialTable* theMaterialTable = G4Material::GetMaterialTable();
318 
319  // search the material by its name
321  for (size_t j=0 ; j<theMaterialTable->size() ; j++)
322  { material = (*theMaterialTable)[j];
323  if(material->GetName() == materialChoice)
324  {
325  fWorldMaterial = material;
326  fLogicWorld->SetMaterial(material);
328  }
329  }
330 }
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 F02DetectorConstruction::SetWorldSizeR ( G4double  val)

Definition at line 364 of file F02DetectorConstruction.cc.

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

Referenced by F02DetectorMessenger::SetNewValue().

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

Definition at line 354 of file F02DetectorConstruction.cc.

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

Referenced by F02DetectorMessenger::SetNewValue().

355 {
356  fWorldChanged = true;
357  fWorldSizeZ = val;
358  ComputeCalorParameters();
360 }
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: