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

#include <ExN03DetectorConstruction.hh>

Inheritance diagram for ExN03DetectorConstruction:
Collaboration diagram for ExN03DetectorConstruction:

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)
 
G4VPhysicalVolumeConstruct ()
 
void UpdateGeometry ()
 
void PrintCalorParameters ()
 
G4double GetWorldSizeX ()
 
G4double GetWorldSizeYZ ()
 
G4double GetCalorThickness ()
 
G4double GetCalorSizeYZ ()
 
G4int GetNbOfLayers ()
 
G4MaterialGetAbsorberMaterial ()
 
G4double GetAbsorberThickness ()
 
G4MaterialGetGapMaterial ()
 
G4double GetGapThickness ()
 
const G4VPhysicalVolumeGetphysiWorld ()
 
const G4VPhysicalVolumeGetAbsorber ()
 
const G4VPhysicalVolumeGetGap ()
 
- 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
 
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 49 of file ExN03DetectorConstruction.hh.

Constructor & Destructor Documentation

ExN03DetectorConstruction::ExN03DetectorConstruction ( )

Definition at line 56 of file ExN03DetectorConstruction.cc.

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 }
static constexpr double mm
Definition: G4SIunits.hh:115
static constexpr double cm
Definition: G4SIunits.hh:119

Here is the call graph for this function:

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.

92 {return physiAbsorber;};

Here is the caller graph for this function:

G4Material* ExN03DetectorConstruction::GetAbsorberMaterial ( )
inline

Definition at line 85 of file ExN03DetectorConstruction.hh.

85 {return AbsorberMaterial;};

Here is the caller graph for this function:

G4double ExN03DetectorConstruction::GetAbsorberThickness ( )
inline

Definition at line 86 of file ExN03DetectorConstruction.hh.

86 {return AbsorberThickness;};

Here is the caller graph for this function:

G4double ExN03DetectorConstruction::GetCalorSizeYZ ( )
inline

Definition at line 81 of file ExN03DetectorConstruction.hh.

81 {return CalorSizeYZ;};

Here is the caller graph for this function:

G4double ExN03DetectorConstruction::GetCalorThickness ( )
inline

Definition at line 80 of file ExN03DetectorConstruction.hh.

80 {return CalorThickness;};

Here is the caller graph for this function:

const G4VPhysicalVolume* ExN03DetectorConstruction::GetGap ( )
inline

Definition at line 93 of file ExN03DetectorConstruction.hh.

93 {return physiGap;};

Here is the caller graph for this function:

G4Material* ExN03DetectorConstruction::GetGapMaterial ( )
inline

Definition at line 88 of file ExN03DetectorConstruction.hh.

88 {return GapMaterial;};

Here is the caller graph for this function:

G4double ExN03DetectorConstruction::GetGapThickness ( )
inline

Definition at line 89 of file ExN03DetectorConstruction.hh.

89 {return GapThickness;};

Here is the caller graph for this function:

G4int ExN03DetectorConstruction::GetNbOfLayers ( )
inline

Definition at line 83 of file ExN03DetectorConstruction.hh.

83 {return NbOfLayers;};

Here is the caller graph for this function:

const G4VPhysicalVolume* ExN03DetectorConstruction::GetphysiWorld ( )
inline

Definition at line 91 of file ExN03DetectorConstruction.hh.

91 {return physiWorld;};

Here is the caller graph for this function:

G4double ExN03DetectorConstruction::GetWorldSizeX ( )
inline

Definition at line 77 of file ExN03DetectorConstruction.hh.

77 {return WorldSizeX;};

Here is the caller graph for this function:

G4double ExN03DetectorConstruction::GetWorldSizeYZ ( )
inline

Definition at line 78 of file ExN03DetectorConstruction.hh.

78 {return WorldSizeYZ;};

Here is the caller graph for this function:

void ExN03DetectorConstruction::PrintCalorParameters ( )

Definition at line 383 of file ExN03DetectorConstruction.cc.

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 }
static constexpr double mm
Definition: G4SIunits.hh:115
const G4String & GetName() const
Definition: G4Material.hh:178
G4GLOB_DLL std::ostream G4cout

Here is the call graph for this function:

Here is the caller graph for this function:

void ExN03DetectorConstruction::SetAbsorberMaterial ( G4String  materialChoice)

Definition at line 395 of file ExN03DetectorConstruction.cc.

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:602

Here is the call graph for this function:

Here is the caller graph for this function:

void ExN03DetectorConstruction::SetAbsorberThickness ( G4double  val)

Definition at line 413 of file ExN03DetectorConstruction.cc.

414 {
415  // change Absorber thickness and recompute the calorimeter parameters
416  AbsorberThickness = val;
417 }

Here is the caller graph for this function:

void ExN03DetectorConstruction::SetCalorSizeYZ ( G4double  val)

Definition at line 429 of file ExN03DetectorConstruction.cc.

430 {
431  // change the transverse size and recompute the calorimeter parameters
432  CalorSizeYZ = val;
433 }

Here is the caller graph for this function:

void ExN03DetectorConstruction::SetGapMaterial ( G4String  materialChoice)

Definition at line 404 of file ExN03DetectorConstruction.cc.

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:602

Here is the call graph for this function:

Here is the caller graph for this function:

void ExN03DetectorConstruction::SetGapThickness ( G4double  val)

Definition at line 421 of file ExN03DetectorConstruction.cc.

422 {
423  // change Gap thickness and recompute the calorimeter parameters
424  GapThickness = val;
425 }

Here is the caller graph for this function:

void ExN03DetectorConstruction::SetMagField ( G4double  fieldValue)

Definition at line 447 of file ExN03DetectorConstruction.cc.

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)

Here is the call graph for this function:

Here is the caller graph for this function:

void ExN03DetectorConstruction::SetNbOfLayers ( G4int  val)

Definition at line 437 of file ExN03DetectorConstruction.cc.

438 {
439  NbOfLayers = val;
440 }

Here is the caller graph for this function:

void ExN03DetectorConstruction::UpdateGeometry ( )

Definition at line 469 of file ExN03DetectorConstruction.cc.

470 {
471  G4RunManager::GetRunManager()->DefineWorldVolume(ConstructCalorimeter());
472 }
virtual void DefineWorldVolume(G4VPhysicalVolume *worldVol, G4bool topologyIsChanged=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: