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

#include <ExN03DetectorConstruction.hh>

Inheritance diagram for ExN03DetectorConstruction:
G4VUserDetectorConstruction

Public Member Functions

 ExN03DetectorConstruction ()
 
 ~ExN03DetectorConstruction ()
 
void SetAbsorberMaterial (G4String)
 
void SetAbsorberThickness (G4double)
 
void SetGapMaterial (G4String)
 
void SetGapThickness (G4double)
 
void SetCalorSizeYZ (G4double)
 
void SetNbOfLayers (G4int)
 
void SetMagField (G4double)
 
G4VPhysicalVolume * Construct ()
 
void UpdateGeometry ()
 
void PrintCalorParameters ()
 
G4double GetWorldSizeX ()
 
G4double GetWorldSizeYZ ()
 
G4double GetCalorThickness ()
 
G4double GetCalorSizeYZ ()
 
G4int GetNbOfLayers ()
 
G4Material * GetAbsorberMaterial ()
 
G4double GetAbsorberThickness ()
 
G4Material * GetGapMaterial ()
 
G4double GetGapThickness ()
 
const G4VPhysicalVolume * GetphysiWorld ()
 
const G4VPhysicalVolume * GetAbsorber ()
 
const G4VPhysicalVolume * GetGap ()
 
- Public Member Functions inherited from G4VUserDetectorConstruction
 G4VUserDetectorConstruction ()
 
virtual ~G4VUserDetectorConstruction ()
 
virtual void ConstructSDandField ()
 
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 49 of file ExN03DetectorConstruction.hh.

Constructor & Destructor Documentation

ExN03DetectorConstruction::ExN03DetectorConstruction ( )

Definition at line 56 of file ExN03DetectorConstruction.cc.

References python.hepunit::cm, python.hepunit::mm, SetAbsorberMaterial(), and SetGapMaterial().

57 :AbsorberMaterial(0),GapMaterial(0),defaultMaterial(0),
58  solidWorld(0),logicWorld(0),physiWorld(0),
59  solidCalor(0),logicCalor(0),physiCalor(0),
60  solidLayer(0),logicLayer(0),physiLayer(0),
61  solidAbsorber(0),logicAbsorber(0),physiAbsorber(0),
62  solidGap (0),logicGap (0),physiGap (0),
63  magField(0)
64 {
65  // default parameter values of the calorimeter
66  AbsorberThickness = 10.*mm;
67  GapThickness = 5.*mm;
68  NbOfLayers = 10;
69  CalorSizeYZ = 10.*cm;
70  ComputeCalorParameters();
71 
72  // materials
73  DefineMaterials();
74  SetAbsorberMaterial("Lead");
75  SetGapMaterial("liquidArgon");
76 
77  // create commands for interactive definition of the calorimeter
78  detectorMessenger = new ExN03DetectorMessenger(this);
79 }
ExN03DetectorConstruction::~ExN03DetectorConstruction ( )

Definition at line 83 of file ExN03DetectorConstruction.cc.

84 { delete detectorMessenger;}

Member Function Documentation

G4VPhysicalVolume * ExN03DetectorConstruction::Construct ( void  )
virtual

Implements G4VUserDetectorConstruction.

Definition at line 88 of file ExN03DetectorConstruction.cc.

89 {
90  return ConstructCalorimeter();
91 }
const G4VPhysicalVolume* ExN03DetectorConstruction::GetAbsorber ( )
inline

Definition at line 92 of file ExN03DetectorConstruction.hh.

Referenced by BOOST_PYTHON_MODULE().

92 {return physiAbsorber;};
G4Material* ExN03DetectorConstruction::GetAbsorberMaterial ( )
inline

Definition at line 85 of file ExN03DetectorConstruction.hh.

Referenced by BOOST_PYTHON_MODULE().

85 {return AbsorberMaterial;};
G4double ExN03DetectorConstruction::GetAbsorberThickness ( )
inline

Definition at line 86 of file ExN03DetectorConstruction.hh.

Referenced by BOOST_PYTHON_MODULE().

86 {return AbsorberThickness;};
G4double ExN03DetectorConstruction::GetCalorSizeYZ ( )
inline

Definition at line 81 of file ExN03DetectorConstruction.hh.

Referenced by BOOST_PYTHON_MODULE().

81 {return CalorSizeYZ;};
G4double ExN03DetectorConstruction::GetCalorThickness ( )
inline

Definition at line 80 of file ExN03DetectorConstruction.hh.

Referenced by BOOST_PYTHON_MODULE().

80 {return CalorThickness;};
const G4VPhysicalVolume* ExN03DetectorConstruction::GetGap ( )
inline

Definition at line 93 of file ExN03DetectorConstruction.hh.

Referenced by BOOST_PYTHON_MODULE().

93 {return physiGap;};
G4Material* ExN03DetectorConstruction::GetGapMaterial ( )
inline

Definition at line 88 of file ExN03DetectorConstruction.hh.

Referenced by BOOST_PYTHON_MODULE().

88 {return GapMaterial;};
G4double ExN03DetectorConstruction::GetGapThickness ( )
inline

Definition at line 89 of file ExN03DetectorConstruction.hh.

Referenced by BOOST_PYTHON_MODULE().

89 {return GapThickness;};
G4int ExN03DetectorConstruction::GetNbOfLayers ( )
inline

Definition at line 83 of file ExN03DetectorConstruction.hh.

Referenced by BOOST_PYTHON_MODULE().

83 {return NbOfLayers;};
const G4VPhysicalVolume* ExN03DetectorConstruction::GetphysiWorld ( )
inline

Definition at line 91 of file ExN03DetectorConstruction.hh.

Referenced by BOOST_PYTHON_MODULE().

