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

FastShower::S0HadLateHcalEc1 Class Reference

#include <S0HadLateHcalEc1.h>

Inheritance diagram for FastShower::S0HadLateHcalEc1:

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

Collaboration graph
[legend]
List of all members.

Public Methods

 S0HadLateHcalEc1 (IUpdatingGaussian *, IProcessedDist *, IInTail *)
 S0HadLateHcalEc1 (const IConfigurer *, const std::string &)
virtual ISamplerclone () const
 ISampler Interface.

virtual void sample (const PolyArgs &, CoreSamples &) const
 sample and fill CoreSamples.

virtual double lastValue (const CoreSamples &) const
 read back last deposit - used by monitoring code.

virtual void components (IDebug::Cpts &) const

Private Methods

double evalTail (const PolyArgs &) const
double evalPeak (const PolyArgs &) const

Private Attributes

SP< IUpdatingGaussianm_peak
SP< IProcessedDistm_tail
SP< IInTailm_inTail

Static Private Attributes

const double s_nSigma1
const double s_nSigma2

Constructor & Destructor Documentation

FastShower::S0HadLateHcalEc1::S0HadLateHcalEc1 IUpdatingGaussian  ,
IProcessedDist  ,
IInTail  
 

Definition at line 26 of file S0HadLateHcalEc1.cxx.

Referenced by clone().

00028                                                  :
00029     ISampler(), ISlice0(), DebugBase("S0HadLateHcalEc1"), 
00030     m_peak(g), m_tail(tail), m_inTail(it){}

FastShower::S0HadLateHcalEc1::S0HadLateHcalEc1 const IConfigurer  ,
const std::string &   
 

Definition at line 32 of file S0HadLateHcalEc1.cxx.

References FastShower::IConfigurer::findIUG(), m_inTail, m_peak, m_tail, FastShower::IConfigurer::makeIInTail(), FastShower::IConfigurer::makeProcessedFlat(), and FastShower::DebugBase::text().

00033                                                         :
00034     DebugBase(s), m_peak(0), m_tail(0), m_inTail(0){
00035     m_peak           = configurer->findIUG( text()+"Peak" ) ;
00036     m_tail           = configurer->makeProcessedFlat( text() );
00037     m_inTail         = configurer->makeIInTail( text() );
00038     cout<<text()<<" finishing construction"<<endl;
00039   }

Member Function Documentation

ISampler * FastShower::S0HadLateHcalEc1::clone   const [virtual]
 

ISampler Interface.

Implements FastShower::ISampler.

Definition at line 41 of file S0HadLateHcalEc1.cxx.

References S0HadLateHcalEc1().

00041 {return new S0HadLateHcalEc1(*this);}

void FastShower::S0HadLateHcalEc1::sample const PolyArgs  ,
CoreSamples  
const [virtual]
 

sample and fill CoreSamples.

Implements FastShower::ISampler.

Definition at line 43 of file S0HadLateHcalEc1.cxx.

00043                                                                        {
00044 
00045     if( m_inTail->operator()(pa) ){
00046       cs.fill(this, evalTail(pa) );
00047     }else{
00048       cs.fill(this, evalPeak(pa) );
00049     }
00050   }

double FastShower::S0HadLateHcalEc1::lastValue const CoreSamples   const [virtual]
 

read back last deposit - used by monitoring code.

Implements FastShower::ISampler.

Definition at line 76 of file S0HadLateHcalEc1.cxx.

References FastShower::CoreSamples::give().

00076                                                                 {
00077     return cs.give(this);
00078   }

void FastShower::S0HadLateHcalEc1::components IDebug::Cpts   const [virtual]
 

Reimplemented from FastShower::DebugBase.

Definition at line 80 of file S0HadLateHcalEc1.cxx.

References m_inTail, m_peak, and m_tail.

00080                                                       {
00081     v.push_back(m_peak);
00082     v.push_back(m_tail);
00083     v.push_back(m_inTail);
00084   }

double FastShower::S0HadLateHcalEc1::evalTail const PolyArgs   const [private]
 

Definition at line 52 of file S0HadLateHcalEc1.cxx.

References m_peak, m_tail, s_nSigma1, and s_nSigma2.

00052                                                             {
00053     
00054     pair<double, double>  peakParams = m_peak->parameters(pa);
00055     double peakMean  = peakParams.first;
00056     double peakSigma = peakParams.second;
00057     
00058     //calculate ther upper and lower limits of the tail
00059     double uLimit = peakMean - s_nSigma1*peakSigma;
00060     //
00061     double lLimit = peakMean - s_nSigma2*peakSigma;
00062     if(lLimit<0.){lLimit=0.;}
00063     //
00064     //IMPROVEME - the logic of setting limits to be made clearer
00065     if(uLimit<0.){ uLimit=peakMean;}
00066 
00067     // Sample from a Traingle dist.
00068     LinearProcessor lp((uLimit-lLimit), lLimit);
00069     return m_tail->sample(&lp);
00070   }

double FastShower::S0HadLateHcalEc1::evalPeak const PolyArgs   const [private]
 

Definition at line 72 of file S0HadLateHcalEc1.cxx.

00072                                                           {
00073     return m_peak->sample(0.0, s_nSigma1, 1.0, s_nSigma1, pa);
00074   }

Member Data Documentation

SP<IUpdatingGaussian> FastShower::S0HadLateHcalEc1::m_peak [private]
 

Definition at line 82 of file S0HadLateHcalEc1.h.

Referenced by components(), evalTail(), and S0HadLateHcalEc1().

SP<IProcessedDist> FastShower::S0HadLateHcalEc1::m_tail [private]
 

Definition at line 83 of file S0HadLateHcalEc1.h.

Referenced by components(), evalTail(), and S0HadLateHcalEc1().

SP<IInTail> FastShower::S0HadLateHcalEc1::m_inTail [private]
 

Definition at line 84 of file S0HadLateHcalEc1.h.

Referenced by components(), and S0HadLateHcalEc1().

const double FastShower::S0HadLateHcalEc1::s_nSigma1 [static, private]
 

Referenced by evalTail().

const double FastShower::S0HadLateHcalEc1::s_nSigma2 [static, private]
 

Referenced by evalTail().


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