/[PAMELA software]/PamUnfold/inc/PamUnfold.h
ViewVC logotype

Contents of /PamUnfold/inc/PamUnfold.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Thu Aug 30 16:51:05 2018 UTC (6 years, 3 months ago) by mayorov
Branch: MAIN
CVS Tags: PU1r1, HEAD
File MIME type: text/plain
Error occurred while calculating annotation data.
PamUnfold was upload to CVS

1 #include <iostream>
2 #include <fstream>
3 #include <stdio.h>
4 //#include <vector.h>
5 #include <math.h>
6 #include <TH1F.h>
7 #include <TH2F.h>
8 #include <TH1D.h>
9 #include <TH2D.h>
10 #include <TVectorT.h>
11 #include <TFile.h>
12 #include <TROOT.h>
13 #include <TList.h>
14 #include <TString.h>
15 #include <TLine.h>
16 #include <TGraphAsymmErrors.h>
17 #include <TGraphErrors.h>
18 #include <TChain.h>
19 #include <TCutG.h>
20 #include <TF1.h>
21 #include <TCanvas.h>
22 #include <TObjString.h>
23 #include <TMath.h>
24 #include <TMVA/Timer.h>
25 #include <RanGen.h>
26
27
28 #ifndef PAMUNFOLD_H
29 #define PAMUNFOLD_H
30
31 using std::vector;
32
33 class PamUnfold: public TNamed{
34 public:
35 PamUnfold(TString name, TString title);
36 ~PamUnfold();
37 PamUnfold(TString name, TString title, TH1D* measured, TH2D* smearing); //passing _measured and _smearing
38
39 void AddExcludedBin(Int_t bin);
40
41 TH1D* GetMeasured();
42 TH2D* GetSmearing();
43 TH1D* GetUnfolded();
44 TList* GetBinHistList();
45
46 void SetMeasured(TH1D*);
47 void SetSmearing(TH2D*);
48 void SetPrior(TH1D*);
49 void SetNormalization(TH1D*);
50 void SetImproved(Bool_t improv=kTRUE);
51 void SetSmoothing(Bool_t smooth, TString smooth_opt="ROOT");
52 void SetNsamples(UInt_t nsamples);
53 void SetMaxSteps(UInt_t max_steps);
54 void SetMinChi2(Double_t min_chi2);
55
56 Bool_t IsSmNormalized();
57
58 void Unfold();
59 void ImprovedUnfold();
60 void IterativeUnfolding(UInt_t niter=0, TList* list=NULL);
61
62 void Draw(TString path);
63
64 static void WMovAvSmooth(TH1D* input, vector<Int_t>&excl);
65 static Double_t GetChi2H( TH1D* h1, TH1D* h2 );
66
67
68
69 private:
70 TH1D* _measured;
71 TH1D* _unfolded;
72 TH1D* _old_unfolded;
73 TH2D* _smearing;
74 TH2D* _smearing_sample;
75 TH1D* _prior;
76 TH1D* _norm;
77 TList* _bin_list;
78 TList* _bin_hist_list;
79 Bool_t _smooth;
80 TString _smooth_opt;
81 UInt_t _max_steps;
82 Bool_t _is_improved;
83 UInt_t _nsamples;
84 Double_t _min_chi2;
85 vector<Int_t> _excluded_bins;
86 RanGen* rangen;
87 TCanvas* canv;
88
89 Bool_t IsBinningOK();
90 void Init();
91 void NormalizeMatrix();
92 void SampleMatrix();
93 void BuildFlux();
94 void FindSplitting(Int_t n, Int_t &nx, Int_t &ny);
95
96 ClassDef(PamUnfold, 1);
97 };
98
99
100 #endif

  ViewVC Help
Powered by ViewVC 1.1.23