RooResolutionModel.h

Go to the documentation of this file.
00001 /*****************************************************************************
00002  * Project: RooFit                                                           *
00003  * Package: RooFitCore                                                       *
00004  *    File: $Id: RooResolutionModel.h,v 1.26 2007/05/14 18:37:46 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_RESOLUTION_MODEL
00017 #define ROO_RESOLUTION_MODEL
00018 
00019 #include "RooAbsPdf.h"
00020 #include "RooRealProxy.h"
00021 #include "RooRealVar.h"
00022 #include "RooFormulaVar.h"
00023 
00024 class RooResolutionModel : public RooAbsPdf {
00025 public:
00026 
00027   // Constructors, assignment etc
00028   inline RooResolutionModel() : _basis(0) { }
00029   RooResolutionModel(const char *name, const char *title, RooRealVar& x) ; 
00030   RooResolutionModel(const RooResolutionModel& other, const char* name=0);
00031   virtual TObject* clone(const char* newname) const = 0 ;
00032   virtual ~RooResolutionModel();
00033 
00034   Double_t getVal(const RooArgSet* nset=0) const ;
00035   virtual RooResolutionModel* convolution(RooFormulaVar* basis, RooAbsArg* owner) const ;
00036   RooRealVar& convVar() const ;
00037   const RooRealVar& basisConvVar() const ;
00038 
00039   inline Bool_t isBasisSupported(const char* name) const { return basisCode(name)?kTRUE:kFALSE ; }
00040   virtual Int_t basisCode(const char* name) const = 0 ;
00041 
00042   virtual void normLeafServerList(RooArgSet& list) const ;
00043   Double_t getNorm(const RooArgSet* nset=0) const ;
00044 
00045   inline const RooFormulaVar& basis() const { return _basis?*_basis:*identity() ; }
00046   Bool_t isConvolved() { return _basis ? kTRUE : kFALSE ; }
00047 
00048   virtual void printMultiline(ostream& os, Int_t content, Bool_t verbose=kFALSE, TString indent="") const ;
00049 
00050   static void cleanup() ;
00051 
00052   static RooFormulaVar* identity() ;
00053 
00054 protected:
00055 
00056   static RooFormulaVar* _identity ;  // Identity basis function pointe
00057 
00058 
00059   friend class RooConvGenContext ;
00060   friend class RooAddModel ;
00061   RooRealProxy x ;                   // Dependent/convolution variable
00062 
00063   virtual Bool_t redirectServersHook(const RooAbsCollection& newServerList, Bool_t mustReplaceAll, Bool_t nameChange, Bool_t isRecursive) ;
00064   virtual void changeBasis(RooFormulaVar* basis) ;
00065   Bool_t traceEvalHook(Double_t value) const ;
00066 
00067 
00068   friend class RooAbsAnaConvPdf ;
00069 
00070   Int_t _basisCode ;         // Identifier code for selected basis function
00071   RooFormulaVar* _basis ;    // Basis function convolved with this resolution model
00072   Bool_t _ownBasis ;         // Flag indicating ownership of _basis 
00073 
00074   ClassDef(RooResolutionModel,1) // Abstract Resolution Model
00075 };
00076 
00077 #endif

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