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

Detailed Description

It includes a model definition and experimental data used to obtain a final experimental sensitivity.

Documentation TOBE written


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

History of developments:

2022-December: First implementation of TRestExperiment 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 33 of file TRestExperiment.h.

#include <TRestExperiment.h>

Inheritance diagram for TRestExperiment:
TRestMetadata

Public Member Functions

 ClassDefOverride (TRestExperiment, 2)
 
void GenerateMockDataSet (Bool_t useAverage=false)
 
TRestComponentGetBackground () const
 
Int_t GetExperimentalCounts () const
 
ROOT::RDF::RNode GetExperimentalDataFrame () const
 
TRestDataSet GetExperimentalDataSet () const
 
Double_t GetExposureInSeconds () const
 
TRestComponentGetSignal () const
 
void Initialize () override
 It will initialize the data frame with the filelist and column names (or observables) that have been defined by the user. More...
 
Bool_t IsDataReady () const
 
Bool_t IsMockData () const
 
void PrintExperimentalData ()
 
void PrintMetadata () override
 Prints on screen the information about the metadata members of TRestAxionSolarFlux. More...
 
void SetBackground (TRestComponent *comp)
 
void SetExperimentalDataSet (const std::string &filename)
 
void SetExposureInSeconds (const Double_t exposure)
 
void SetSignal (TRestComponent *comp)
 
 TRestExperiment ()
 Default constructor. More...
 
 TRestExperiment (const char *cfgFileName, const std::string &name="")
 Constructor loading data from a config file. More...
 
 ~TRestExperiment ()
 Default destructor. More...
 

Protected Member Functions

void InitFromConfigFile () override
 It customizes the retrieval of XML data values of this class. More...
 

Private Attributes

TRestComponentfBackground = nullptr
 A pointer to the background component. More...
 
Bool_t fDataReady = false
 Only if it is true we will be able to calculate the LogLikelihood. More...
 
Int_t fExperimentalCounts = 0
 It keeps track on the number of counts inside the dataset. More...
 
TRestDataSet fExperimentalData
 It contains the experimental data (should contain same columns as the components) More...
 
std::string fExperimentalDataSet = ""
 It defines the filename used to load the dataset. More...
 
Double_t fExposureTime = 0
 The exposure time. If 0 it will be extracted from the tracking dataset (In us, standard REST unit) More...
 
Bool_t fMockData = false
 If enabled it means that the experimental data was MC-generated. More...
 
TRandom3 * fRandom = nullptr
 Internal process random generator. More...
 
UInt_t fSeed = 0
 Seed used in random generator. More...
 
TRestComponentfSignal = nullptr
 A pointer to the signal component. More...
 
Bool_t fUseAverage = false
 The mock dataset will be generated using the mean counts instead of a real MonteCarlo. More...
 

Additional Inherited Members

Constructor & Destructor Documentation

◆ TRestExperiment() [1/2]

