REST-for-Physics  v2.3
Rare Event Searches ToolKit for Physics
Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes
TRestAxionSolarFlux Class Referenceabstract

Detailed Description

A metadata class to load tabulated solar axion fluxes.

TRestAxionSolarFlux encapsulates common metadata members and methods that can be later used as a common way to evaluate the axion solar flux from different implementations.

At present, two different implemenations exist: TRestAxionSolarQCDFlux and TRestAxionSolarHiddenPhotonFlux.

Common metadata members defined by this class

In order to trace the nature and intensity of the coupling in future ray-tracking results we need to define the parameters couplingType and couplingStrength. The ray-tracing processing will be done for different coupling components in different event processing chains that will be combined in a final sensitivity plot.

Pre-generated solar axion flux tables

Some tables will be available at the axionlib-data repository. The different RML flux definitions used to load those tables will be found at the fluxes.rml file found at the axionlib-data repository.

Inside a local REST installation, the fluxes.rml file will be found at the REST installation directory, and it will be located automatically by the TRestMetadata::SearchFile method when initializing a TRestAxionSolarFlux class.

Re-implementing a specific TRestAxionSolarXYZFlux class

Different pure virtual methods must be re-implemented in the inherited class:


RESTsoft - Software for Rare Event Searches with TPCs

History of developments:

2022-February: Recovered from original TRestAxionSolarModel implementation Javier Galan 2023-May: This class has been transformed into a pure abstract class

Author
Javier Galan

Definition at line 33 of file TRestAxionSolarFlux.h.

#include <TRestAxionSolarFlux.h>

Inheritance diagram for TRestAxionSolarFlux:
TRestMetadata TRestAxionSolarQCDFlux

Public Member Functions

Bool_t AreTablesLoaded ()
 
TCanvas * DrawFluxFile (std::string fname, Double_t binSize=0.01)
 It draws the contents of a .flux file. This method just receives the name of the .flux file and it works stand-alone. More...
 
virtual TCanvas * DrawSolarFlux ()
 It draws the contents of a .flux file. This method just receives the. More...
 
virtual void ExportTables (Bool_t ascii=false)
 
virtual TH1F * GetEnergySpectrum (Double_t m=0)=0
 It returns an energy integrated spectrum in cm-2 s-1 keV-1. More...
 
Double_t GetFluxAtEnergy (Double_t energy, Double_t m=0)
 It returns a flux in cm-2 s-1 keV-1 at the energy given by argument. More...
 
TH1F * GetFluxHistogram (std::string fname, Double_t binSize=0.01)
 It builds a histogram using the contents of the .flux file given in the argument. More...
 
virtual std::pair< Double_t, Double_t > GetRandomEnergyAndRadius (TVector2 eRange=TVector2(-1, -1), Double_t mass=0)=0
 It defines how to generate Monte Carlo energy and radius values to reproduce the flux. More...
 
virtual Double_t GetTotalFlux (Double_t mass=0)=0
 It returns the total integrated flux at earth in cm-2 s-1. More...
 
void Initialize ()
 It is required in order to load solar flux tables into memory. More...
 
virtual Double_t IntegrateFluxInRange (TVector2 eRange=TVector2(-1, -1), Double_t mass=0)=0
 It returns the integrated flux at earth in cm-2 s-1 for the given energy range. More...
 
void PrintMetadata ()
 Prints on screen the information about the metadata members of TRestAxionSolarFlux. More...
 
 ~TRestAxionSolarFlux ()
 Default destructor. More...
 

Protected Member Functions

virtual Bool_t LoadTables ()=0
 It defines how to read the solar tables at the inhereted class. More...
 
 TRestAxionSolarFlux ()
 Default constructor. More...
 
 TRestAxionSolarFlux (const char *cfgFileName, std::string name="")
 Constructor loading data from a config file. More...
 

Protected Attributes

TCanvas * fCanvas = nullptr
 A canvas pointer for drawing. More...
 
TRandom3 * fRandom = nullptr
 Random number generator. More...
 
Bool_t fTablesLoaded = false
 A metadata member to control if this class has been initialized. More...
 

Private Attributes

Double_t fCouplingStrength = 0
 Axion coupling strength. More...
 
std::string fCouplingType = ""
 Axion coupling. Defines coupling type and strength. More...
 
Int_t fSeed = 0
 Seed used in random generator. More...
 

Constructor & Destructor Documentation

◆ TRestAxionSolarFlux() [1/2]

TRestAxionSolarFlux::TRestAxionSolarFlux ( )
protected

Default constructor.

Definition at line 93 of file TRestAxionSolarFlux.cxx.

◆ TRestAxionSolarFlux() [2/2]

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

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 TRestAxionMagneticField section inside the RML.

Definition at line 109 of file TRestAxionSolarFlux.cxx.

◆ ~TRestAxionSolarFlux()

TRestAxionSolarFlux::~TRestAxionSolarFlux ( )

Default destructor.

Definition at line 117 of file TRestAxionSolarFlux.cxx.

Member Function Documentation

