REST-for-Physics  v2.3
Rare Event Searches ToolKit for Physics
TRestAxionBufferGas.h
1/*************************************************************************
2 * This file is part of the REST software framework. *
3 * *
4 * Copyright (C) 2016 GIFNA/TREX (University of Zaragoza) *
5 * For more information see http://gifna.unizar.es/trex *
6 * *
7 * REST is free software: you can redistribute it and/or modify *
8 * it under the terms of the GNU General Public License as published by *
9 * the Free Software Foundation, either version 3 of the License, or *
10 * (at your option) any later version. *
11 * *
12 * REST is distributed in the hope that it will be useful, *
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15 * GNU General Public License for more details. *
16 * *
17 * You should have a copy of the GNU General Public License along with *
18 * REST in $REST_PATH/LICENSE. *
19 * If not, see http://www.gnu.org/licenses/. *
20 * For the list of contributors see $REST_PATH/CREDITS. *
21 *************************************************************************/
22
23#ifndef _TRestAxionBufferGas
24#define _TRestAxionBufferGas
25
26#include <TRestMetadata.h>
27
30 private:
31 void Initialize();
32 void Clear();
33
34 void InitFromConfigFile();
35
37 std::vector<TString> fBufferGasName; //->
38
40 std::vector<Double_t> fBufferGasDensity; //->
41
43 std::vector<std::vector<Double_t> > fAbsEnergy; //->
44
46 std::vector<std::vector<Double_t> > fGasAbsCoefficient; //->
47
49 std::vector<std::vector<Double_t> > fFactorEnergy; //->
50
52 std::vector<std::vector<Double_t> > fGasFormFactor; //->
53
54 void ReadGasData(TString gasName);
55
56 Int_t FindGasIndex(TString gName);
57 Int_t GetEnergyIndex(std::vector<Double_t> enVector, Double_t energy);
58
59 public:
60 void SetGasDensity(TString gasName, Double_t density);
61 Double_t GetGasDensity(TString gasName);
62
63 void SetGasMixture(TString gasMixture, TString gasDensities = "0");
64
66 Int_t GetNumberOfGases() { return (Int_t)fBufferGasName.size(); }
67
68 Double_t GetAbsorptionCoefficient(TString gasName, Double_t energy);
69 Double_t GetFormFactor(TString gasName, Double_t energy);
70
71 Double_t GetPhotonAbsorptionLength(Double_t energy);
72
73 Double_t GetPhotonAbsorptionLengthIneV(Double_t energy);
74
75 Double_t cmToeV(double l_Inv);
76
77 Double_t GetPhotonMass(double en);
78
79 Double_t GetDensityForMass(double m_gamma, double en = 4.2);
80
81 void PrintAbsorptionGasData(TString gasName);
82 void PrintFormFactorGasData(TString gasName);
83
84 void PrintMetadata();
85
87 TRestAxionBufferGas(const char* cfgFileName, std::string name = "");
88
90
91 ClassDef(TRestAxionBufferGas, 1);
92};
93#endif
A metadata class to define the gas properties used in axion search calculations.
TRestAxionBufferGas()
Default constructor.
Int_t GetNumberOfGases()
It returns the number of gases in the mixture.
void Initialize()
Initialization of TRestAxionBufferGas members. It removes all gases.
void InitFromConfigFile()
Initialization of TRestAxionBufferGas field members through a RML file.
void PrintMetadata()
Prints on screen the information about the metadata members of TRestAxionBufferGas.
Double_t cmToeV(double l_Inv)
It transforms cm-1 to eV.
std::vector< std::vector< Double_t > > fGasFormFactor
Gas form factor.
void PrintFormFactorGasData(TString gasName)
Prints out the atomic form factors as function of the energy for the given gas component,...
std::vector< std::vector< Double_t > > fGasAbsCoefficient
Gas absorption coefficient in cm2/g.
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.
Double_t GetPhotonMass(double en)
It returns the equivalent photon mass (in eV) for the gas mixture at the given input energy expressed...
std::vector< std::vector< Double_t > > fFactorEnergy
Energy values for gas form factor in keV.
std::vector< Double_t > fBufferGasDensity
Gas density of the corresponding gasName in g/cm3.
Double_t GetGasDensity(TString gasName)
It returns the gas density - from the chosen gasName component - in g/cm3.
void ReadGasData(TString gasName)
It reads the data files from the corresponding gas component.
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 energ...
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.
Int_t FindGasIndex(TString gName)
It returns the internal index of the gas component given by gasName.
std::vector< TString > fBufferGasName
Name of the buffer gas (He, Ne, Ar, Xe, ..., etc )
void PrintAbsorptionGasData(TString gasName)
Prints out the absorption coefficients as function of the energy for the given gas component,...
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 ...
void SetGasMixture(TString gasMixture, TString gasDensities="0")
It re-initializes the gas mixture to the one provided by argument.
std::vector< std::vector< Double_t > > fAbsEnergy
Energy values for gas absorption coefficient in keV.
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 GetFormFactor(TString gasName, Double_t energy)
It returns the atomic form factor of the gasName component at the given energy.
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 i...
~TRestAxionBufferGas()
Default destructor.
A base class for any REST metadata class.
Definition: TRestMetadata.h:74