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

Detailed Description

It combines a number of experimental conditions allowing to calculate a combined experimental sensitivity.

Documentation TOBE written


REST-for-Physics - Software for Rare Event Searches Toolkit

History of developments:

2022-December: First implementation of TRestSensitivity Javier Galan

Author
: Javier Galan (javie.nosp@m.r.ga.nosp@m.lan.l.nosp@m.acar.nosp@m.ra@ce.nosp@m.rn.c.nosp@m.h)

Definition at line 29 of file TRestSensitivity.h.

#include <TRestSensitivity.h>

Inheritance diagram for TRestSensitivity:
TRestMetadata

Public Member Functions

void AddCurve (const std::vector< Double_t > &curve)
 
 ClassDefOverride (TRestSensitivity, 2)
 
TCanvas * DrawCurves ()
 
TCanvas * DrawLevelCurves ()
 
void ExportAveragedCurve (std::string fname, Double_t factor=1.e-10, Double_t power=0.25)
 
void ExportCurve (std::string fname, Double_t factor=1.e-10, Double_t power=0.25, int n=0)
 
void ExtractExperimentParameterizationNodes (Bool_t rescan=false)
 It scans all the experiment signals parametric nodes to build a complete list of nodes used to build a complete sensitivity curve. Some experiments may be sensitivy to a particular node, while others may be sensitivy to another. If more than one experiment is sensitivy to a given node, the sensitivity will be combined later on.
 
void Freeze ()
 
void GenerateCurve ()
 
void GenerateCurves (Int_t N)
 
std::vector< Double_t > GetAveragedCurve ()
 
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.
 
std::vector< Double_t > GetCurve (size_t n=0)
 
TRestExperimentGetExperiment (const size_t &n)
 
std::vector< TRestExperiment * > GetExperiments ()
 
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 placed at a specified level. E.g. if we provide a level 0.5, then the corresponding curve will be constructed with the central value extracted at each parameter point. More...
 
size_t GetNumberOfCurves ()
 
size_t GetNumberOfExperiments ()
 
size_t GetNumberOfNodes ()
 
std::vector< Double_t > GetParameterizationNodes ()
 
void ImportCurve (const std::vector< Double_t > &curve)
 
void Initialize () override
 It will initialize the data frame with the filelist and column names (or observables) that have been defined by the user.
 
void PrintMetadata () override
 Prints on screen the information about the metadata members of TRestAxionSolarFlux.
 
void PrintParameterizationNodes ()
 
TH1D * SignalStatisticalTest (Double_t node, Int_t N)
 
 TRestSensitivity ()
 Default constructor.
 
 TRestSensitivity (const char *cfgFileName, const std::string &name="")
 Constructor loading data from a config file. More...
 
 ~TRestSensitivity ()
 Default destructor.
 

Protected Member Functions

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 given by argument. The factor will be used to increase or decrease the coupling, and evaluate the likelihood. More...
 
void InitFromConfigFile () override
 It customizes the retrieval of XML data values of this class.
 
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. More...
 

Private Attributes

TCanvas * fCanvas = nullptr
 A canvas to draw.
 
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.
 
Bool_t fFrozen = false
 A flag that will frozen adding more experiments in the future.
 
std::vector< Double_t > fParameterizationNodes
 The fusioned list of parameterization nodes found at each experiment signal.
 
TH1D * fSignalTest = nullptr
 It is used to generate a histogram with the signal distribution produced with different signal samples.
 

Additional Inherited Members

Constructor & Destructor Documentation

◆ TRestSensitivity()

TRestSensitivity::TRestSensitivity ( const char *  cfgFileName,
const std::string &  name = "" 
)

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 70 of file TRestSensitivity.cxx.

Member Function Documentation

◆ ApproachByFactor()

Double_t TRestSensitivity::ApproachByFactor ( Double_t  node,
Double_t  g4,
Double_t  chi0,
Double_t  target,
Double_t  factor 
)
protected

It will return a value of the coupling, g4, such that (chi-chi0) gets closer to the target value given by argument. The factor will be used to increase or decrease the coupling, and evaluate the likelihood.

Coarse movement to get to Chi2 above target

Coarse movement to get to Chi2 below target (/2)

Definition at line 86 of file TRestSensitivity.cxx.

◆ GetLevelCurves()

std::vector< std::vector< Double_t > > TRestSensitivity::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 placed at a specified level. E.g. if we provide a level 0.5, then the corresponding curve will be constructed with the central value extracted at each parameter point.

We may then construct the profile of the sensitivity curves at 98%, 95% and 68% C.L. as follows:

TRestSensitivity::GetLevelCurves( {0.01, 0.025, 0.16, 0.84, 0.975, 0.99} );
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...

Definition at line 382 of file TRestSensitivity.cxx.

◆ UnbinnedLogLikelihood()

Double_t TRestSensitivity::UnbinnedLogLikelihood ( const TRestExperiment experiment,
Double_t  node,
Double_t  g4 = 0 
)
protected

It returns the Log(L) for the experiment and coupling given by argument.

We check if the signal component is sensitive to that particular node If not, this experiment will not contribute to that node

We could check if background has also components, but for the moment we do not have a background for each node, although it could be the case, if for example the background depends on the detector conditions. For example, higher pressure inside the detector gains in signal sensitivity but it will produce also higher background.

Definition at line 257 of file TRestSensitivity.cxx.


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