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

Photoabsorption cross-sections for some gases. More...

#include <OpticalData.hh>

Public Member Functions

 OpticalData ()
 Constructor.
 
 ~OpticalData ()
 Destructor.
 
bool IsAvailable (const std::string &material) const
 Check whether optical data have been implemented for a given gas.
 
bool GetPhotoabsorptionCrossSection (const std::string &material, const double e, double &cs, double &eta)
 Photo-absorption cross-section and ionisation yield at a given energy.
 
void EnableDebugging (const bool on=true)
 

Detailed Description

Photoabsorption cross-sections for some gases.

Definition at line 11 of file OpticalData.hh.

Constructor & Destructor Documentation

◆ OpticalData()

Garfield::OpticalData::OpticalData ( )

Constructor.

Definition at line 37 of file OpticalData.cc.

37{}

◆ ~OpticalData()

Garfield::OpticalData::~OpticalData ( )
inline

Destructor.

Definition at line 16 of file OpticalData.hh.

16{}

Member Function Documentation

◆ EnableDebugging()

void Garfield::OpticalData::EnableDebugging ( const bool  on = true)
inline

Definition at line 24 of file OpticalData.hh.

24{ m_debug = on; }

◆ GetPhotoabsorptionCrossSection()

bool Garfield::OpticalData::GetPhotoabsorptionCrossSection ( const std::string &  material,
const double  e,
double &  cs,
double &  eta 
)

Photo-absorption cross-section and ionisation yield at a given energy.

Definition at line 46 of file OpticalData.cc.

48 {
49 cs = eta = 0.;
50 if (material == "Ne") return PhotoAbsorptionCsNeon(e, cs, eta);
51 if (material == "Ar") return PhotoAbsorptionCsArgon(e, cs, eta);
52 if (material == "CO2") return PhotoAbsorptionCsCO2(e, cs, eta);
53 if (material == "CH4") return PhotoAbsorptionCsMethane(e, cs, eta);
54 if (material == "C2H6") return PhotoAbsorptionCsEthane(e, cs, eta);
55 if (material == "nC4H10") return PhotoAbsorptionCsButane(e, cs, eta);
56 if (material == "C2H2") return PhotoAbsorptionCsAcetylene(e, cs, eta);
57 if (material == "CF4") return PhotoAbsorptionCsCF4(e, cs, eta);
58 if (material == "N2") return PhotoAbsorptionCsNitrogen(e, cs, eta);
59 return false;
60}

Referenced by Garfield::MediumGas::GetPhotoAbsorptionCrossSection().

◆ IsAvailable()

bool Garfield::OpticalData::IsAvailable ( const std::string &  material) const

Check whether optical data have been implemented for a given gas.

Definition at line 39 of file OpticalData.cc.

39 {
40 std::array<std::string, 9> materials = {
41 {"Ne", "Ar", "CO2", "CH4", "C2H6", "nC4H10", "C2H2", "CF4", "N2"}};
42 auto result = std::find(materials.begin(), materials.end(), material);
43 return result != materials.end();
44}

Referenced by Garfield::MediumGas::GetPhotoAbsorptionCrossSection().


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