85 #include "TRestAxionSolarFlux.h"
110 RESTDebug <<
"Entering TRestAxionSolarFlux constructor( cfgFileName, name )" <<
RESTendl;
111 RESTDebug <<
"File: " << cfgFileName <<
" Name: " << name <<
RESTendl;
149 std::vector<std::vector<Double_t>> fluxData;
153 new TH2F(Form(
"FluxTable_%s", GetName()),
"", 100, 0., 1., (Int_t)(20. / binSize), 0., 20.);
155 for (
const auto& data : fluxData) {
156 Double_t r = 0.005 + data[0];
157 Double_t en = data[1] - 0.005;
158 Double_t flux = data[2] * binSize;
160 originalHist->Fill(r, en, flux);
163 return (TH1F*)originalHist->ProjectionY();
175 fCanvas =
new TCanvas(
"canv",
"This is the canvas title", 1400, 1200);
178 TPad* pad1 =
new TPad(
"pad1",
"This is pad1", 0.01, 0.02, 0.99, 0.97);
197 fCanvas =
new TCanvas(
"canv",
"This is the canvas title", 1200, 500);
200 TPad* pad1 =
new TPad(
"pad1",
"This is pad1", 0.01, 0.02, 0.99, 0.97);
205 pad1->SetRightMargin(0.09);
206 pad1->SetLeftMargin(0.15);
207 pad1->SetBottomMargin(0.15);
210 ht->SetLineColor(kBlack);
211 ht->SetFillStyle(4050);
212 ht->SetFillColor(kBlue - 10);
227 RESTMetadata <<
"--------" <<
RESTendl;
229 RESTMetadata <<
"--------" <<
RESTendl;
A metadata class to load tabulated solar axion fluxes.
void Initialize()
It is required in order to load solar flux tables into memory.
TRestAxionSolarFlux()
Default constructor.
TCanvas * fCanvas
A canvas pointer for drawing.
~TRestAxionSolarFlux()
Default destructor.
virtual Bool_t LoadTables()=0
It defines how to read the solar tables at the inhereted class.
Double_t fCouplingStrength
Axion coupling strength.
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 ....
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.
std::string fCouplingType
Axion coupling. Defines coupling type and strength.
Int_t fSeed
Seed used in random generator.
TRandom3 * fRandom
Random number generator.
virtual TH1F * GetEnergySpectrum(Double_t m=0)=0
It returns an energy integrated spectrum in cm-2 s-1 keV-1.
void PrintMetadata()
Prints on screen the information about the metadata members of TRestAxionSolarFlux.
Bool_t fTablesLoaded
A metadata member to control if this class has been initialized.
virtual TCanvas * DrawSolarFlux()
It draws the contents of a .flux file. This method just receives the.