RooNLLVar.h

Go to the documentation of this file.
00001 /*****************************************************************************
00002  * Project: RooFit                                                           *
00003  * Package: RooFitCore                                                       *
00004  *    File: $Id: RooNLLVar.h,v 1.10 2007/07/21 21:32:52 wouter Exp $
00005  * Authors:                                                                  *
00006  *   WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu       *
00007  *   DK, David Kirkby,    UC Irvine,         dkirkby@uci.edu                 *
00008  *                                                                           *
00009  * Copyright (c) 2000-2005, Regents of the University of California          *
00010  *                          and Stanford University. All rights reserved.    *
00011  *                                                                           *
00012  * Redistribution and use in source and binary forms,                        *
00013  * with or without modification, are permitted according to the terms        *
00014  * listed in LICENSE (http://roofit.sourceforge.net/license.txt)             *
00015  *****************************************************************************/
00016 #ifndef ROO_NLL_VAR
00017 #define ROO_NLL_VAR
00018 
00019 #include "RooAbsOptTestStatistic.h"
00020 #include "RooCmdArg.h"
00021 #include "RooAbsPdf.h"
00022 
00023 class RooNLLVar : public RooAbsOptTestStatistic {
00024 public:
00025 
00026   // Constructors, assignment etc
00027   RooNLLVar() {} ;  
00028   RooNLLVar(const char *name, const char* title, RooAbsPdf& pdf, RooAbsData& data,
00029             const RooCmdArg& arg1                , const RooCmdArg& arg2=RooCmdArg::none(),const RooCmdArg& arg3=RooCmdArg::none(),
00030             const RooCmdArg& arg4=RooCmdArg::none(), const RooCmdArg& arg5=RooCmdArg::none(),const RooCmdArg& arg6=RooCmdArg::none(),
00031             const RooCmdArg& arg7=RooCmdArg::none(), const RooCmdArg& arg8=RooCmdArg::none(),const RooCmdArg& arg9=RooCmdArg::none()) ;
00032 
00033   RooNLLVar(const char *name, const char *title, RooAbsPdf& pdf, RooAbsData& data,
00034             Bool_t extended=kFALSE, const char* rangeName=0, const char* addCoefRangeName=0, 
00035             Int_t nCPU=1, Bool_t interleave=kFALSE, Bool_t verbose=kTRUE, Bool_t splitRange=kFALSE, Bool_t cloneData=kTRUE) ;
00036 
00037   RooNLLVar(const char *name, const char *title, RooAbsPdf& pdf, RooAbsData& data,
00038             const RooArgSet& projDeps, Bool_t extended=kFALSE, const char* rangeName=0, 
00039             const char* addCoefRangeName=0, Int_t nCPU=1, Bool_t interleave=kFALSE, Bool_t verbose=kTRUE, Bool_t splitRange=kFALSE, Bool_t cloneData=kTRUE) ;
00040 
00041   RooNLLVar(const RooNLLVar& other, const char* name=0);
00042   virtual TObject* clone(const char* newname) const { return new RooNLLVar(*this,newname); }
00043 
00044   virtual RooAbsTestStatistic* create(const char *name, const char *title, RooAbsReal& pdf, RooAbsData& adata,
00045                                       const RooArgSet& projDeps, const char* rangeName, const char* addCoefRangeName=0, 
00046                                       Int_t nCPU=1, Bool_t interleave=kFALSE, Bool_t verbose=kTRUE, Bool_t splitRange=kFALSE) {
00047     return new RooNLLVar(name,title,(RooAbsPdf&)pdf,adata,projDeps,_extended,rangeName, addCoefRangeName, nCPU, interleave,verbose,splitRange,kFALSE) ;
00048   }
00049   
00050   virtual ~RooNLLVar();
00051 
00052   void applyWeightSquared(Bool_t flag) { _weightSq = flag ; setValueDirty() ; } 
00053 
00054   virtual Double_t defaultErrorLevel() const { return 0.5 ; }
00055 
00056 protected:
00057 
00058   virtual Bool_t processEmptyDataSets() const { return _extended ; }
00059 
00060   static RooArgSet _emptySet ; // Supports named argument constructor
00061 
00062   Bool_t _extended ;
00063   virtual Double_t evaluatePartition(Int_t firstEvent, Int_t lastEvent, Int_t stepSize) const ;
00064   Bool_t _weightSq ; // Apply weights squared?
00065   
00066   ClassDef(RooNLLVar,1) // Function representing (extended) -log(L) of p.d.f and dataset
00067 };
00068 
00069 #endif

Generated on Tue Jul 5 14:26:14 2011 for ROOT_528-00b_version by  doxygen 1.5.1