REST-for-Physics  v2.3
Rare Event Searches ToolKit for Physics
TRestAxionSolarModel.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 _TRestAxionSolarModel
24 #define _TRestAxionSolarModel
25 
26 #ifdef USE_SolaxFlux
27 #include "solaxflux/solar_model.hpp"
28 #endif
29 
30 #include <TRestMetadata.h>
31 
34  private:
35  void Initialize();
36  void InitFromConfigFile();
37 
38 #ifdef USE_SolaxFlux
39  // The solar model object
40  SolarModel sol;
41 #endif
42 
43  // The range integration step size for solar energy spectrum (in keV)
44  // double fStep = 0.01;
45  // std::vector<double> fEnergyRange = {0.1,10.0};
46  // double r_max;
47 
48  // Variables for diagnostics and metadata
49  bool bSolarModelInitialized = false;
50  double fRefPhotonCoupling;
51  double fRefElectronCoupling;
52  std::string sExternalLibraryName;
53  std::string sSolarModelFile;
54  std::string sOpacityCodeName;
55 
56  public:
57  // Constructors and destructors
59  TRestAxionSolarModel(const char* cfgFileName, std::string name = "");
61 
62  // Solar axion flux calculators
63  std::vector<double> GetSolarAxionFluxGAGamma(std::vector<double> energies, double g_agamma, double r_max);
64  std::vector<double> GetSolarAxionFluxGAGamma(std::vector<double> energies, double r_max = 1.0);
65  // std::vector<double> GetSolarAxionFluxGAGamma();
66  std::vector<double> GetSolarAxionFluxGAE(std::vector<double> energies, double g_agae, double r_max);
67  std::vector<double> GetSolarAxionFluxGAE(std::vector<double> energies, double r_max = 1.0);
68  // std::vector<double> GetSolarAxionFluxGAE();
69 
70  // Diagnostics and metadata
71  void PrintMetadata();
72  bool isSolarModelClassReady() { return bSolarModelInitialized; }
73  std::string GetSolarModelFileName();
74  // std::string GetOpacityCodeName() { return fOpacityCodeName; }
75 
76  ClassDef(TRestAxionSolarModel, 1);
77 };
78 
79 #endif
A metadata class to define theoretical axion models and calculations related.
void Initialize()
Making default settings.
void PrintMetadata()
Implemented it in the derived metadata class to print out specific metadata information.
void InitFromConfigFile()
To make settings from rml file. This method must be implemented in the derived class.
A base class for any REST metadata class.
Definition: TRestMetadata.h:74