REST-for-Physics  v2.3
Rare Event Searches ToolKit for Physics
TRestExperimentList.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 https://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 https://www.gnu.org/licenses/. *
20 * For the list of contributors see $REST_PATH/CREDITS. *
21 *************************************************************************/
22
23#ifndef REST_TRestExperimentList
24#define REST_TRestExperimentList
25
26#include "TRestExperiment.h"
27#include "TRestMetadata.h"
28
31 private:
33 std::string fComponentPattern = ""; //<
34
36 std::vector<std::string> fComponentFiles; //<
37
39 std::string fDataSetPattern = ""; //<
40
42 std::vector<std::string> fDataSetFilenames; //<
43
45 std::string fExperimentsFile = ""; //< Exposure/TrackingData - SignalComponent - BackgroundComponent
46
48 std::vector<std::vector<std::string> > fExperimentsTable; //<
49
51 std::vector<TRestExperiment*> fExperiments; //<
52
54 std::vector<Double_t> fParameterizationNodes; //<
55
57 Double_t fExposureTime = 0;
58
60 std::string fExposureStrategy = "unique";
61
63 TRestComponent* fSignal = nullptr; //<
64
67
68 protected:
69 TRestComponent* GetComponent(std::string compName);
70
71 void InitFromConfigFile() override;
72
73 public:
74 void Initialize() override;
75
76 void SetExposure(const Double_t& exposure) { fExposureTime = exposure; }
77 void SetSignal(TRestComponent* comp) { fSignal = comp; }
78 void SetBackground(TRestComponent* comp) { fBackground = comp; }
79
81 std::vector<Double_t> GetParameterizationNodes() { return fParameterizationNodes; }
82 void PrintParameterizationNodes();
83
84 std::vector<TRestExperiment*> GetExperiments() { return fExperiments; }
85 TRestExperiment* GetExperiment(const size_t& n) {
86 if (n >= GetNumberOfExperiments())
87 return nullptr;
88 else
89 return fExperiments[n];
90 }
91
92 size_t GetNumberOfExperiments() { return fExperiments.size(); }
93
94 void PrintMetadata() override;
95
96 TRestExperimentList(const char* cfgFileName, const std::string& name);
97
100
101 ClassDefOverride(TRestExperimentList, 1);
102};
103#endif
It defines a background/signal model distribution in a given parameter space (tipically x,...
A helper metadata class to create a list of TRestExperiment instances.
std::string fExperimentsFile
A file where we define experiment components, exposureTime, and tracking data of each experiment.
std::vector< TRestExperiment * > fExperiments
A vector with a list of experiments includes the background components in this model.
std::vector< Double_t > fParameterizationNodes
The fusioned list of parameterization nodes found at each experiment signal.
std::vector< std::string > fComponentFiles
A vector with filenames containing the components.
void InitFromConfigFile() override
It customizes the retrieval of XML data values of this class.
TRestComponent * fBackground
If not null this will be the common signal used in each experiment.
void Initialize() override
It will initialize the data frame with the filelist and column names (or observables) that have been ...
std::string fExposureStrategy
In case an exposure time is given it defines how to assign time to each experiment (unique/ksvz).
void ExtractExperimentParameterizationNodes()
It scans all the experiment signals parametric nodes to build a complete list of nodes used to build ...
std::string fComponentPattern
A fullpath filename pattern helping to initialize the component files vector.
std::string fDataSetPattern
A fullpath filename pattern helping to initialize the dataset files vector.
TRestExperimentList()
Default constructor.
std::vector< std::string > fDataSetFilenames
A vector with filenames containing the datasets with experimental data.
TRestComponent * fSignal
If not null this will be the common signal used in each experiment.
std::vector< std::vector< std::string > > fExperimentsTable
A table with the experiment file information.
~TRestExperimentList()
Default destructor.
void PrintMetadata() override
Prints on screen the information about the metadata members of TRestAxionSolarFlux.
Double_t fExposureTime
If not zero this will be the common exposure time in micro-seconds (standard REST units)
It includes a model definition and experimental data used to obtain a final experimental sensitivity.
A base class for any REST metadata class.
Definition: TRestMetadata.h:70