◆ AreTablesLoaded()

Bool_t TRestAxionSolarFlux::AreTablesLoaded ( )
inline

Definition at line 86 of file TRestAxionSolarFlux.h.

◆ DrawFluxFile()

TCanvas * TRestAxionSolarFlux::DrawFluxFile ( std::string  fname,
Double_t  binSize = 0.01 
)

It draws the contents of a .flux file. This method just receives the name of the .flux file and it works stand-alone.

Definition at line 169 of file TRestAxionSolarFlux.cxx.

◆ DrawSolarFlux()

TCanvas * TRestAxionSolarFlux::DrawSolarFlux ( )
virtual

It draws the contents of a .flux file. This method just receives the.

Reimplemented in TRestAxionSolarQCDFlux.

Definition at line 199 of file TRestAxionSolarFlux.cxx.

◆ ExportTables()

virtual void TRestAxionSolarFlux::ExportTables ( Bool_t  ascii = false)
inlinevirtual

Reimplemented in TRestAxionSolarQCDFlux.

Definition at line 81 of file TRestAxionSolarFlux.h.

◆ GetEnergySpectrum()

virtual TH1F * TRestAxionSolarFlux::GetEnergySpectrum ( Double_t  m = 0)
pure virtual

It returns an energy integrated spectrum in cm-2 s-1 keV-1.

Implemented in TRestAxionSolarQCDFlux.

◆ GetFluxAtEnergy()

Double_t TRestAxionSolarFlux::GetFluxAtEnergy ( Double_t  energy,
Double_t  m = 0 
)

It returns a flux in cm-2 s-1 keV-1 at the energy given by argument.

Definition at line 191 of file TRestAxionSolarFlux.cxx.

◆ GetFluxHistogram()

TH1F * TRestAxionSolarFlux::GetFluxHistogram ( std::string  fname,
Double_t  binSize = 0.01 
)

It builds a histogram using the contents of the .flux file given in the argument.

Definition at line 145 of file TRestAxionSolarFlux.cxx.

◆ GetRandomEnergyAndRadius()

virtual std::pair< Double_t, Double_t > TRestAxionSolarFlux::GetRandomEnergyAndRadius ( TVector2  eRange = TVector2(-1, -1),
Double_t  mass = 0 
)
pure virtual

It defines how to generate Monte Carlo energy and radius values to reproduce the flux.

Implemented in TRestAxionSolarQCDFlux.

◆ GetTotalFlux()

virtual Double_t TRestAxionSolarFlux::GetTotalFlux ( Double_t  mass = 0)
pure virtual

It returns the total integrated flux at earth in cm-2 s-1.

Implemented in TRestAxionSolarQCDFlux.

◆ Initialize()

void TRestAxionSolarFlux::Initialize ( )
virtual

It is required in order to load solar flux tables into memory.

Initialization of TRestAxionSolarFlux members.

Reimplemented from TRestMetadata.

Definition at line 122 of file TRestAxionSolarFlux.cxx.

◆ IntegrateFluxInRange()

virtual Double_t TRestAxionSolarFlux::IntegrateFluxInRange ( TVector2  eRange = TVector2(-1, -1),
Double_t  mass = 0 
)
pure virtual

It returns the integrated flux at earth in cm-2 s-1 for the given energy range.

Implemented in TRestAxionSolarQCDFlux.

◆ LoadTables()

virtual Bool_t TRestAxionSolarFlux::LoadTables ( )
protectedpure virtual

It defines how to read the solar tables at the inhereted class.

Implemented in TRestAxionSolarQCDFlux.

◆ PrintMetadata()

void TRestAxionSolarFlux::PrintMetadata ( )
virtual

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

Reimplemented from TRestMetadata.

Reimplemented in TRestAxionSolarQCDFlux.

Definition at line 229 of file TRestAxionSolarFlux.cxx.

Field Documentation

◆ fCanvas

TCanvas* TRestAxionSolarFlux::fCanvas = nullptr
protected

A canvas pointer for drawing.

Definition at line 49 of file TRestAxionSolarFlux.h.

◆ fCouplingStrength

Double_t TRestAxionSolarFlux::fCouplingStrength = 0
private

Axion coupling strength.

Definition at line 39 of file TRestAxionSolarFlux.h.

◆ fCouplingType

std::string TRestAxionSolarFlux::fCouplingType = ""
private

Axion coupling. Defines coupling type and strength.

Definition at line 36 of file TRestAxionSolarFlux.h.

◆ fRandom

TRandom3* TRestAxionSolarFlux::fRandom = nullptr
protected

Random number generator.

Definition at line 52 of file TRestAxionSolarFlux.h.

◆ fSeed

Int_t TRestAxionSolarFlux::fSeed = 0
private

Seed used in random generator.

Definition at line 42 of file TRestAxionSolarFlux.h.

◆ fTablesLoaded

Bool_t TRestAxionSolarFlux::fTablesLoaded = false
protected

A metadata member to control if this class has been initialized.

Definition at line 46 of file TRestAxionSolarFlux.h.


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