REST-for-Physics  v2.3
Rare Event Searches ToolKit for Physics
Public Member Functions | Private Member Functions | Private Attributes
TRestAxionBufferGas Class Reference

Detailed Description

A metadata class to define the gas properties used in axion search calculations.

TRestAxionBufferGas is a class used to create an interface to the gas properties used in axion search calculations, such as the photon density and photon absorption.

This class will allow us to create an arbitray gas mixture by specifying the atomic components, and its contribution to the density. The available elements can be found at the data/bufferGas/ directory, which are currenty He, Ne, Ar and Xe.

The following examples show how to create a particular gas mixture. Both examples should lead to the same mixture.

Example 1:

//Density units must be expressed here in the default REST units, `kg/mm3`.
gas->SetGasDensity( "He", 2.6e-9 );
gas->SetGasDensity( "Xe", 5.6e-9 );
A metadata class to define the gas properties used in axion search calculations.
TRestAxionBufferGas()
Default constructor.
void SetGasDensity(TString gasName, Double_t density)
It adds a new gas component to the mixture. If it already exists it will update its density.

Example 2:

gas->SetGasMixture( "He+Xe", "2.6e-6g/dm^3+5.6mg/m^3" );
void SetGasMixture(TString gasMixture, TString gasDensities="0")
It re-initializes the gas mixture to the one provided by argument.

The corresponding RML section for initialization through a configuration file would be as follows.

<TRestAxionBufferGas name="heliumAndXenon" verboseLevel="warning" >
<gas name="He" density="2.6e-9"/>
<gas name="Xe" density="5.6mg/cm^3"/>

Example 3:

We may also use a definition found inside the official REST-for-Physics data directory.

TRestAxionBufferGas *gas = new TRestAxionBufferGas("bufferGases.rml", "helium");

RESTsoft - Software for Rare Event Searches with TPCs

History of developments:

2019-March: First concept and implementation of TRestAxionBufferGas class. Javier Galan

Author
Javier Galan

Definition at line 29 of file TRestAxionBufferGas.h.

#include <TRestAxionBufferGas.h>

Inheritance diagram for TRestAxionBufferGas:
TRestMetadata

Public Member Functions

Double_t cmToeV (double l_Inv)
 It transforms cm-1 to eV. More...
 
Double_t GetAbsorptionCoefficient (TString gasName, Double_t energy)
 It returns the absorption coefficient, in cm2/g, for the given gas component and energy in keV. More...
 
Double_t GetDensityForMass (double m_gamma, double en=4.2)
 It returns the equivalent gas density for a given photon mass expressed in eV and a given axion energy Ea (4.2 by default). More...
 
Double_t GetFormFactor (TString gasName, Double_t energy)
 It returns the atomic form factor of the gasName component at the given energy. More...
 
Double_t GetGasDensity (TString gasName)
 It returns the gas density - from the chosen gasName component - in g/cm3. More...
 
Int_t GetNumberOfGases ()
 It returns the number of gases in the mixture. More...
 
Double_t GetPhotonAbsorptionLength (Double_t energy)
 It returns the inverse of the absorption lenght, for the gas mixture, in cm-1, for the given energy in keV. More...
 
Double_t GetPhotonAbsorptionLengthIneV (Double_t energy)
 It returns the inverse of the absorption lenght, for the gas mixture, in eV, for the given energy in keV. More...
 
Double_t GetPhotonMass (double en)
 It returns the equivalent photon mass (in eV) for the gas mixture at the given input energy expressed in keV. More...
 
void PrintAbsorptionGasData (TString gasName)
 Prints out the absorption coefficients as function of the energy for the given gas component, for debugging pourposes. More...
 
void PrintFormFactorGasData (TString gasName)
 Prints out the atomic form factors as function of the energy for the given gas component, for debugging pourposes. More...
 
void PrintMetadata ()
 Prints on screen the information about the metadata members of TRestAxionBufferGas. More...
 
void SetGasDensity (TString gasName, Double_t density)
 It adds a new gas component to the mixture. If it already exists it will update its density. More...
 
void SetGasMixture (TString gasMixture, TString gasDensities="0")
 It re-initializes the gas mixture to the one provided by argument. More...
 
 TRestAxionBufferGas ()
 Default constructor. More...
 
 TRestAxionBufferGas (const char *cfgFileName, std::string name="")
 Constructor loading data from a config file. More...
 
 ~TRestAxionBufferGas ()
 Default destructor. More...
 

Private Member Functions

Int_t FindGasIndex (TString gName)
 It returns the internal index of the gas component given by gasName. More...
 
Int_t GetEnergyIndex (std::vector< Double_t > enVector, Double_t energy)
 It returns the vector element index, from enVector, that is just below the given input energy. More...
 
