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

FastShower::S0HadLateHcalBar1 Class Reference

#include <S0HadLateHcalBar1.h>

Inheritance diagram for FastShower::S0HadLateHcalBar1:

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

Collaboration graph
[legend]
List of all members.

Public Methods

 S0HadLateHcalBar1 (IUpdatingGaussian *, IProcessedDist *, IInTail *)
 S0HadLateHcalBar1 (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::S0HadLateHcalBar1::S0HadLateHcalBar1 IUpdatingGaussian  ,
IProcessedDist  ,
IInTail  
 

Definition at line 26 of file S0HadLateHcalBar1.cxx.

Referenced by clone().

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

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

Definition at line 32 of file S0HadLateHcalBar1.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           = c->findIUG( text()+"Peak" ) ;
00036     m_tail           = c->makeProcessedFlat( text() );
00037     m_inTail         = c->makeIInTail( text() );
00038     cout<<text()<<" finishing construction"<<endl;
00039   }

Member Function Documentation

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

ISampler Interface.

Implements FastShower::ISampler.

Definition at line 41 of file S0HadLateHcalBar1.cxx.

References S0HadLateHcalBar1().

00041 {return new S0HadLateHcalBar1(*this);}

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

sample and fill CoreSamples.

Implements FastShower::ISampler.

Definition at line 43 of file S0HadLateHcalBar1.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::S0HadLateHcalBar1::lastValue const CoreSamples   const [virtual]
 

read back last deposit - used by monitoring code.

Implements FastShower::ISampler.

Definition at line 78 of file S0HadLateHcalBar1.cxx.

References FastShower::CoreSamples::give().

00078                                                                  {
00079     return cs.give(this);
00080   }

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

Reimplemented from FastShower::DebugBase.

Definition at line 82 of file S0HadLateHcalBar1.cxx.

References m_inTail, m_peak, and m_tail.

00082                                                        {
00083     v.push_back(m_peak);
00084     v.push_back(m_tail);
00085     v.push_back(m_inTail);
00086   }

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

Definition at line 52 of file S0HadLateHcalBar1.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     lLimit = max(lLimit,0.0);
00063     lLimit = min(lLimit,1.0);
00064     //
00065     //IMPROVEME - the logic of setting limits to be made clearer
00066     if(uLimit<0.){ uLimit=peakMean;}
00067     uLimit = min(uLimit,1.0);
00068 
00069     // Sample from a Linear dist.
00070     LinearProcessor lp((uLimit-lLimit), lLimit);
00071     return m_tail->sample(&lp);
00072   }

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

Definition at line 74 of file S0HadLateHcalBar1.cxx.

00074                                                            {
00075     return m_peak->sample(0.0, 100, 1.0, s_nSigma1, pa);
00076   }

Member Data Documentation

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

Definition at line 77 of file S0HadLateHcalBar1.h.

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

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

Definition at line 78 of file S0HadLateHcalBar1.h.

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

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

Definition at line 79 of file S0HadLateHcalBar1.h.

Referenced by components(), and S0HadLateHcalBar1().

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

Referenced by evalTail().

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

Referenced by evalTail().


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