00001 00002 // 00003 // Class to take in parallel run fit outputs and merge them 00004 // 00005 // - Writes out text and root files with overall surfaces, 00006 // best fit spectra etc. 00007 // 00009 00010 #ifndef GHOSTMERGE_H 00011 #define GHOSTMERGE_H 00012 00013 #include "GhostInputs.h" 00014 #include "GhostSample.h" 00015 #include "NtupleUtils/NuCutImps.h" 00016 00017 #include "TObject.h" 00018 #include "TFile.h" 00019 #include "TH2D.h" 00020 #include "TH1D.h" 00021 #include "TString.h" 00022 #include "TTree.h" 00023 #include "TCanvas.h" 00024 #include "TChain.h" 00025 #include "TGraph.h" 00026 00027 #include "NtupleUtils/NuCutImps.h" 00028 00029 #include <vector> 00030 #include <iostream> 00031 00032 using namespace std; 00033 00034 class GhostMerge : public TObject 00035 { 00036 friend class GhostInputs; 00037 friend class GhostFakeData; 00038 friend class GhostFramework; 00039 friend class GhostSample; 00040 00041 public: 00042 00043 GhostMerge(GhostInputs*); 00044 ~GhostMerge(); 00045 00046 00047 void AddFile(Char_t* filename){ 00048 vFile.push_back(new TFile(filename,"read")); 00049 } 00050 void SetNumberInputFile(Int_t num) { fNumInputFiles = num; } 00051 void Pause(); 00052 void AddSample(GhostSample* sample) { vSamples.push_back(sample); } 00053 void RunMerge(); 00054 00055 00056 private: 00057 00058 GhostInputs* gInputs; 00059 00060 00061 Int_t fNumInputFiles; 00062 vector<TFile*> vFile; 00063 vector<GhostSample*> vSamples; 00064 TFile* fOutputRootFile; 00065 00066 00067 //Grid variables 00068 Double_t fSin2MinOverall; 00069 Double_t fSin2MaxOverall; 00070 Double_t fDm2MinOverall; 00071 Double_t fDm2MaxOverall; 00072 00073 Double_t fDm2BinWidth; 00074 Double_t fSin2BinWidth; 00075 00076 Int_t fNumSin2BinsOverall; 00077 Int_t fNumDm2BinsOverall; 00078 Int_t fNumSin2Bins; 00079 Int_t fNumDm2Bins; 00080 00081 00082 //Best fit variables 00083 Double_t fMinLik; 00084 Int_t fMinIndexDm2; 00085 Int_t fMinIndexSin2; 00086 Double_t fMinLikSin2; 00087 Double_t fMinLikSin2Error; 00088 Double_t fMinLikDm2; 00089 Double_t fMinLikDm2Error; 00090 TGraph* gBestFit; 00091 00092 //Fit Containers 00093 TH2D* hOverallSurface; 00094 TH2D* hDeltaOverallSurface; 00095 00096 TH2D* hCCDetNormalisation; 00097 TH2D* hCCDetNormalisationError; 00098 TH2D* hCCRockNormalisation; 00099 TH2D* hCCRockNormalisationError; 00100 TH2D* hNuMuBarNormalisation; 00101 TH2D* hNuMuBarNormalisationError; 00102 TH2D* hNCNormalisation; 00103 TH2D* hNCNormalisationError; 00104 00105 vector<TH2D*> v2DSystematicSurfaces; 00106 vector<TH2D*> v2DSystematicErrorSurfaces; 00107 vector<TH2D*> v1DSystematicSurfaces; 00108 vector<TH2D*> v1DSystematicErrorSurfaces; 00109 00110 TH2D* hDecoherenceSurface; 00111 TH2D* hDecoherenceSurfaceError; 00112 00113 ClassDef(GhostMerge,1) 00114 00115 }; 00116 00117 #endif 00118