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

FastShower::UpdatingGaussian Class Reference

#include <UpdatingGaussian.h>

Inheritance diagram for FastShower::UpdatingGaussian:

Inheritance graph
[legend]
Collaboration diagram for FastShower::UpdatingGaussian:

Collaboration graph
[legend]
List of all members.

Public Methods

 UpdatingGaussian (IFn *meanFunction, IFn *sigmaFunction, IProcessedDist *norm)
 UpdatingGaussian (const std::string &samplerName, const IConfigurer &)
 ~UpdatingGaussian ()
virtual IUpdatingGaussianclone () const
virtual double sample (double phyiscalLow, double nSigmaLow, double physicalUp, double nSigmaUp, const PolyArgs &) const
 sample a processed normal dist.

virtual std::pair< double,
double > 
parameters (const PolyArgs &) const
 Tail distributions (eg) need to get peak mean, sigma (eg) to establish their own range.

virtual void components (std::vector< const IDebug * > &) const

Private Attributes

SP< IFnm_mean
 Two functions to supply the DistProcessors with parameters.

SP< IFnm_sigma
SP< IProcessedDistm_normal

Constructor & Destructor Documentation

FastShower::UpdatingGaussian::UpdatingGaussian IFn   meanFunction,
IFn   sigmaFunction,
IProcessedDist   norm
 

Definition at line 5 of file UpdatingGaussian.cxx.

Referenced by clone().

00007                                                           :
00008     m_mean(mean),m_sigma(sigma), m_normal(norm){}
  //

FastShower::UpdatingGaussian::UpdatingGaussian const std::string &    samplerName,
const IConfigurer  
 

Definition at line 10 of file UpdatingGaussian.cxx.

References FastShower::IConfigurer::findFn(), m_mean, m_normal, m_sigma, and FastShower::IConfigurer::makeProcessedNormal().

00011                                                           {
00012     m_mean   = c.findFn(sampler+"PeakMean");
00013     m_sigma  = c.findFn(sampler+"PeakSigma");
00014     m_normal = c.makeProcessedNormal(sampler);
00015   }

FastShower::UpdatingGaussian::~UpdatingGaussian   [inline]
 

Definition at line 54 of file UpdatingGaussian.h.

00054 {};

Member Function Documentation

IUpdatingGaussian * FastShower::UpdatingGaussian::clone   const [virtual]
 

Implements FastShower::IUpdatingGaussian.

Definition at line 50 of file UpdatingGaussian.cxx.

References UpdatingGaussian().

00050                                                   {
00051     IUpdatingGaussian* nug= new UpdatingGaussian(*this);
00052     return nug;
00053   }

double FastShower::UpdatingGaussian::sample double    phyiscalLow,
double    nSigmaLow,
double    physicalUp,
double    nSigmaUp,
const PolyArgs  
const [virtual]
 

sample a processed normal dist.

The procesed norm will be truncated at -nSigmaLow +nSigmaUp, unless physical limits are exceeded.

Implements FastShower::IUpdatingGaussian.

Definition at line 16 of file UpdatingGaussian.cxx.

References m_mean, m_normal, and m_sigma.

00021                                          {
00022     
00023     double mean  = m_mean->value(pa);
00024     double sigma = m_sigma->value(pa);
00025     
00026     double lowLim = mean-(nSigmaLow*sigma);
00027     if(lowLim<physicalLow){ lowLim=physicalLow;}
00028     
00029     double upLim = mean+(nSigmaUp*sigma);
00030     if(upLim>physicalUp){ upLim=physicalUp;}
00031     
00032     LinearProcessor lp(sigma, mean);
00033     cout<<"UG limits: "<<lowLim<<" "<<upLim<<endl;
00034     return m_normal->sample(lowLim, upLim, &lp);
00035   }

std::pair< double, double > FastShower::UpdatingGaussian::parameters const PolyArgs   const [virtual]
 

Tail distributions (eg) need to get peak mean, sigma (eg) to establish their own range.

Implements FastShower::IUpdatingGaussian.

Definition at line 38 of file UpdatingGaussian.cxx.

References m_mean, and m_sigma.

Referenced by FastShower::UpdatingGaussianTester::test().

00038                                                         {
00039     std::pair<double, double> params(m_mean->value(pa), m_sigma->value(pa));
00040     return params;
00041   }

void FastShower::UpdatingGaussian::components std::vector< const IDebug * > &    const [virtual]
 

Definition at line 44 of file UpdatingGaussian.cxx.

References m_mean, m_normal, and m_sigma.

00044                                                                {
00045     v.clear();
00046     v.push_back(m_mean);
00047     v.push_back(m_sigma);
00048     v.push_back(m_normal);    
00049     }

Member Data Documentation

SP<IFn> FastShower::UpdatingGaussian::m_mean [private]
 

Two functions to supply the DistProcessors with parameters.

Definition at line 73 of file UpdatingGaussian.h.

Referenced by components(), parameters(), sample(), and UpdatingGaussian().

SP<IFn> FastShower::UpdatingGaussian::m_sigma [private]
 

Definition at line 74 of file UpdatingGaussian.h.

Referenced by components(), parameters(), sample(), and UpdatingGaussian().

SP<IProcessedDist> FastShower::UpdatingGaussian::m_normal [private]
 

Definition at line 75 of file UpdatingGaussian.h.

Referenced by components(), sample(), and UpdatingGaussian().


The documentation for this class was generated from the following files:
Generated on Tue Mar 18 11:58:38 2003 for FastShowerUtils by doxygen1.3-rc1