#include // Some RooFit stuff. #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include // Some ROOT stuff. #include #include #include #include #include #include #include #include #include #include #include // Some stuff from Andreas minimization code. #if !defined(__CINT__) || defined (__MAKECINT__) #include "Riostream.h" #include "TStopwatch.h" #include "Math/GSLMinimizer.h" #include "Math/Functor.h" #endif //using namespace std; // Here we will create the likelihood function, using the base RooAbsReal. // Will create a class called RooSNLikelihood. Will accept a name, title, // t and t0. The former two are const char* and the latter are RooAbsReal. class RooSNLikelihood : public RooAbsReal { public: RooSNLikelihood(const char*, const char*, RooAbsReal& _t0); RooSNLikelihood(const RooSNLikelihood& other, const char* name=0); virtual TObject* clone(const char* newname) const {return new RooSNLikelihood(*this, newname);} inline virtual ~RooSNLikelihood() { }; // These are the setters and getters for the ROOT objects // and vectors I will need for analysis. void SetDataFilename(const char*); void SetMeanFilename(const char*); void ReadMeanEventEvolution(); void ReadSimulationData(); void SetNumberOfEvents(); Int_t GetNumberOfEvents(); void SetNormalization(); Double_t GetNormalization(); Double_t GetKSTest(); protected: // Documentation suggests always using proxies to store RooAbsArg. RooRealProxy t0; // This function returns the evaluation. Double_t evaluate() const; private: //ClassDef(RooSNLikelihood,1) // This is useless in principle. // Some ROOT stuff I would like to use. const char* fDataFilename; const char* fMeanFilename; TFile* fDataROOTTFile; TTree* fDataROOTTTree; TFile* fMeanROOTTFile; TGraph* fMeanEventEvolution; std::vector fEvents; // Some variables that can be accessed via getters. Double_t fNormalization; Int_t fNumEvents; }; // end of class description.