Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

UpdatingGaussianTester.cxx

Go to the documentation of this file.
00001 // ================================================
00002 // Test program for UpdatingGaussian
00003 // ================================================
00004 
00005 #include "FastShowerUtils/UpdatingGaussianTester.h"
00006 #include "FastShowerUtils/UpdatingGaussian.h"
00007 #include "FastShowerUtils/TestStat.h"
00008 
00009 #include "FastShowerUtils/PolyArgs.h"
00010 #include "FastShowerUtils/ParticleParameters.h"
00011 #include "FastShowerUtils/CoreSamples.h"
00012 #include "FastShowerUtils/DummyFn.h"
00013 #include "FastShowerUtils/IProcessedDist.h"
00014 #include "FastShowerUtils/ProcessedNormal.h"
00015 
00016 namespace FastShower{
00017   TestStat UpdatingGaussianTester::test(){
00018     
00019     //create an updating gaussian with mean 0, sigma 1
00020     Dummy0* d0 = new Dummy0();    
00021     Dummy1* d1 = new Dummy1();
00022     IProcessedDist* normal = new ProcessedNormal();
00023     UpdatingGaussian gu(d0, d1, normal);
00024     
00025     //dummy particle parameters
00026 
00027     ParticleParameters pp;
00028     CoreSamples cs;
00029 
00030     PolyArgs pa(pp, cs); 
00031     //check the correct mean and sigma are returned
00032     std::pair<double, double> params = gu.parameters(pa);
00033     (params.first == 0. && params.second == 1.) ? m_ts.incPass():m_ts.incFail();
00034     return m_ts;
00035   }
00036 
00037   void UpdatingGaussianTester::results() const{
00038     cout<<"UpdatingGaussianTester: "<<m_ts;
00039     if(!m_ts) cout<<" Failures! ";
00040     cout<<endl;
00041   }
00042 }
00043 
00044 
00045 
00046 
00047 
00048 

Generated on Tue Mar 18 11:50:07 2003 for FastShowerUtils by doxygen1.3-rc1