/********************************************************************** * * * Copyright (c) 2003 INFN - Sezione di Napoli * * * * For more information (including a list of authors) see * * the README file * * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU General Public License * * as published by the Free Software Foundation; either version 2 * * of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this library (see file COPYING); if not, write to the * * Free Software Foundation, Inc., 59 Temple Place, Suite 330, * * Boston, MA 02111-1307 USA, or contact the authors. * * * **********************************************************************/ #include "StatTools/Pdf/Ext/Defaults.h" #include "Ext/Root/RootHistoPdfTester.h" #include "StatTools/Pdf/Pdf.h" #include "StatTools/Pdf/RandomGeneratorSample.h" #include "StatTools/Funct/Function.h" using namespace std; using namespace Funct; DEFINE_PDFNONORMALIZATION( MyPdf ) DEFINE_PDFNONPARAMETRIC( MyPdf1 ) DEFINE_PDFPARAMETRIC( MyPdf2 ) RANDOM_GENERATOR_SAMPLE( MyPdf< X >, 1024, 0, 15 ) int main() { X x; MyPdf< X > f( sqr( sin( x ) + cos( x ) ) ); Pdf::RandomGenerator< MyPdf< X > > rnd( f ); Pdf::RootHistoPdfTester tester( "testpdffun.root" ); tester.test( rnd, "fun", "sin( x ) + cos( x )", 1000, 0, 15, 100000 ); return 0; }