Garfield++ 4.0
A toolkit for the detailed simulation of particle detectors based on ionisation measurement in gases and semiconductors
Loading...
Searching...
No Matches
GarfieldDetectorConstruction Class Reference

#include <GarfieldDetectorConstruction.hh>

+ Inheritance diagram for GarfieldDetectorConstruction:

Public Member Functions

 GarfieldDetectorConstruction ()
 
virtual ~GarfieldDetectorConstruction ()
 
virtual G4VPhysicalVolume * Construct () override
 
const G4VPhysicalVolume * GetAbsorberPV () const
 
const G4VPhysicalVolume * GetDriftTubePV () const
 
const G4VPhysicalVolume * GetGasPV () const
 
const G4VPhysicalVolume * GetWirePV () const
 
void SetAbsorberMaterial (G4String materialChoice)
 
G4Material * AbsorberMaterialWithSingleIsotope (G4String name, G4String symbol, G4double density, G4int Z, G4int A)
 

Detailed Description

Detector construction class to define materials and geometry. The drift tube is a cylinder made of Al filled with Ar/CO2. It has a thin window on the base that is adjacent to the absorber plate. In the center of the cylinder is the anode wire made from Tungsten.

The primary particles interact in the absorber and produce secondary particles, which enter the drift tube via the thin window.

Definition at line 52 of file GarfieldDetectorConstruction.hh.

Constructor & Destructor Documentation

◆ GarfieldDetectorConstruction()

GarfieldDetectorConstruction::GarfieldDetectorConstruction ( )

Definition at line 56 of file GarfieldDetectorConstruction.cc.

57 : G4VUserDetectorConstruction() {
58 fGarfieldMessenger = new GarfieldMessenger(this);
59}

◆ ~GarfieldDetectorConstruction()

GarfieldDetectorConstruction::~GarfieldDetectorConstruction ( )
virtual

Definition at line 63 of file GarfieldDetectorConstruction.cc.

63 {
64 delete fGarfieldMessenger;
65}

Member Function Documentation

◆ AbsorberMaterialWithSingleIsotope()

G4Material * GarfieldDetectorConstruction::AbsorberMaterialWithSingleIsotope ( G4String  name,
G4String  symbol,
G4double  density,
G4int  Z,
G4int  A 
)

Definition at line 296 of file GarfieldDetectorConstruction.cc.

297 {
298 // define a material from an isotope
299 //
300 G4int ncomponents;
301 G4double abundance, massfraction;
302
303 G4Isotope* isotope = new G4Isotope(symbol, Z, A);
304
305 G4Element* element = new G4Element(name, symbol, ncomponents = 1);
306 element->AddIsotope(isotope, abundance = 100. * perCent);
307
308 G4Material* material = new G4Material(name, density, ncomponents = 1);
309 material->AddElement(element, massfraction = 100. * perCent);
310
311 return material;
312}

Referenced by GarfieldMessenger::SetNewValue().

◆ Construct()

G4VPhysicalVolume * GarfieldDetectorConstruction::Construct ( )
overridevirtual

Definition at line 69 of file GarfieldDetectorConstruction.cc.

69 {
70 // Define materials
71 DefineMaterials();
72
73 // Define volumes
74 return DefineVolumes();
75}

◆ GetAbsorberPV()

const G4VPhysicalVolume * GarfieldDetectorConstruction::GetAbsorberPV ( ) const
inline

Definition at line 61 of file GarfieldDetectorConstruction.hh.

61{ return fAbsorberPV; }

Referenced by GarfieldSteppingAction::UserSteppingAction().

◆ GetDriftTubePV()

const G4VPhysicalVolume * GarfieldDetectorConstruction::GetDriftTubePV ( ) const
inline

Definition at line 62 of file GarfieldDetectorConstruction.hh.

62{ return fTubePV; }

◆ GetGasPV()

const G4VPhysicalVolume * GarfieldDetectorConstruction::GetGasPV ( ) const
inline

Definition at line 63 of file GarfieldDetectorConstruction.hh.

63{ return fGasPV; }

Referenced by GarfieldSteppingAction::UserSteppingAction().

◆ GetWirePV()

const G4VPhysicalVolume * GarfieldDetectorConstruction::GetWirePV ( ) const
inline

Definition at line 64 of file GarfieldDetectorConstruction.hh.

64{ return fWirePV; }

◆ SetAbsorberMaterial()

void GarfieldDetectorConstruction::SetAbsorberMaterial ( G4String  materialChoice)

Definition at line 316 of file GarfieldDetectorConstruction.cc.

317 {
318 // search the material by its name
319 G4Material* newMaterial =
320 G4NistManager::Instance()->FindOrBuildMaterial(materialChoice);
321
322 if (newMaterial) {
323 if (fAbsorberMaterial != newMaterial) {
324 fAbsorberMaterial = newMaterial;
325 if (fAbsorberLV) {
326 fAbsorberLV->SetMaterial(fAbsorberMaterial);
327 }
328 G4RunManager::GetRunManager()->PhysicsHasBeenModified();
329 }
330 } else {
331 G4cout << "\n--> warning from GarfieldDetectorConstruction::SetMaterial : "
332 << materialChoice << " not found" << G4endl;
333 }
334}

Referenced by GarfieldMessenger::SetNewValue().


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