00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef ROOT_TSPlot
00011 #define ROOT_TSPlot
00012
00013 #include "TObjArray.h"
00014 #include "TString.h"
00015 #include "TMatrixT.h"
00016 #include "TMatrixDfwd.h"
00017
00018 class TH1D;
00019 class TTree;
00020
00021 class TSPlot: public TObject {
00022 protected:
00023 TMatrixD fXvar;
00024 TMatrixD fYvar;
00025 TMatrixD fYpdf;
00026 TMatrixD fPdfTot;
00027 TMatrixD fMinmax;
00028 TMatrixD fSWeights;
00029
00030 TObjArray fXvarHists;
00031 TObjArray fYvarHists;
00032 TObjArray fYpdfHists;
00033 TObjArray fSWeightsHists;
00034
00035 TTree *fTree;
00036 TString* fTreename;
00037 TString* fVarexp;
00038 TString* fSelection;
00039
00040
00041 Int_t fNx;
00042 Int_t fNy;
00043 Int_t fNSpecies;
00044 Int_t fNevents;
00045
00046 Double_t *fNumbersOfEvents;
00047
00048 void SPlots(Double_t *covmat, Int_t i_excl);
00049
00050 public:
00051 TSPlot();
00052 TSPlot(Int_t nx, Int_t ny, Int_t ne, Int_t ns, TTree* tree);
00053 virtual ~TSPlot();
00054
00055 void Browse(TBrowser *b);
00056 Bool_t IsFolder() const { return kTRUE;}
00057
00058 void FillXvarHists(Int_t nbins = 100);
00059 void FillYvarHists(Int_t nbins = 100);
00060 void FillYpdfHists(Int_t nbins = 100);
00061 void FillSWeightsHists(Int_t nbins = 50);
00062
00063 Int_t GetNevents() {return fNevents;}
00064 Int_t GetNspecies() {return fNSpecies;}
00065
00066 TObjArray* GetSWeightsHists();
00067 TH1D* GetSWeightsHist(Int_t ixvar, Int_t ispecies,Int_t iyexcl=-1);
00068 TObjArray* GetXvarHists();
00069 TH1D* GetXvarHist(Int_t ixvar);
00070 TObjArray* GetYvarHists();
00071 TH1D* GetYvarHist(Int_t iyvar);
00072 TObjArray* GetYpdfHists();
00073 TH1D* GetYpdfHist(Int_t iyvar, Int_t ispecies);
00074 void GetSWeights(TMatrixD &weights);
00075 void GetSWeights(Double_t *weights);
00076 TString* GetTreeName(){return fTreename;}
00077 TString* GetTreeSelection() {return fSelection;}
00078 TString* GetTreeExpression() {return fVarexp;}
00079 void MakeSPlot(Option_t* option="v");
00080
00081 void RefillHist(Int_t type, Int_t var, Int_t nbins, Double_t min, Double_t max, Int_t nspecies=-1);
00082 void SetNX(Int_t nx){fNx=nx;}
00083 void SetNY(Int_t ny){fNy=ny;}
00084 void SetNSpecies(Int_t ns){fNSpecies=ns;}
00085 void SetNEvents(Int_t ne){fNevents=ne;}
00086 void SetInitialNumbersOfSpecies(Int_t *numbers);
00087 void SetTree(TTree *tree);
00088 void SetTreeSelection(const char* varexp="", const char *selection="", Long64_t firstentry=0);
00089
00090 ClassDef(TSPlot, 1)
00091 };
00092
00093 #endif