RooNumConvPdf.h

Go to the documentation of this file.
00001 /*****************************************************************************
00002  * Project: RooFit                                                           *
00003  * Package: RooFitCore                                                       *
00004  *    File: $Id: RooNumConvPdf.h,v 1.2 2007/05/11 10:42:36 verkerke 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_NUM_CONV_PDF
00017 #define ROO_NUM_CONV_PDF
00018 
00019 #include "RooAbsPdf.h"
00020 #include "RooNumConvolution.h"
00021 
00022 class TH2 ;
00023 class RooArgSet ;
00024 class RooDataSet ;
00025 
00026 class RooNumConvPdf : public RooAbsPdf {
00027 public:
00028 
00029   RooNumConvPdf() ;
00030 
00031   RooNumConvPdf(const char *name, const char *title, 
00032                 RooRealVar& convVar, RooAbsPdf& pdf, RooAbsPdf& resmodel) ;
00033 
00034   RooNumConvPdf(const RooNumConvPdf& other, const char* name=0) ;
00035 
00036   virtual TObject* clone(const char* newname) const { return new RooNumConvPdf(*this,newname) ; }
00037   virtual ~RooNumConvPdf() ;
00038 
00039   virtual Double_t evaluate() const ;
00040 
00041   // Calls forwarded to RooNumConvolution
00042   inline RooNumIntConfig& convIntConfig() { return conv().convIntConfig() ; }
00043   inline void clearConvolutionWindow() { conv().clearConvolutionWindow() ; }
00044   inline void setConvolutionWindow(RooAbsReal& centerParam, RooAbsReal& widthParam, Double_t widthScaleFactor=1) 
00045         { conv().setConvolutionWindow(centerParam,widthParam,widthScaleFactor) ; }
00046   inline void setCallWarning(Int_t threshold=2000) { conv().setCallWarning(threshold) ; }
00047   inline void setCallProfiling(Bool_t flag, Int_t nbinX = 40, Int_t nbinCall = 40, Int_t nCallHigh=1000) 
00048         { conv().setCallProfiling(flag,nbinX,nbinCall,nCallHigh) ; }
00049   inline const TH2* profileData() const { return conv().profileData() ; }
00050 
00051   // Access components
00052   RooRealVar&  var() const { return (RooRealVar&)(const_cast<RooAbsReal&>(_origVar.arg())) ; }
00053   RooAbsReal&  pdf() const { return const_cast<RooAbsReal&>(_origPdf.arg()) ; }
00054   RooAbsReal&  model() const { return const_cast<RooAbsReal&>(_origModel.arg()) ; }
00055 
00056   void printMetaArgs(ostream& os) const ;
00057 
00058 protected:
00059 
00060   // WVE Store all properties of RooNumConvolution here so that can be take
00061   // along in the copy ctor.
00062 
00063   RooNumConvolution& conv() const { if (!_init) initialize() ; return *_conv ; }
00064 
00065   mutable Bool_t _init ; //! do not persist
00066   void initialize() const ;
00067   mutable RooNumConvolution* _conv ; //! Actual convolution calculation
00068 
00069   RooRealProxy _origVar ;         // Original convolution variable
00070   RooRealProxy _origPdf ;         // Original input PDF
00071   RooRealProxy _origModel ;       // Original resolution model
00072 
00073   virtual RooAbsGenContext* genContext(const RooArgSet &vars, const RooDataSet *prototype=0, 
00074                                        const RooArgSet* auxProto=0, Bool_t verbose= kFALSE) const ;
00075 
00076   friend class RooConvGenContext ;
00077 
00078   ClassDef(RooNumConvPdf,1)     // Operator PDF implementing numeric convolution of 2 input PDFs
00079 };
00080 
00081 #endif

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