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.
 
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.
 
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.
 
Int_t GetNumberOfGases ()
 It returns the number of gases in the mixture.
 
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.
 
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.
 
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.
 
void PrintAbsorptionGasData (TString gasName)
 Prints out the absorption coefficients as function of the energy for the given gas component, for debugging pourposes.
 
void PrintFormFactorGasData (TString gasName)
 Prints out the atomic form factors as function of the energy for the given gas component, for debugging pourposes.
 
void PrintMetadata ()
 Prints on screen the information about the metadata members of TRestAxionBufferGas.
 
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.
 
 TRestAxionBufferGas (const char *cfgFileName, std::string name="")
 Constructor loading data from a config file. More...
 
 ~TRestAxionBufferGas ()
 Default destructor.
 

Private Member Functions

Int_t FindGasIndex (TString gName)
 It returns the internal index of the gas component given by gasName.
 
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.
 
void InitFromConfigFile ()
 Initialization of TRestAxionBufferGas field members through a RML file.
 
void Initialize ()
 Initialization of TRestAxionBufferGas members. It removes all gases.
 
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.
 
std::vector< Double_t > fBufferGasDensity
 Gas density of the corresponding gasName in g/cm3.
 
std::vector< TString > fBufferGasName
 Name of the buffer gas (He, Ne, Ar, Xe, ..., etc )
 
std::vector< std::vector< Double_t > > fFactorEnergy
 Energy values for gas form factor in keV.
 
std::vector< std::vector< Double_t > > fGasAbsCoefficient
 Gas absorption coefficient in cm2/g.
 
std::vector< std::vector< Double_t > > fGasFormFactor
 Gas form factor.
 

Additional Inherited Members

Constructor & Destructor Documentation

◆ TRestAxionBufferGas()

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.

Member Function Documentation

◆ 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.

◆ 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.

◆ 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.


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