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

#include <F03DetectorConstruction.hh>

Inheritance diagram for F03DetectorConstruction:
G4VUserDetectorConstruction

Public Member Functions

 F03DetectorConstruction ()
 
virtual ~F03DetectorConstruction ()
 
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 55 of file F03DetectorConstruction.hh.

Constructor & Destructor Documentation

F03DetectorConstruction::F03DetectorConstruction ( )

Definition at line 59 of file F03DetectorConstruction.cc.

61  fDetectorMessenger(0),
62  fSolidWorld(0), fLogicWorld(0), fPhysiWorld(0),
63  fSolidAbsorber(0), fLogicAbsorber(0), fPhysiAbsorber(0),
64  fSolidRadSlice(0), fLogicRadSlice(0), fPhysiRadSlice(0),
65  fSolidRadiator(0), fLogicRadiator(0), fPhysiRadiator(0),
66  fWorldMaterial(0), fAbsorberMaterial(0), fRadiatorMat(0),
67  // default parameter values of the calorimeter
68  fWorldSizeR( 22000.*mm),
69  fWorldSizeZ( 44000.*mm),
70  fAbsorberThickness( 1.*mm),
71  fAbsorberRadius( 20000.*mm),
72  fZAbsorber( 21990.*mm),
73  fZStartAbs( 0.),
74  fZEndAbs( 0.),
75  fRadThickness( 100.*mm),
76  fGasGap( 100.*mm),
77  fDetGap( 1.*mm),
78  fFoilNumber(1)
79 {
80  fDetectorMessenger = new F03DetectorMessenger(this);
81 
82  // create materials
83 
84  DefineMaterials();
85 
86 }
F03DetectorConstruction::~F03DetectorConstruction ( )
virtual

Definition at line 90 of file F03DetectorConstruction.cc.

91 {
92  delete fDetectorMessenger;
93 }

Member Function Documentation

G4VPhysicalVolume * F03DetectorConstruction::Construct ( void  )
virtual

Implements G4VUserDetectorConstruction.

Definition at line 97 of file F03DetectorConstruction.cc.

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

Reimplemented from G4VUserDetectorConstruction.

Definition at line 430 of file F03DetectorConstruction.cc.

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

431 {
432  // Sensitive Detectors: Absorber
433 
434  if (!fCalorimeterSD.Get()) {
435  F03CalorimeterSD* calorimeterSD = new F03CalorimeterSD("CalorSD",this);
436  fCalorimeterSD.Put(calorimeterSD);
437  }
438  SetSensitiveDetector(fLogicAbsorber, fCalorimeterSD.Get());
439 
440  // Construct the field creator - this will register the field it creates
441 
442  if (!fEmFieldSetup.Get()) {
443  F03FieldSetup* emFieldSetup = new F03FieldSetup();
444 
445  fEmFieldSetup.Put(emFieldSetup);
446  G4AutoDelete::Register(emFieldSetup); //Kernel will delete the messenger
447  }
448  // Set local field manager and local field in radiator and its daughters:
449  G4bool allLocal = true;
450  fLogicRadiator->SetFieldManager(fEmFieldSetup.Get()->GetLocalFieldManager(),
451  allLocal );
452 }
G4FieldManager * GetLocalFieldManager()
value_type & Get() const
Definition: G4Cache.hh:253
void SetFieldManager(G4FieldManager *pFieldMgr, G4bool forceToAllDaughters)
void Register(T *inst)
Definition: G4AutoDelete.hh:65
bool G4bool
Definition: G4Types.hh:79
void SetSensitiveDetector(const G4String &logVolName, G4VSensitiveDetector *aSD, G4bool multi=false)
void Put(const value_type &val) const
Definition: G4Cache.hh:257
const G4VPhysicalVolume* F03DetectorConstruction::GetAbsorber ( )
inline

Definition at line 94 of file F03DetectorConstruction.hh.

Referenced by F03CalorimeterSD::ProcessHits().

94 {return fPhysiAbsorber;}
G4Material* F03DetectorConstruction::GetAbsorberMaterial ( )
inline

Definition at line 89 of file F03DetectorConstruction.hh.

89 {return fAbsorberMaterial;}
G4double F03DetectorConstruction::GetAbsorberRadius ( )
inline

Definition at line 91 of file F03DetectorConstruction.hh.

Referenced by F03PrimaryGeneratorAction::GeneratePrimaries().

91 {return fAbsorberRadius;}
G4double F03DetectorConstruction::GetAbsorberThickness ( )
inline

Definition at line 90 of file F03DetectorConstruction.hh.

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

90 {return fAbsorberThickness;}
G4double F03DetectorConstruction::GetAbsorberZpos ( )
inline
G4LogicalVolume* F03DetectorConstruction::GetLogicalAbsorber ( )
inline

Definition at line 95 of file F03DetectorConstruction.hh.

95 {return fLogicAbsorber;}
const G4VPhysicalVolume* F03DetectorConstruction::GetPhysiWorld ( )
inline

Definition at line 93 of file F03DetectorConstruction.hh.

93 {return fPhysiWorld;}
G4Material* F03DetectorConstruction::GetWorldMaterial ( )
inline

Definition at line 81 of file F03DetectorConstruction.hh.