void InitFromConfigFile ()
 Initialization of TRestAxionBufferGas field members through a RML file. More...
 
void Initialize ()
 Initialization of TRestAxionBufferGas members. It removes all gases. More...
 
void ReadGasData (TString gasName)
 It reads the data files from the corresponding gas component. More...
 

Private Attributes

std::vector< std::vector< Double_t > > fAbsEnergy
 Energy values for gas absorption coefficient in keV. More...
 
std::vector< Double_t > fBufferGasDensity
 Gas density of the corresponding gasName in g/cm3. More...
 
std::vector< TString > fBufferGasName
 Name of the buffer gas (He, Ne, Ar, Xe, ..., etc ) More...
 
std::vector< std::vector< Double_t > > fFactorEnergy
 Energy values for gas form factor in keV. More...
 
std::vector< std::vector< Double_t > > fGasAbsCoefficient
 Gas absorption coefficient in cm2/g. More...
 
std::vector< std::vector< Double_t > > fGasFormFactor
 Gas form factor. More...
 

Additional Inherited Members

Constructor & Destructor Documentation

◆ TRestAxionBufferGas() [1/2]

TRestAxionBufferGas::TRestAxionBufferGas ( )

Default constructor.

Definition at line 100 of file TRestAxionBufferGas.cxx.

◆ TRestAxionBufferGas() [2/2]

TRestAxionBufferGas::TRestAxionBufferGas ( const char *  cfgFileName,
std::string  name = "" 
)

Constructor loading data from a config file.

If no configuration path is defined using TRestMetadata::SetConfigFilePath the path to the config file must be specified using full path, absolute or relative.

The default behaviour is that the config file must be specified with full path, absolute or relative.

Parameters
cfgFileNameA const char* giving the path to an RML file.
nameThe name of the specific metadata. It will be used to find the corresponding TRestGeant4Metadata section inside the RML.

Definition at line 116 of file TRestAxionBufferGas.cxx.

◆ ~TRestAxionBufferGas()

TRestAxionBufferGas::~TRestAxionBufferGas ( )

Default destructor.

Definition at line 127 of file TRestAxionBufferGas.cxx.

Member Function Documentation

◆ cmToeV()

Double_t TRestAxionBufferGas::cmToeV ( double  l_Inv)

It transforms cm-1 to eV.

Definition at line 389 of file TRestAxionBufferGas.cxx.

◆ FindGasIndex()

Int_t TRestAxionBufferGas::FindGasIndex ( TString  gName)
private

It returns the internal index of the gas component given by gasName.

Definition at line 529 of file TRestAxionBufferGas.cxx.

◆ GetAbsorptionCoefficient()

Double_t TRestAxionBufferGas::GetAbsorptionCoefficient ( TString  gasName,
Double_t  energy 
)

It returns the absorption coefficient, in cm2/g, for the given gas component and energy in keV.

Definition at line 470 of file TRestAxionBufferGas.cxx.

◆ GetDensityForMass()

Double_t TRestAxionBufferGas::GetDensityForMass ( double  m_gamma,
double  en = 4.2 
)

It returns the equivalent gas density for a given photon mass expressed in eV and a given axion energy Ea (4.2 by default).

This method is only valid for pure gases with only one gas component. Before calling the method one needs to define a gas with a single component, e.g. using TRestAxionBufferGas::SetGasDensity( "He", 0 )

The resulting density will be expressed in kg/mm^3, which are the standard REST Units.

Definition at line 436 of file TRestAxionBufferGas.cxx.

◆ GetEnergyIndex()

Int_t TRestAxionBufferGas::GetEnergyIndex ( std::vector< Double_t >  enVector,
Double_t  energy 
)
private

It returns the vector element index, from enVector, that is just below the given input energy.

Definition at line 519 of file TRestAxionBufferGas.cxx.

◆ GetFormFactor()

Double_t TRestAxionBufferGas::GetFormFactor ( TString  gasName,
Double_t  energy 
)

It returns the atomic form factor of the gasName component at the given energy.

Energy input parameter must be given in keV

Definition at line 316 of file TRestAxionBufferGas.cxx.

◆ GetGasDensity()

Double_t TRestAxionBufferGas::GetGasDensity ( TString  gasName)

It returns the gas density - from the chosen gasName component - in g/cm3.

Definition at line 217 of file TRestAxionBufferGas.cxx.

◆ GetNumberOfGases()

Int_t TRestAxionBufferGas::GetNumberOfGases ( )
inline

It returns the number of gases in the mixture.

Definition at line 65 of file TRestAxionBufferGas.h.

◆ GetPhotonAbsorptionLength()

Double_t TRestAxionBufferGas::GetPhotonAbsorptionLength ( Double_t  energy)

It returns the inverse of the absorption lenght, for the gas mixture, in cm-1, for the given energy in keV.

