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

#include <GB03DetectorConstruction.hh>

Inheritance diagram for GB03DetectorConstruction:
Collaboration diagram for GB03DetectorConstruction:

Public Member Functions

 GB03DetectorConstruction ()
 
virtual ~GB03DetectorConstruction ()
 
virtual G4VPhysicalVolumeConstruct ()
 
virtual void ConstructSDandField ()
 
void PrintCalorParameters () const
 
void SetAbsorberMaterial (G4String materialChoice)
 
G4String GetAbsorberMaterial () const
 
void SetGapMaterial (G4String materialChoice)
 
G4String GetGapMaterial () const
 
void SetNumberOfLayers (G4int nl)
 
G4int GetVerboseLevel () const
 
void SetVerboseLevel (G4int val)
 
- 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
 

Static Public Member Functions

static G4int GetNumberOfLayers ()
 

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 44 of file GB03DetectorConstruction.hh.

Constructor & Destructor Documentation

GB03DetectorConstruction::GB03DetectorConstruction ( )

Definition at line 64 of file GB03DetectorConstruction.cc.

66  fTotalThickness (2.0*m), fLayerThickness(0.),
67  fConstructed(false),
68  fWorldMaterial(0), fAbsorberMaterial(0), fGapMaterial(0),
69  fLayerSolid(0), fGapSolid(0),
70  fWorldLogical(0), fCalorLogical(0), fLayerLogical(0), fGapLogical(0),
71  fWorldPhysical(0), fCalorPhysical(0), fLayerPhysical(0), fGapPhysical(0),
72  fDetectorMessenger(0), fVerboseLevel(1)
73 {
74  fLayerThickness = fTotalThickness / fNumberOfLayers;
75  fCalName = "Calor";
76  fDetectorMessenger = new GB03DetectorMessenger(this);
77 }
static constexpr double m
Definition: G4SIunits.hh:129
GB03DetectorConstruction::~GB03DetectorConstruction ( )
virtual

Definition at line 81 of file GB03DetectorConstruction.cc.

82 { delete fDetectorMessenger;}

Member Function Documentation

G4VPhysicalVolume * GB03DetectorConstruction::Construct ( void  )
virtual

Implements G4VUserDetectorConstruction.

Definition at line 86 of file GB03DetectorConstruction.cc.

87 {
88  if(!fConstructed)
89  {
90  fConstructed = true;
91  DefineMaterials();
92  SetupGeometry();
93  }
94  if (GetVerboseLevel()>0)
96 
97  return fWorldPhysical;
98 }

Here is the call graph for this function:

void GB03DetectorConstruction::ConstructSDandField ( )
virtual

Reimplemented from G4VUserDetectorConstruction.

Definition at line 102 of file GB03DetectorConstruction.cc.

103 {
104  if(!fConstructedSDandField)
105  {
106  fConstructedSDandField = true;
107  SetupDetectors();
108  SetupBiasing();
109  }
110 }
G4String GB03DetectorConstruction::GetAbsorberMaterial ( ) const

Definition at line 360 of file GB03DetectorConstruction.cc.

361 { return fAbsorberMaterial->GetName(); }
const G4String & GetName() const
Definition: G4Material.hh:178

Here is the call graph for this function:

Here is the caller graph for this function:

G4String GB03DetectorConstruction::GetGapMaterial ( ) const

Definition at line 388 of file GB03DetectorConstruction.cc.

389 { return fGapMaterial->GetName(); }
const G4String & GetName() const
Definition: G4Material.hh:178

Here is the call graph for this function:

Here is the caller graph for this function:

static G4int GB03DetectorConstruction::GetNumberOfLayers ( )
inlinestatic

Definition at line 59 of file GB03DetectorConstruction.hh.

59 { return fNumberOfLayers; }

Here is the caller graph for this function:

G4int GB03DetectorConstruction::GetVerboseLevel ( ) const
inline

Definition at line 61 of file GB03DetectorConstruction.hh.

61 { return fVerboseLevel; }

Here is the caller graph for this function:

void GB03DetectorConstruction::PrintCalorParameters ( ) const

Definition at line 322 of file GB03DetectorConstruction.cc.

