23#ifndef REST_TRestSensitivity
24#define REST_TRestSensitivity
26#include "TRestExperiment.h"
38 std::vector<std::vector<Double_t>>
fCurves;
53 Double_t
ApproachByFactor(Double_t node, Double_t g4, Double_t chi0, Double_t target, Double_t factor);
60 void PrintParameterizationNodes();
62 Double_t
GetCoupling(Double_t node, Double_t sigma = 2, Double_t precision = 0.01);
63 void AddCurve(
const std::vector<Double_t>& curve) {
fCurves.push_back(curve); }
64 void ImportCurve(
const std::vector<Double_t>& curve) { AddCurve(curve); }
66 void GenerateCurves(Int_t N);
68 std::vector<Double_t> GetCurve(
size_t n = 0);
69 std::vector<Double_t> GetAveragedCurve();
70 std::vector<std::vector<Double_t>>
GetLevelCurves(
const std::vector<Double_t>& levels);
72 void ExportCurve(std::string fname, Double_t factor = 1.e-10, Double_t power = 0.25,
int n = 0);
73 void ExportAveragedCurve(std::string fname, Double_t factor = 1.e-10, Double_t power = 0.25);
75 TH1D* SignalStatisticalTest(Double_t node, Int_t N);
77 void Freeze() {
fFrozen =
true; }
79 std::vector<TRestExperiment*> GetExperiments() {
return fExperiments; }
81 if (n >= GetNumberOfExperiments())
87 size_t GetNumberOfExperiments() {
return fExperiments.size(); }
88 size_t GetNumberOfCurves() {
return fCurves.size(); }
93 TCanvas* DrawCurves();
94 TCanvas* DrawLevelCurves();
It includes a model definition and experimental data used to obtain a final experimental sensitivity.
It combines a number of experimental conditions allowing to calculate a combined experimental sensiti...
void Initialize() override
It will initialize the data frame with the filelist and column names (or observables) that have been ...
~TRestSensitivity()
Default destructor.
std::vector< std::vector< Double_t > > fCurves
A vector of calculated sensitivity curves defined as a funtion of the parametric node.
std::vector< TRestExperiment * > fExperiments
A list of experimental conditions included to get a final sensitivity plot.
void InitFromConfigFile() override
It customizes the retrieval of XML data values of this class.
TCanvas * fCanvas
A canvas to draw.
void PrintMetadata() override
Prints on screen the information about the metadata members of TRestAxionSolarFlux.
TH1D * fSignalTest
It is used to generate a histogram with the signal distribution produced with different signal sample...
Bool_t fFrozen
A flag that will frozen adding more experiments in the future.
void ExtractExperimentParameterizationNodes(Bool_t rescan=false)
It scans all the experiment signals parametric nodes to build a complete list of nodes used to build ...
TRestSensitivity()
Default constructor.
std::vector< std::vector< Double_t > > GetLevelCurves(const std::vector< Double_t > &levels)
This method is used to obtain the list of curves that satisfy that each value inside the curve is pla...
Double_t GetCoupling(Double_t node, Double_t sigma=2, Double_t precision=0.01)
It will return the coupling value for which Chi=sigma.
Double_t UnbinnedLogLikelihood(const TRestExperiment *experiment, Double_t node, Double_t g4=0)
It returns the Log(L) for the experiment and coupling given by argument.
std::vector< Double_t > fParameterizationNodes
The fusioned list of parameterization nodes found at each experiment signal.
Double_t ApproachByFactor(Double_t node, Double_t g4, Double_t chi0, Double_t target, Double_t factor)
It will return a value of the coupling, g4, such that (chi-chi0) gets closer to the target value give...