23#ifndef REST_TRestResponse
24#define REST_TRestResponse
26#include "TRestMetadata.h"
53 void SetBinSize(Double_t bSize) {
fBinSize = bSize; }
54 void SetResponseFilename(std::string responseFile) {
fFilename = responseFile; }
55 void SetOrigin(
const TVector2& v) {
fOrigin = v; }
56 void SetVariable(
const std::string& var) {
fVariable = var; }
59 void Interpolate(Bool_t interpolate =
true) {
fInterpolation = interpolate; }
61 Double_t GetBinSize()
const {
return fBinSize; }
62 std::string GetResponseFilename()
const {
return fFilename; }
63 TVector2 GetOrigin()
const {
return fOrigin; }
64 std::string GetVariable()
const {
return fVariable; }
66 TVector2 GetInputRange()
const {
70 TVector2 GetOutputRange()
const {
78 std::vector<std::pair<Double_t, Double_t>>
GetResponse(Double_t input);
84 std::vector<std::vector<Float_t>> GetMatrix()
const {
return fResponseMatrix; }
86 TRestResponse(
const char* cfgFileName,
const std::string& name =
"");
A response matrix that might be applied to a given component inside a TRestComponent.
Double_t fBinSize
The resolution of the response matrix (binning)
std::vector< std::vector< Float_t > > fResponseMatrix
The response matrix.
Bool_t fTransposed
Determines if the response matrix has been transposed.
void Initialize() override
It will initialize the data frame with the filelist and column names (or observables) that have been ...
void LoadResponse(Bool_t transpose=true)
It loads into the fResponseMatrix data member the response from a file.
~TRestResponse()
Default destructor.
Bool_t fInterpolation
It allows to decide if the returned response should be interpolated (default:false)
std::string fVariable
It defines the variable name for which the response should be applied to.
std::vector< std::pair< Double_t, Double_t > > GetResponse(Double_t input)
This method will return a vector of std::pair, each pair will contain the output energy together with...
TVector2 fOrigin
First element of the response matrix (input/incident, output/detected)
TRestResponse()
Default constructor.
void PrintMetadata() override
Prints on screen the information about the metadata members of TRestAxionSolarFlux.
std::string fFilename
The filename used to import the response matrix.
void PrintResponseMatrix(Int_t fromRow, Int_t toRow)
Prints on screen the information about the metadata members of TRestAxionSolarFlux.