323 {
324  G4cout
325  << "--------------------------------------------------------" << G4endl;
326  G4cout
327  << " Absorber is made of " << fAbsorberMaterial->GetName() << G4endl
328  << " Gap is made of " << fGapMaterial->GetName() << G4endl
329  << "--------------------------------------------------------" << G4endl;
330 }
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:

Here is the caller graph for this function:

void GB03DetectorConstruction::SetAbsorberMaterial ( G4String  materialChoice)

Definition at line 334 of file GB03DetectorConstruction.cc.

335 {
336  // search the material by its name
337  G4Material* pttoMaterial = G4Material::GetMaterial(materialChoice);
338  if(pttoMaterial)
339  {
340  fAbsorberMaterial = pttoMaterial;
341  if(fConstructed)
342  {
343  fCalorLogical->SetMaterial(fAbsorberMaterial);
344  fLayerLogical->SetMaterial(fAbsorberMaterial);
345  }
347  if (GetVerboseLevel()>1) {
349  }
350  }
351  else
352  {
353  G4cerr
354  << materialChoice << " is not defined. - Command is ignored." << G4endl;
355  }
356 }
void GeometryHasBeenModified(G4bool prop=true)
static G4Material * GetMaterial(const G4String &name, G4bool warning=true)
Definition: G4Material.cc:602
static G4RunManager * GetRunManager()
Definition: G4RunManager.cc:79
#define G4endl
Definition: G4ios.hh:61
void SetMaterial(G4Material *pMaterial)
G4GLOB_DLL std::ostream G4cerr

Here is the call graph for this function:

Here is the caller graph for this function:

void GB03DetectorConstruction::SetGapMaterial ( G4String  materialChoice)

Definition at line 365 of file GB03DetectorConstruction.cc.

366 {
367  // search the material by its name
368  G4Material* pttoMaterial = G4Material::GetMaterial(materialChoice);
369  if(pttoMaterial)
370  {
371  fGapMaterial = pttoMaterial;
372  if(fConstructed)
373  { fGapLogical->SetMaterial(fGapMaterial); }
375  if (GetVerboseLevel()>1) {
377  }
378  }
379  else
380  {
381  G4cerr
382  << materialChoice << " is not defined. - Command is ignored." << G4endl;
383  }
384 }
void GeometryHasBeenModified(G4bool prop=true)
static G4Material * GetMaterial(const G4String &name, G4bool warning=true)
Definition: G4Material.cc:602
static G4RunManager * GetRunManager()
Definition: G4RunManager.cc:79
#define G4endl
Definition: G4ios.hh:61
void SetMaterial(G4Material *pMaterial)
G4GLOB_DLL std::ostream G4cerr

Here is the call graph for this function:

Here is the caller graph for this function:

void GB03DetectorConstruction::SetNumberOfLayers ( G4int  nl)

Definition at line 393 of file GB03DetectorConstruction.cc.

394 {
395  fNumberOfLayers = nl;
396  fLayerThickness = fTotalThickness/fNumberOfLayers;
397  if(!fConstructed) return;
398 
399  fLayerSolid->SetZHalfLength(fLayerThickness/2.);
400  fGapSolid->SetZHalfLength(fLayerThickness/4.);
401 
402  fCalorLogical->RemoveDaughter(fLayerPhysical);
403  delete fLayerPhysical;
404  fLayerPhysical
405  = new G4PVReplica(fCalName+"_Layer",fLayerLogical,fCalorLogical,
406  kZAxis,fNumberOfLayers,fLayerThickness);
407  fGapPhysical->SetTranslation(G4ThreeVector(0.,0.,fLayerThickness/4.));
408 
410 }
void GeometryHasBeenModified(G4bool prop=true)
void SetZHalfLength(G4double dz)
Definition: G4Box.cc:174
CLHEP::Hep3Vector G4ThreeVector
void SetTranslation(const G4ThreeVector &v)
static G4RunManager * GetRunManager()
Definition: G4RunManager.cc:79
void RemoveDaughter(const G4VPhysicalVolume *p)

Here is the call graph for this function:

Here is the caller graph for this function:

void GB03DetectorConstruction::SetVerboseLevel ( G4int  val)
inline

Definition at line 62 of file GB03DetectorConstruction.hh.

62 { fVerboseLevel = val; }

Here is the caller graph for this function:


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