81 {return fWorldMaterial;}
G4double F03DetectorConstruction::GetWorldSizeR ( )
inline

Definition at line 83 of file F03DetectorConstruction.hh.

83 {return fWorldSizeR;}
G4double F03DetectorConstruction::GetWorldSizeZ ( )
inline

Definition at line 82 of file F03DetectorConstruction.hh.

82 {return fWorldSizeZ;}
G4double F03DetectorConstruction::GetZEndAbs ( )
inline

Definition at line 87 of file F03DetectorConstruction.hh.

87 {return fZEndAbs;}
G4double F03DetectorConstruction::GetZStartAbs ( )
inline

Definition at line 86 of file F03DetectorConstruction.hh.

86 {return fZStartAbs;}
void F03DetectorConstruction::PrintCalorParameters ( )

Definition at line 326 of file F03DetectorConstruction.cc.

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

327 {
328  G4cout << "\n The WORLD is made of "
329  << fWorldSizeZ/mm << "mm of " << fWorldMaterial->GetName();
330  G4cout << ", the transverse size (R) of the world is "
331  << fWorldSizeR/mm << " mm. " << G4endl;
332  G4cout << " The ABSORBER is made of "
333  << fAbsorberThickness/mm << "mm of " << fAbsorberMaterial->GetName();
334  G4cout << ", the transverse size (R) is " << fAbsorberRadius/mm
335  << " mm. " << G4endl;
336  G4cout << " Z position of the (middle of the) absorber "
337  << fZAbsorber/mm << " mm." << G4endl;
338  G4cout << G4endl;
339 }
const G4String & GetName() const
Definition: G4Material.hh:176
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61
void F03DetectorConstruction::SetAbsorberMaterial ( G4String  materialChoice)

Definition at line 343 of file F03DetectorConstruction.cc.

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

Referenced by F03DetectorMessenger::SetNewValue().

344 {
345  // get the pointer to the material table
346  const G4MaterialTable* theMaterialTable = G4Material::GetMaterialTable();
347 
348  // search the material by its name
350  for (size_t j=0 ; j<theMaterialTable->size() ; j++)
351  { material = (*theMaterialTable)[j];
352  if (material->GetName() == materialChoice)
353  {
354  fAbsorberMaterial = material;
355  fLogicAbsorber->SetMaterial(material);
357  }
358  }
359 }
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 F03DetectorConstruction::SetAbsorberRadius ( G4double  val)

Definition at line 393 of file F03DetectorConstruction.cc.

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

Referenced by F03DetectorMessenger::SetNewValue().

394 {
395  // change the transverse size and recompute the calorimeter parameters
396  fAbsorberRadius = val;
397  ComputeCalorParameters();
399 }
void ReinitializeGeometry(G4bool destroyFirst=false, G4bool prop=true)
static G4RunManager * GetRunManager()
Definition: G4RunManager.cc:74
void F03DetectorConstruction::SetAbsorberThickness ( G4double  val)

Definition at line 383 of file F03DetectorConstruction.cc.

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

Referenced by F03DetectorMessenger::SetNewValue().

384 {
385  // change Absorber thickness and recompute the calorimeter parameters
386  fAbsorberThickness = val;
387  ComputeCalorParameters();
389 }
void ReinitializeGeometry(G4bool destroyFirst=false, G4bool prop=true)
static G4RunManager * GetRunManager()
Definition: G4RunManager.cc:74
void F03DetectorConstruction::SetAbsorberZpos ( G4double  val)

Definition at line 421 of file F03DetectorConstruction.cc.

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

Referenced by F03DetectorMessenger::SetNewValue().

422 {
423  fZAbsorber = val;
424  ComputeCalorParameters();
426 }
void ReinitializeGeometry(G4bool destroyFirst=false, G4bool prop=true)
static G4RunManager * GetRunManager()
Definition: G4RunManager.cc:74
void F03DetectorConstruction::SetWorldMaterial ( G4String  materialChoice)

Definition at line 363 of file F03DetectorConstruction.cc.

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

Referenced by F03DetectorMessenger::SetNewValue().

364 {
365  // get the pointer to the material table
366  const G4MaterialTable* theMaterialTable = G4Material::GetMaterialTable();
367 
368  // search the material by its name
370  for (size_t j=0 ; j<theMaterialTable->size() ; j++)
371  { material = (*theMaterialTable)[j];
372  if(material->GetName() == materialChoice)
373  {
374  fWorldMaterial = material;
375  fLogicWorld->SetMaterial(material);
377  }
378  }
379 }
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 F03DetectorConstruction::SetWorldSizeR ( G4double  val)

Definition at line 412 of file F03DetectorConstruction.cc.

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

Referenced by F03DetectorMessenger::SetNewValue().

413 {
414  fWorldSizeR = val;
415  ComputeCalorParameters();
417 }
void ReinitializeGeometry(G4bool destroyFirst=false, G4bool prop=true)
static G4RunManager * GetRunManager()
Definition: G4RunManager.cc:74
void F03DetectorConstruction::SetWorldSizeZ ( G4double  val)

Definition at line 403 of file F03DetectorConstruction.cc.

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

Referenced by F03DetectorMessenger::SetNewValue().

404 {
405  fWorldSizeZ = val;
406  ComputeCalorParameters();
408 }
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: