REST-for-Physics  v2.3
Rare Event Searches ToolKit for Physics
TRestComponentFormula.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_TRestComponentFormula
24#define REST_TRestComponentFormula
25
26#include <TFormula.h>
27
28#include "TRestComponent.h"
29#include "TRestDataSet.h"
30
33 private:
35 std::vector<TFormula> fFormulas;
36
38 std::string fUnits = "cm^-2*keV^-1"; //<
39
40 protected:
41 void InitFromConfigFile() override;
42
43 void FillHistograms() override;
44
45 public:
46 Double_t GetFormulaRate(std::vector<Double_t> point);
47
48 void PrintMetadata() override;
49
50 void Initialize() override;
51 TRestComponentFormula(const char* cfgFileName, const std::string& name);
54
55 ClassDefOverride(TRestComponentFormula, 1);
56};
57#endif
It defines an analytical component model distribution in a given parameter space (tipically x,...
std::string fUnits
The formulas should be expressed in the following units.
std::vector< TFormula > fFormulas
A vector of formulas that will be added up to integrate a given rate.
~TRestComponentFormula()
Default destructor.
void Initialize() override
It will initialize the data frame with the filelist and column names (or observables) that have been ...
void InitFromConfigFile() override
It customizes the retrieval of XML data values of this class.
void FillHistograms() override
It will produce a histogram with the distribution using the formula contributions.
void PrintMetadata() override
Prints on screen the information about the metadata members of TRestAxionSolarFlux.
Double_t GetFormulaRate(std::vector< Double_t > point)
It returns the intensity/rate (in seconds) corresponding to the formula evaluated at the position of ...
TRestComponentFormula()
Default constructor.
It defines a background/signal model distribution in a given parameter space (tipically x,...