2929class TRestSensitivity : public TRestMetadata {
3030 private:
3131 // / A list of experimental conditions included to get a final sensitivity plot
32- std::vector<TRestExperiment*> fExperiments ; // <
32+ std::vector<TRestExperiment*> fExperiments ; // !
3333
34+ // / The fusioned list of parameterization nodes found at each experiment signal
35+ std::vector<Double_t> fParameterizationNodes ; // <
36+
37+ // / A vector of calculated sensitivity curves defined as a funtion of the parametric node
38+ std::vector<std::vector<Double_t>> fCurves ; // <
39+
40+ // / A flag that will frozen adding more experiments in the future.
41+ Bool_t fFrozen = false ; // < Only needed if we add experiments by other means than RML
42+
43+ // / It is used to generate a histogram with the signal distribution produced with different signal samples
3444 TH1D* fSignalTest = nullptr ;
3545
46+ // / A canvas to draw
47+ TCanvas* fCanvas = nullptr ; // !
48+
3649 protected:
3750 void InitFromConfigFile () override ;
3851
39- Double_t UnbinnedLogLikelihood (const TRestExperiment* experiment, Double_t g4 = 0 );
40- Double_t ApproachByFactor (Double_t g4, Double_t chi0, Double_t target, Double_t factor);
52+ Double_t UnbinnedLogLikelihood (const TRestExperiment* experiment, Double_t node, Double_t g4 = 0 );
53+ Double_t ApproachByFactor (Double_t node, Double_t g4, Double_t chi0, Double_t target, Double_t factor);
4154
4255 public:
4356 void Initialize () override ;
4457
45- Double_t GetCoupling (Double_t sigma = 2 , Double_t precision = 0.01 );
58+ void ExtractExperimentParameterizationNodes (Bool_t rescan = false );
59+ std::vector<Double_t> GetParameterizationNodes () { return fParameterizationNodes ; }
60+ void PrintParameterizationNodes ();
61+
62+ Double_t GetCoupling (Double_t node, Double_t sigma = 2 , Double_t precision = 0.01 );
63+ void AddCurve (const std::vector<Double_t>& curve) { fCurves .push_back (curve); }
64+ void GenerateCurve ();
65+ void GenerateCurves (Int_t N);
4666
47- TH1D* SignalStatisticalTest (Int_t N);
67+ std::vector<Double_t> GetCurve (size_t n = 0 );
68+ std::vector<Double_t> GetAveragedCurve ();
69+ std::vector<std::vector<Double_t>> GetLevelCurves (const std::vector<Double_t>& levels);
70+
71+ void ExportCurve (std::string fname, int n);
72+ void ExportAveragedCurve (std::string fname);
73+
74+ TH1D* SignalStatisticalTest (Double_t node, Int_t N);
75+
76+ void Freeze () { fFrozen = true ; }
4877
4978 std::vector<TRestExperiment*> GetExperiments () { return fExperiments ; }
5079 TRestExperiment* GetExperiment (const size_t & n) {
@@ -55,13 +84,18 @@ class TRestSensitivity : public TRestMetadata {
5584 }
5685
5786 size_t GetNumberOfExperiments () { return fExperiments .size (); }
87+ size_t GetNumberOfCurves () { return fCurves .size (); }
88+ size_t GetNumberOfNodes () { return fParameterizationNodes .size (); }
5889
5990 void PrintMetadata () override ;
6091
92+ TCanvas* DrawCurves ();
93+ TCanvas* DrawLevelCurves ();
94+
6195 TRestSensitivity (const char * cfgFileName, const std::string& name = " " );
6296 TRestSensitivity ();
6397 ~TRestSensitivity ();
6498
65- ClassDefOverride (TRestSensitivity, 1 );
99+ ClassDefOverride (TRestSensitivity, 2 );
66100};
67101#endif
0 commit comments