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

#include <F01DetectorConstruction.hh>

Inheritance diagram for F01DetectorConstruction:
Collaboration diagram for F01DetectorConstruction:

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 G4VPhysicalVolume * Construct ()
 
virtual void ConstructSDandField ()
 
void PrintCalorParameters ()
 
G4Material * GetWorldMaterial ()
 
G4double GetWorldSizeZ ()
 
G4double GetWorldSizeR ()
 
G4double GetAbsorberZpos ()
 
G4double GetZStartAbs ()
 
G4double GetZEndAbs ()
 
G4Material * GetAbsorberMaterial ()
 
G4double GetAbsorberThickness ()
 
G4double GetAbsorberRadius ()
 
const G4VPhysicalVolume * GetPhysiWorld ()
 
const G4VPhysicalVolume * GetAbsorber ()
 
G4LogicalVolume * GetLogicalAbsorber ()
 
- 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
 
G4VUserParallelWorld * GetParallelWorld (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 60 of file F01DetectorConstruction.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  fZAbsorber(0.), fZStartAbs(0.), fZEndAbs(0.),
67  fWorldMaterial(0), fWorldSizeR(0.), fWorldSizeZ(0.)
68 {
69  // default parameter values of the calorimeter
70 
71  fWorldSizeZ = 44000.*mm;
72  fWorldSizeR = 22000.*mm;
73 
74  fAbsorberThickness = 1.0*mm;
75 
76  fAbsorberRadius = 20000.*mm;
77  fZAbsorber = 21990.0*mm;
78 
79  // create commands for interactive definition of the calorimeter
80 
81  fDetectorMessenger = new F01DetectorMessenger(this);
82 
83  // create materials
84 
85  DefineMaterials();
86 
87 }
static constexpr double mm
Definition: G4SIunits.hh:115
F01DetectorConstruction::~F01DetectorConstruction ( )
virtual

Definition at line 91 of file F01DetectorConstruction.cc.

92 {
93  delete fDetectorMessenger;
94 }

Member Function Documentation

G4VPhysicalVolume * F01DetectorConstruction::Construct ( void  )
virtual

Implements G4VUserDetectorConstruction.

Definition at line 98 of file F01DetectorConstruction.cc.

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

Reimplemented from G4VUserDetectorConstruction.

Definition at line 384 of file F01DetectorConstruction.cc.

385 {
386  // Sensitive Detectors: Absorber
387 
388  if (!fCalorimeterSD.Get()) {
389  F01CalorimeterSD* calorimeterSD = new F01CalorimeterSD("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  if (!fEmFieldSetup.Get()) {
397  F01FieldSetup* fieldSetup
398  = new F01FieldSetup(G4ThreeVector( 3.3*tesla, 0.0, 0.0 ) );
399  G4AutoDelete::Register(fieldSetup); // Kernel will delete the F01FieldSetup
400  fEmFieldSetup.Put(fieldSetup);
401  }
402 }
static constexpr double tesla
Definition: G4SIunits.hh:268
CLHEP::Hep3Vector G4ThreeVector
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* F01DetectorConstruction::GetAbsorber ( )
inline

Definition at line 95 of file F01DetectorConstruction.hh.

95 {return fPhysiAbsorber;}

Here is the caller graph for this function:

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.

92 {return fAbsorberRadius;}

Here is the caller graph for this function:

G4double F01DetectorConstruction::GetAbsorberThickness ( )
inline

Definition at line 91 of file F01DetectorConstruction.hh.

91 {return fAbsorberThickness;}

Here is the caller graph for this function:

G4double F01DetectorConstruction::GetAbsorberZpos ( )
inline

Definition at line 86 of file F01DetectorConstruction.hh.

86 {return fZAbsorber;}

Here is the caller graph for this function:

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 280 of file F01DetectorConstruction.cc.

281 {
282  G4cout << "\n The WORLD is made of "
283  << fWorldSizeZ/mm << "mm of " << fWorldMaterial->GetName();
284  G4cout << ", the transverse size (R) of the world is "
285  << fWorldSizeR/mm << " mm. " << G4endl;
286  G4cout << " The ABSORBER is made of "
287  << fAbsorberThickness/mm << "mm of " << fAbsorberMaterial->GetName();
288  G4cout << ", the transverse size (R) is " << fAbsorberRadius/mm
289  << " mm. " << G4endl;
290  G4cout << " Z position of the (middle of the) absorber "
291  << fZAbsorber/mm << " mm." << G4endl;
292  G4cout << G4endl;
293 }
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 F01DetectorConstruction::SetAbsorberMaterial ( G4String  materialChoice)

Definition at line 297 of file F01DetectorConstruction.cc.

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

Definition at line 347 of file F01DetectorConstruction.cc.

348 {
349  // change the transverse size and recompute the calorimeter parameters
350  fAbsorberRadius = val;
351  ComputeCalorParameters();
353 }
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 F01DetectorConstruction::SetAbsorberThickness ( G4double  val)

Definition at line 337 of file F01DetectorConstruction.cc.

338 {
339  // change Absorber thickness and recompute the calorimeter parameters
340  fAbsorberThickness = val;
341  ComputeCalorParameters();
343 }
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 F01DetectorConstruction::SetAbsorberZpos ( G4double  val)

Definition at line 375 of file F01DetectorConstruction.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 F01DetectorConstruction::SetWorldMaterial ( G4String  materialChoice)

Definition at line 317 of file F01DetectorConstruction.cc.

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

Definition at line 366 of file F01DetectorConstruction.cc.

367 {
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 F01DetectorConstruction::SetWorldSizeZ ( G4double  val)

Definition at line 357 of file F01DetectorConstruction.cc.

358 {
359  fWorldSizeZ = val;
360  ComputeCalorParameters();
362 }
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: