NAGASH 0.9.8
Next Generation Analysis System
Loading...
Searching...
No Matches
UnfoldTool.h
Go to the documentation of this file.
1#pragma once
2
3#include "NAGASH/Tool.h"
4
5namespace NAGASH
6{
7 class UnfoldTool : public Tool
8 {
9 private:
10 std::vector<double> Data_Reco; // Data Reco
11 std::vector<double> Data_Reco_Correct; // Data Reco * Fiducial
12 std::vector<double> Theory_Truth; // Theory Truth
13 std::vector<double> Theory_Truth_Correct; // Theory Truth * Efficiency
14 std::vector<double> Data_Truth; // Data Truth
15 std::vector<double> Data_Truth_Correct; // Data Truth / Efficiency
16 std::vector<double> Data_Reco_Estimated; // Sigmaj Rij Theory Truthj
17 std::vector<double> Data_Truth_Estimated;
18
19 std::vector<bool> IsMeasured;
20 std::vector<bool> IsSet;
21
22 std::vector<std::vector<double>> R_Matrix;
23 std::vector<std::vector<double>> M_Matrix;
24 std::vector<std::vector<bool>> MatrixIsSet;
25
26 std::vector<double> FiducialCorrection;
27 std::vector<double> EfficiencyCorrection;
28 std::vector<bool> FCorrectionIsSet;
29 std::vector<bool> ECorrectionIsSet;
30
31 std::vector<double> ReweightFactor;
32
33 int binnum;
34
35 std::vector<std::vector<double>> Data_Truth_Correct_EachItr;
36
37 public:
38 UnfoldTool(std::shared_ptr<MSGTool> msg, int num);
39 void SetData(int index, double value);
40 void SetTheory(int index, double value);
41 void SetMatrix(int indexi, int indexj, double value);
42 void SetFiducialCorrection(int index, double value);
43 void SetEfficiencyCorrection(int index, double value);
44
45 bool Check();
46 void Clear();
47
48 void BayesMatrix();
49 void EstimateDataTruth();
50 void EstimateDataReco();
51 void RenewTheory();
52 void PrintResult();
53 void BayesUnfold(int iteration);
54 void DisplayEachItr();
55
56 void ReweightUnfold(int &iteration);
59
60 void GetResult(int itration, TH1D *result);
61 virtual ~UnfoldTool() = default;
62 };
63}
Provide interface for all tools in NAGASH.
Definition Tool.h:72
std::shared_ptr< MSGTool > msg
Definition Tool.h:88
std::vector< bool > ECorrectionIsSet
Definition UnfoldTool.h:29
std::vector< bool > FCorrectionIsSet
Definition UnfoldTool.h:28
void BayesUnfold(int iteration)
std::vector< double > ReweightFactor
Definition UnfoldTool.h:31
std::vector< double > FiducialCorrection
Definition UnfoldTool.h:26
void EstimateReweightFactor()
std::vector< bool > IsSet
Definition UnfoldTool.h:20
std::vector< std::vector< double > > R_Matrix
Definition UnfoldTool.h:22
std::vector< double > Data_Reco_Correct
Definition UnfoldTool.h:11
void SetMatrix(int indexi, int indexj, double value)
void SetData(int index, double value)
std::vector< double > Data_Truth_Correct
Definition UnfoldTool.h:15
void SetFiducialCorrection(int index, double value)
std::vector< std::vector< bool > > MatrixIsSet
Definition UnfoldTool.h:24
std::vector< double > Data_Reco_Estimated
Definition UnfoldTool.h:16
std::vector< std::vector< double > > Data_Truth_Correct_EachItr
Definition UnfoldTool.h:35
std::vector< double > EfficiencyCorrection
Definition UnfoldTool.h:27
void ReweightUnfold(int &iteration)
void SetEfficiencyCorrection(int index, double value)
std::vector< double > Data_Reco
Definition UnfoldTool.h:10
std::vector< double > Theory_Truth
Definition UnfoldTool.h:12
std::vector< double > Data_Truth_Estimated
Definition UnfoldTool.h:17
std::vector< bool > IsMeasured
Definition UnfoldTool.h:19
std::vector< double > Theory_Truth_Correct
Definition UnfoldTool.h:13
std::vector< double > Data_Truth
Definition UnfoldTool.h:14
void SetTheory(int index, double value)
void GetResult(int itration, TH1D *result)
virtual ~UnfoldTool()=default
std::vector< std::vector< double > > M_Matrix
Definition UnfoldTool.h:23