Definition at line 369 of file TRestAxionBufferGas.cxx.

◆ GetPhotonAbsorptionLengthIneV()

Double_t TRestAxionBufferGas::GetPhotonAbsorptionLengthIneV ( Double_t  energy)

It returns the inverse of the absorption lenght, for the gas mixture, in eV, for the given energy in keV.

Definition at line 382 of file TRestAxionBufferGas.cxx.

◆ GetPhotonMass()

Double_t TRestAxionBufferGas::GetPhotonMass ( double  en)

It returns the equivalent photon mass (in eV) for the gas mixture at the given input energy expressed in keV.

Definition at line 398 of file TRestAxionBufferGas.cxx.

◆ InitFromConfigFile()

void TRestAxionBufferGas::InitFromConfigFile ( )
privatevirtual

Initialization of TRestAxionBufferGas field members through a RML file.

Reimplemented from TRestMetadata.

Definition at line 149 of file TRestAxionBufferGas.cxx.

◆ Initialize()

void TRestAxionBufferGas::Initialize ( )
privatevirtual

Initialization of TRestAxionBufferGas members. It removes all gases.

Reimplemented from TRestMetadata.

Definition at line 132 of file TRestAxionBufferGas.cxx.

◆ PrintAbsorptionGasData()

void TRestAxionBufferGas::PrintAbsorptionGasData ( TString  gasName)

Prints out the absorption coefficients as function of the energy for the given gas component, for debugging pourposes.

Definition at line 545 of file TRestAxionBufferGas.cxx.

◆ PrintFormFactorGasData()

void TRestAxionBufferGas::PrintFormFactorGasData ( TString  gasName)

Prints out the atomic form factors as function of the energy for the given gas component, for debugging pourposes.

Definition at line 557 of file TRestAxionBufferGas.cxx.

◆ PrintMetadata()

void TRestAxionBufferGas::PrintMetadata ( )
virtual

Prints on screen the information about the metadata members of TRestAxionBufferGas.

Reimplemented from TRestMetadata.

Definition at line 568 of file TRestAxionBufferGas.cxx.

◆ ReadGasData()

void TRestAxionBufferGas::ReadGasData ( TString  gasName)
private

It reads the data files from the corresponding gas component.

This method will need to find under data/bufferGas/ the corresponding scattering form factors and absorption files for component X, i.e. X.nff and X.abs.

TODO. This method might better use SearchFile method that searches in globals <searchPath definition.

Definition at line 239 of file TRestAxionBufferGas.cxx.

◆ SetGasDensity()

void TRestAxionBufferGas::SetGasDensity ( TString  gasName,
Double_t  density 
)

It adds a new gas component to the mixture. If it already exists it will update its density.

Density must be given in standard REST units: kg/mm^3

Definition at line 173 of file TRestAxionBufferGas.cxx.

◆ SetGasMixture()

void TRestAxionBufferGas::SetGasMixture ( TString  gasMixture,
TString  gasDensities = "0" 
)

It re-initializes the gas mixture to the one provided by argument.

The first argument must be the gas components separated by the sign +. The second argument are the corresponding densities with units.

Example : SetGasMixture("Ne+Xe", "2e-3g/cm3+3mg/cm3" );

If the second argument with densities is not given, the buffer gas will add the gas components with zero density.

Definition at line 190 of file TRestAxionBufferGas.cxx.

Field Documentation

◆ fAbsEnergy

std::vector<std::vector<Double_t> > TRestAxionBufferGas::fAbsEnergy
private

Energy values for gas absorption coefficient in keV.

Definition at line 42 of file TRestAxionBufferGas.h.

◆ fBufferGasDensity

std::vector<Double_t> TRestAxionBufferGas::fBufferGasDensity
private

Gas density of the corresponding gasName in g/cm3.

Definition at line 39 of file TRestAxionBufferGas.h.

◆ fBufferGasName

std::vector<TString> TRestAxionBufferGas::fBufferGasName
private

Name of the buffer gas (He, Ne, Ar, Xe, ..., etc )

Definition at line 36 of file TRestAxionBufferGas.h.

◆ fFactorEnergy

std::vector<std::vector<Double_t> > TRestAxionBufferGas::fFactorEnergy
private

Energy values for gas form factor in keV.

Definition at line 48 of file TRestAxionBufferGas.h.

◆ fGasAbsCoefficient

std::vector<std::vector<Double_t> > TRestAxionBufferGas::fGasAbsCoefficient
private

Gas absorption coefficient in cm2/g.

Definition at line 45 of file TRestAxionBufferGas.h.

◆ fGasFormFactor

std::vector<std::vector<Double_t> > TRestAxionBufferGas::fGasFormFactor
private

Gas form factor.

Definition at line 51 of file TRestAxionBufferGas.h.


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