00001 /***************************************************************************** 00002 * Project: RooFit * 00003 * Package: RooFitCore * 00004 * File: $Id: RooConstraintSum.h 31654 2009-12-08 13:38:37Z wouter $ 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_CONSTRAINT_SUM 00017 #define ROO_CONSTRAINT_SUM 00018 00019 #include "RooAbsReal.h" 00020 #include "RooListProxy.h" 00021 #include "RooSetProxy.h" 00022 00023 class RooRealVar; 00024 class RooArgList ; 00025 00026 class RooConstraintSum : public RooAbsReal { 00027 public: 00028 00029 RooConstraintSum() ; 00030 RooConstraintSum(const char *name, const char *title, const RooArgSet& constraintSet, const RooArgSet& paramSet) ; 00031 virtual ~RooConstraintSum() ; 00032 00033 RooConstraintSum(const RooConstraintSum& other, const char* name = 0); 00034 virtual TObject* clone(const char* newname) const { return new RooConstraintSum(*this, newname); } 00035 00036 protected: 00037 00038 RooListProxy _set1 ; // Set of constraint terms 00039 RooSetProxy _paramSet ; // Set of parameters to which constraints apply 00040 TIterator* _setIter1 ; //! do not persist 00041 00042 Double_t evaluate() const; 00043 00044 ClassDef(RooConstraintSum,2) // sum of -log of set of RooAbsPdf representing parameter constraints 00045 }; 00046 00047 #endif