// Author: Juergen Wendland ////////////////////////////////////////////////////////////////// // // // QSigExChecks // // // // This class implements a number of sanity checks to verify // // a successful fit. The most useful check is the comparison of // // the sum of the covariance matrix with the total number of // // events in the input data. // // the class interfaces with the Fit result via the output file // // from the main qsigex classes. // ////////////////////////////////////////////////////////////////// #ifndef _QSIGEXCHECKS_ #define _QSIGEXCHECKS__ #include #include #include "Rtypes.h" #include "TString.h" #include "TMatrixDSym.h" #include "QSigExDis.h" #define DEBUG #define DEBUG2 #include "debugger.h" using std::cout; using std::endl; class TDirectory; class TFile; class QSigExChecks { public: QSigExChecks(TFile *aFile=NULL); virtual ~QSigExChecks(); void GetFitResult(TFile *aFile=NULL, Char_t* aDir=NULL); TMatrixDSym *GetCovariance(TFile *aFile=NULL, Char_t* aDir=NULL, Char_t* aName=NULL); void GetParameters(TFile *aFile=NULL, Char_t* aDir=NULL); Double_t GetParameter(Int_t i){return fFitPar[i];}; Double_t GetParPlusError(Int_t i){return fFitParPErr[i];}; Double_t GetParMinusError(Int_t i){return fFitParMErr[i];}; Int_t GetParActive(Int_t i){return fFitParActive[i];}; void GetF2EMaps(TFile *aFile=NULL, Char_t* aDir=NULL); void GetPMTF2EMaps(TFile *aFile=NULL){GetF2EMaps(aFile,(Char_t*)fPMTF2EDir.Data());}; void GetNCDF2EMaps(TFile *aFile=NULL){GetF2EMaps(aFile,(Char_t*)fNCDF2EDir.Data());}; void AddEvents(TFile *aFile=NULL, Char_t* aDir = NULL, Char_t* aTreeName = NULL); void AddPMTEvents(TFile *aFile=NULL){cout << " " << endl; AddEvents(aFile,(Char_t*)fPMTEventDir.Data());}; void AddNCDEvents(TFile *aFile=NULL){cout << " " << endl; AddEvents(aFile,(Char_t*)fNCDEventDir.Data());}; Double_t GetSum(TMatrixDSym *aMatrix=NULL); Bool_t CheckEigenValues(TMatrixDSym *aMatrix=NULL); Bool_t CheckSum(TMatrixDSym *aMatrix=NULL, Int_t aNoEvents=0); Int_t GetNoEvents(){return fNoEvents;}; Double_t PlotLikelihoodFunction(Int_t ipar, Char_t* outbase=NULL); // plot and print the likelihood function for one parameter. Double_t PlotLikelihoodFunction(Int_t ipar, Int_t jpar, Char_t* outbase=NULL); // plot and print the likelihood function for two parameters. void PrintParameters(){ for(Int_t i=0;i " << i << " " << fFluxName[i] << endl; }; void PrintCorrelationMatrix(){ for(Int_t i=0; i