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

UpdatingGaussianBase.cxx

Go to the documentation of this file.
00001 #include "FastShowerUtils/UpdatingGaussianBase.h"
00002 #include "FastShowerUtils/IConfigurer.h"
00003 #include "FastShowerUtils/ProcessedNormal.h"
00004 namespace FastShower{
00005   UpdatingGaussianBase::UpdatingGaussianBase(const std::string& sampler, 
00006                                      const IConfigurer& c){
00007     m_mean   = c.findFn(sampler+"PeakMean");
00008     m_sigma  = c.findFn(sampler+"PeakSigma");
00009     m_normal = c.makeProcessedNormal(sampler);
00010   }
00011   double UpdatingGaussianBase::sample(double physicalLow,
00012                                   double nSigmaLow,
00013                                   double physicalUp,
00014                                   double nSigmaUp,
00015                                   const PolyArgs& pa
00016                                   ) const {
00017     std::pair<double, double> limits = 
00018       this->getLims(physicalLow, nSigmaLow, physicalUp, nSigmaUp, pa);
00019     
00020     IDistProcessor* dp = makeIDistProcessor(pa);
00021     
00022     double sample = m_normal->sample(limits.first, limits.second, dp);
00023     delete dp;
00024     return sample;
00025   }
00026   //
00027   std::pair<double, double> 
00028   UpdatingGaussianBase::parameters( const PolyArgs& pa ) const{
00029     std::pair<double, double> params(m_mean->value(pa), m_sigma->value(pa));
00030     return params;
00031   }
00032   //
00033   void
00034   UpdatingGaussianBase::components(std::vector<const IDebug*>& v) const{
00035     v.clear();
00036     v.push_back(m_mean);
00037     v.push_back(m_sigma);
00038     v.push_back(m_normal);    
00039     }
00040 }//namespace
00041 
00042 
00043 
00044 
00045 

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