Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
F02DetectorConstruction Class Reference

#include <F02DetectorConstruction.hh>

Inheritance diagram for F02DetectorConstruction:
Collaboration diagram for F02DetectorConstruction:

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 60 of file F02DetectorConstruction.cc.

62  fDetectorMessenger(0),
63  fSolidWorld(0), fLogicWorld(0), fPhysiWorld(0),
64  fSolidAbsorber(0),fLogicAbsorber(0), fPhysiAbsorber(0),
65  fAbsorberMaterial(0), fAbsorberThickness(0.), fAbsorberRadius(0.),
66  fWorldChanged(false), fZAbsorber(0.), fZStartAbs(0.), fZEndAbs(0.),
67  fWorldMaterial(0), fWorldSizeR(0.), fWorldSizeZ(0.)
68 {
69  // default parameter values of the calorimeter
70 
71  fWorldSizeZ = 80.*cm;
72  fWorldSizeR = 20.*cm;
73 
74  fAbsorberThickness = 40.0*mm;
75 
76  fAbsorberRadius = 10.*cm;
77  fZAbsorber = 36.*cm;
78 
79  // create commands for interactive definition of the calorimeter
80 
81  fDetectorMessenger = new F02DetectorMessenger(this);
82 
83  // create materials
84 
85  DefineMaterials();
86 
87 }
static constexpr double mm
Definition: G4SIunits.hh:115
static constexpr double cm
Definition: G4SIunits.hh:119
F02DetectorConstruction::~F02DetectorConstruction ( )
virtual

Definition at line 91 of file F02DetectorConstruction.cc.

92 {
93  delete fDetectorMessenger;
94 }

Member Function Documentation

G4VPhysicalVolume * F02DetectorConstruction::Construct ( void  )
virtual

Implements G4VUserDetectorConstruction.

Definition at line 98 of file F02DetectorConstruction.cc.

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

Reimplemented from G4VUserDetectorConstruction.

Definition at line 384 of file F02DetectorConstruction.cc.

385 {
386  // Sensitive Detectors: Absorber
387 
388  if (!fCalorimeterSD.Get()) {
389  F02CalorimeterSD* calorimeterSD = new F02CalorimeterSD("CalorSD",this);
390  fCalorimeterSD.Put(calorimeterSD);
391  }
392  G4SDManager::GetSDMpointer()->AddNewDetector(fCalorimeterSD.Get());
393  SetSensitiveDetector(fLogicAbsorber, fCalorimeterSD.Get());
394 
395  // Construct the field creator - this will register the field it creates
396 
397  if (!fEmFieldSetup.Get()) {
398  F02ElectricFieldSetup* fieldSetup = new F02ElectricFieldSetup();
399  G4AutoDelete::Register(fieldSetup); //Kernel will delete the messenger
400  fEmFieldSetup.Put(fieldSetup);
401  }
402 }
value_type & Get() const
Definition: G4Cache.hh:282
void Register(T *inst)
Definition: G4AutoDelete.hh:65
void SetSensitiveDetector(const G4String &logVolName, G4VSensitiveDetector *aSD, G4bool multi=false)
void AddNewDetector(G4VSensitiveDetector *aSD)
Definition: G4SDManager.cc:71
static G4SDManager * GetSDMpointer()
Definition: G4SDManager.cc:40
void Put(const value_type &val) const
Definition: G4Cache.hh:286

Here is the call graph for this function:

const G4VPhysicalVolume* F02DetectorConstruction::GetAbsorber ( )
inline

Definition at line 95 of file F02DetectorConstruction.hh.

95 {return fPhysiAbsorber;}

Here is the caller graph for this function:

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.

92 {return fAbsorberRadius;}

Here is the caller graph for this function:

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 278 of file F02DetectorConstruction.cc.

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

Here is the call graph for this function:

void F02DetectorConstruction::SetAbsorberMaterial ( G4String  materialChoice)

Definition at line 295 of file F02DetectorConstruction.cc.

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

Here is the call graph for this function:

Here is the caller graph for this function:

void F02DetectorConstruction::SetAbsorberRadius ( G4double  val)

Definition at line 345 of file F02DetectorConstruction.cc.

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

Here is the call graph for this function:

Here is the caller graph for this function:

void F02DetectorConstruction::SetAbsorberThickness ( G4double  val)

Definition at line 335 of file F02DetectorConstruction.cc.

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

Here is the call graph for this function:

Here is the caller graph for this function:

void F02DetectorConstruction::SetAbsorberZpos ( G4double  val)

Definition at line 375 of file F02DetectorConstruction.cc.

376 {
377  fZAbsorber = val;
378  ComputeCalorParameters();
380 }
void ReinitializeGeometry(G4bool destroyFirst=false, G4bool prop=true)
static G4RunManager * GetRunManager()
Definition: G4RunManager.cc:79

Here is the call graph for this function:

Here is the caller graph for this function:

void F02DetectorConstruction::SetWorldMaterial ( G4String  materialChoice)

Definition at line 315 of file F02DetectorConstruction.cc.

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

Here is the call graph for this function:

Here is the caller graph for this function:

void F02DetectorConstruction::SetWorldSizeR ( G4double  val)

Definition at line 365 of file F02DetectorConstruction.cc.

366 {
367  fWorldChanged = true;
368  fWorldSizeR = val;
369  ComputeCalorParameters();
371 }
void ReinitializeGeometry(G4bool destroyFirst=false, G4bool prop=true)
static G4RunManager * GetRunManager()
Definition: G4RunManager.cc:79

Here is the call graph for this function:

Here is the caller graph for this function:

void F02DetectorConstruction::SetWorldSizeZ ( G4double  val)

Definition at line 355 of file F02DetectorConstruction.cc.

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

Here is the call graph for this function:

Here is the caller graph for this function:


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