91 {return physiWorld;};
G4double ExN03DetectorConstruction::GetWorldSizeX ( )
inline

Definition at line 77 of file ExN03DetectorConstruction.hh.

Referenced by BOOST_PYTHON_MODULE().

77 {return WorldSizeX;};
G4double ExN03DetectorConstruction::GetWorldSizeYZ ( )
inline

Definition at line 78 of file ExN03DetectorConstruction.hh.

Referenced by BOOST_PYTHON_MODULE().

78 {return WorldSizeYZ;};
void ExN03DetectorConstruction::PrintCalorParameters ( )

Definition at line 383 of file ExN03DetectorConstruction.cc.

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

Referenced by BOOST_PYTHON_MODULE().

384 {
385  G4cout << "\n------------------------------------------------------------"
386  << "\n---> The calorimeter is " << NbOfLayers << " layers of: [ "
387  << AbsorberThickness/mm << "mm of " << AbsorberMaterial->GetName()
388  << " + "
389  << GapThickness/mm << "mm of " << GapMaterial->GetName() << " ] "
390  << "\n------------------------------------------------------------\n";
391 }
const G4String & GetName() const
Definition: G4Material.hh:176
G4GLOB_DLL std::ostream G4cout
void ExN03DetectorConstruction::SetAbsorberMaterial ( G4String  materialChoice)

Definition at line 395 of file ExN03DetectorConstruction.cc.

References G4Material::GetMaterial().

Referenced by BOOST_PYTHON_MODULE(), ExN03DetectorConstruction(), and ExN03DetectorMessenger::SetNewValue().

396 {
397  // search the material by its name
398  G4Material* pttoMaterial = G4Material::GetMaterial(materialChoice);
399  if (pttoMaterial) AbsorberMaterial = pttoMaterial;
400 }
static G4Material * GetMaterial(const G4String &name, G4bool warning=true)
Definition: G4Material.cc:578
void ExN03DetectorConstruction::SetAbsorberThickness ( G4double  val)

Definition at line 413 of file ExN03DetectorConstruction.cc.

Referenced by BOOST_PYTHON_MODULE(), and ExN03DetectorMessenger::SetNewValue().

414 {
415  // change Absorber thickness and recompute the calorimeter parameters
416  AbsorberThickness = val;
417 }
void ExN03DetectorConstruction::SetCalorSizeYZ ( G4double  val)

Definition at line 429 of file ExN03DetectorConstruction.cc.

Referenced by BOOST_PYTHON_MODULE(), and ExN03DetectorMessenger::SetNewValue().

430 {
431  // change the transverse size and recompute the calorimeter parameters
432  CalorSizeYZ = val;
433 }
void ExN03DetectorConstruction::SetGapMaterial ( G4String  materialChoice)

Definition at line 404 of file ExN03DetectorConstruction.cc.

References G4Material::GetMaterial().

Referenced by BOOST_PYTHON_MODULE(), ExN03DetectorConstruction(), and ExN03DetectorMessenger::SetNewValue().

405 {
406  // search the material by its name
407  G4Material* pttoMaterial = G4Material::GetMaterial(materialChoice);
408  if (pttoMaterial) GapMaterial = pttoMaterial;
409 }
static G4Material * GetMaterial(const G4String &name, G4bool warning=true)
Definition: G4Material.cc:578
void ExN03DetectorConstruction::SetGapThickness ( G4double  val)

Definition at line 421 of file ExN03DetectorConstruction.cc.

Referenced by BOOST_PYTHON_MODULE(), and ExN03DetectorMessenger::SetNewValue().

422 {
423  // change Gap thickness and recompute the calorimeter parameters
424  GapThickness = val;
425 }
void ExN03DetectorConstruction::SetMagField ( G4double  fieldValue)

Definition at line 447 of file ExN03DetectorConstruction.cc.

References G4FieldManager::CreateChordFinder(), G4TransportationManager::GetFieldManager(), G4TransportationManager::GetTransportationManager(), and G4FieldManager::SetDetectorField().

Referenced by BOOST_PYTHON_MODULE(), and ExN03DetectorMessenger::SetNewValue().

448 {
449  //apply a global uniform magnetic field along Z axis
450  G4FieldManager* fieldMgr
452 
453  if(magField) delete magField; //delete the existing magn field
454 
455  if(fieldValue!=0.) // create a new one if non nul
456  { magField = new G4UniformMagField(G4ThreeVector(0.,0.,fieldValue));
457  fieldMgr->SetDetectorField(magField);
458  fieldMgr->CreateChordFinder(magField);
459  } else {
460  magField = 0;
461  fieldMgr->SetDetectorField(magField);
462  }
463 }
CLHEP::Hep3Vector G4ThreeVector
G4bool SetDetectorField(G4Field *detectorField)
static G4TransportationManager * GetTransportationManager()
G4FieldManager * GetFieldManager() const
void CreateChordFinder(G4MagneticField *detectorMagField)
void ExN03DetectorConstruction::SetNbOfLayers ( G4int  val)

Definition at line 437 of file ExN03DetectorConstruction.cc.

Referenced by BOOST_PYTHON_MODULE(), and ExN03DetectorMessenger::SetNewValue().

438 {
439  NbOfLayers = val;
440 }
void ExN03DetectorConstruction::UpdateGeometry ( )

Definition at line 469 of file ExN03DetectorConstruction.cc.

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

Referenced by BOOST_PYTHON_MODULE(), and ExN03DetectorMessenger::SetNewValue().

470 {
471  G4RunManager::GetRunManager()->DefineWorldVolume(ConstructCalorimeter());
472 }
virtual void DefineWorldVolume(G4VPhysicalVolume *worldVol, G4bool topologyIsChanged=true)
static G4RunManager * GetRunManager()
Definition: G4RunManager.cc:74

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