Garfield++ v2r0
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 ()
 
const G4VPhysicalVolume * GetAbsorberPV () const
 
const G4VPhysicalVolume * GetDriftTubePV () const
 
const G4VPhysicalVolume * GetGasPV () const
 
const G4VPhysicalVolume * GetThinWindowPV () 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 53 of file GarfieldDetectorConstruction.hh.

Constructor & Destructor Documentation

◆ GarfieldDetectorConstruction()

GarfieldDetectorConstruction::GarfieldDetectorConstruction ( )

Definition at line 59 of file GarfieldDetectorConstruction.cc.

59 :
60 G4VUserDetectorConstruction(), fAbsorberPV(0), fTubePV(0), fGasPV(0), fWirePV(
61 0), fAbsorberMaterial(0), fAbsorberLV(0), fCheckOverlaps(true), fGarfieldG4FastSimulationModel(
62 0), fGarfieldMessenger(0) {
63 fGarfieldMessenger = new GarfieldMessenger(this);
64}

◆ ~GarfieldDetectorConstruction()

GarfieldDetectorConstruction::~GarfieldDetectorConstruction ( )
virtual

Definition at line 68 of file GarfieldDetectorConstruction.cc.

68 {
69 delete fGarfieldMessenger;
70}

Member Function Documentation

◆ AbsorberMaterialWithSingleIsotope()

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

Definition at line 298 of file GarfieldDetectorConstruction.cc.

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

Referenced by GarfieldMessenger::SetNewValue().

◆ Construct()

G4VPhysicalVolume * GarfieldDetectorConstruction::Construct ( )
virtual

Definition at line 74 of file GarfieldDetectorConstruction.cc.

74 {
75 // Define materials
76 DefineMaterials();
77
78 // Define volumes
79 return DefineVolumes();
80}

◆ GetAbsorberPV()

const G4VPhysicalVolume * GarfieldDetectorConstruction::GetAbsorberPV ( ) const
inline

Definition at line 95 of file GarfieldDetectorConstruction.hh.

95 {
96 return fAbsorberPV;
97}

Referenced by GarfieldSteppingAction::UserSteppingAction().

◆ GetDriftTubePV()

const G4VPhysicalVolume * GarfieldDetectorConstruction::GetDriftTubePV ( ) const
inline

Definition at line 99 of file GarfieldDetectorConstruction.hh.

99 {
100 return fTubePV;
101}

◆ GetGasPV()

const G4VPhysicalVolume * GarfieldDetectorConstruction::GetGasPV ( ) const
inline

Definition at line 103 of file GarfieldDetectorConstruction.hh.

103 {
104 return fGasPV;
105}

Referenced by GarfieldSteppingAction::UserSteppingAction().

◆ GetThinWindowPV()

const G4VPhysicalVolume * GarfieldDetectorConstruction::GetThinWindowPV ( ) const

◆ GetWirePV()

const G4VPhysicalVolume * GarfieldDetectorConstruction::GetWirePV ( ) const
inline

Definition at line 108 of file GarfieldDetectorConstruction.hh.

108 {
109 return fWirePV;
110}

◆ SetAbsorberMaterial()

void GarfieldDetectorConstruction::SetAbsorberMaterial ( G4String  materialChoice)

Definition at line 318 of file GarfieldDetectorConstruction.cc.

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

Referenced by GarfieldMessenger::SetNewValue().


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