TRestExperiment::TRestExperiment ( 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 69 of file TRestExperiment.cxx.

◆ TRestExperiment() [2/2]

TRestExperiment::TRestExperiment ( )

Default constructor.

Definition at line 48 of file TRestExperiment.cxx.

◆ ~TRestExperiment()

TRestExperiment::~TRestExperiment ( )

Default destructor.

Definition at line 53 of file TRestExperiment.cxx.

Member Function Documentation

◆ GenerateMockDataSet()

void TRestExperiment::GenerateMockDataSet ( Bool_t  useAverage = false)

Definition at line 90 of file TRestExperiment.cxx.

◆ GetBackground()

TRestComponent * TRestExperiment::GetBackground ( ) const
inline

Definition at line 85 of file TRestExperiment.h.

◆ GetExperimentalCounts()

Int_t TRestExperiment::GetExperimentalCounts ( ) const
inline

Definition at line 73 of file TRestExperiment.h.

◆ GetExperimentalDataFrame()

ROOT::RDF::RNode TRestExperiment::GetExperimentalDataFrame ( ) const
inline

Definition at line 88 of file TRestExperiment.h.

◆ GetExperimentalDataSet()

TRestDataSet TRestExperiment::GetExperimentalDataSet ( ) const
inline

Definition at line 87 of file TRestExperiment.h.

◆ GetExposureInSeconds()

Double_t TRestExperiment::GetExposureInSeconds ( ) const
inline

Definition at line 84 of file TRestExperiment.h.

◆ GetSignal()

TRestComponent * TRestExperiment::GetSignal ( ) const
inline

Definition at line 86 of file TRestExperiment.h.

◆ InitFromConfigFile()

void TRestExperiment::InitFromConfigFile ( )
overrideprotectedvirtual

It customizes the retrieval of XML data values of this class.

Checking that signal/background/tracking got the same variable names and ranges

Reimplemented from TRestMetadata.

Definition at line 155 of file TRestExperiment.cxx.

◆ Initialize()

void TRestExperiment::Initialize ( )
overridevirtual

It will initialize the data frame with the filelist and column names (or observables) that have been defined by the user.

Reimplemented from TRestMetadata.

Definition at line 78 of file TRestExperiment.cxx.

◆ IsDataReady()

Bool_t TRestExperiment::IsDataReady ( ) const
inline

Definition at line 76 of file TRestExperiment.h.

◆ IsMockData()

Bool_t TRestExperiment::IsMockData ( ) const
inline

Definition at line 75 of file TRestExperiment.h.

◆ PrintExperimentalData()

void TRestExperiment::PrintExperimentalData ( )
inline

Definition at line 90 of file TRestExperiment.h.

◆ PrintMetadata()

void TRestExperiment::PrintMetadata ( )
overridevirtual

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

Reimplemented from TRestMetadata.

Definition at line 269 of file TRestExperiment.cxx.

◆ SetBackground()

void TRestExperiment::SetBackground ( TRestComponent comp)
inline

Definition at line 80 of file TRestExperiment.h.

◆ SetExperimentalDataSet()

void TRestExperiment::SetExperimentalDataSet ( const std::string &  filename)

fExposureTime is in standard REST units : us

Definition at line 121 of file TRestExperiment.cxx.

◆ SetExposureInSeconds()

void TRestExperiment::SetExposureInSeconds ( const Double_t  exposure)
inline

Definition at line 78 of file TRestExperiment.h.

◆ SetSignal()

void TRestExperiment::SetSignal ( TRestComponent comp)
inline

Definition at line 79 of file TRestExperiment.h.

Field Documentation

◆ fBackground

TRestComponent* TRestExperiment::fBackground = nullptr
private

A pointer to the background component.

Definition at line 39 of file TRestExperiment.h.

◆ fDataReady

Bool_t TRestExperiment::fDataReady = false
private

Only if it is true we will be able to calculate the LogLikelihood.

Definition at line 54 of file TRestExperiment.h.

◆ fExperimentalCounts

Int_t TRestExperiment::fExperimentalCounts = 0
private

It keeps track on the number of counts inside the dataset.

Definition at line 60 of file TRestExperiment.h.

◆ fExperimentalData

TRestDataSet TRestExperiment::fExperimentalData
private

It contains the experimental data (should contain same columns as the components)

Definition at line 48 of file TRestExperiment.h.

◆ fExperimentalDataSet

std::string TRestExperiment::fExperimentalDataSet = ""
private

It defines the filename used to load the dataset.

Definition at line 45 of file TRestExperiment.h.

◆ fExposureTime

Double_t TRestExperiment::fExposureTime = 0
private

The exposure time. If 0 it will be extracted from the tracking dataset (In us, standard REST unit)

Definition at line 36 of file TRestExperiment.h.

◆ fMockData

Bool_t TRestExperiment::fMockData = false
private

If enabled it means that the experimental data was MC-generated.

Definition at line 51 of file TRestExperiment.h.

◆ fRandom

TRandom3* TRestExperiment::fRandom = nullptr
private

Internal process random generator.

Definition at line 63 of file TRestExperiment.h.

◆ fSeed

UInt_t TRestExperiment::fSeed = 0
private

Seed used in random generator.

Definition at line 66 of file TRestExperiment.h.

◆ fSignal

TRestComponent* TRestExperiment::fSignal = nullptr
private

A pointer to the signal component.

Definition at line 42 of file TRestExperiment.h.

◆ fUseAverage

Bool_t TRestExperiment::fUseAverage = false
private

The mock dataset will be generated using the mean counts instead of a real MonteCarlo.

Definition at line 57 of file TRestExperiment.h.


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