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

FastShower::C0HadEarlyHcalEc3 Class Reference

#include <C0HadEarlyHcalEc3.h>

Inheritance diagram for FastShower::C0HadEarlyHcalEc3:

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

Collaboration graph
[legend]
List of all members.

Public Methods

 C0HadEarlyHcalEc3 (IUpdatingGaussian *, IProcessedDist *, IInTail *)
 C0HadEarlyHcalEc3 (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_nSigma

Constructor & Destructor Documentation

FastShower::C0HadEarlyHcalEc3::C0HadEarlyHcalEc3 IUpdatingGaussian  ,
IProcessedDist  ,
IInTail  
 

Definition at line 25 of file C0HadEarlyHcalEc3.cxx.

Referenced by clone().

00027                                                    :
00028     ISampler(), ICell0(), DebugBase("C0HadEarlyHcalEc3"), 
00029     m_peak(g), m_tail(tail), m_inTail(it){}

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

Definition at line 31 of file C0HadEarlyHcalEc3.cxx.

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

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

Member Function Documentation

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

ISampler Interface.

Implements FastShower::ISampler.

Definition at line 40 of file C0HadEarlyHcalEc3.cxx.

References C0HadEarlyHcalEc3().

00040 {return new C0HadEarlyHcalEc3(*this);}

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

sample and fill CoreSamples.

Implements FastShower::ISampler.

Definition at line 42 of file C0HadEarlyHcalEc3.cxx.

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

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

read back last deposit - used by monitoring code.

Implements FastShower::ISampler.

Definition at line 75 of file C0HadEarlyHcalEc3.cxx.

References FastShower::CoreSamples::give().

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

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

Reimplemented from FastShower::DebugBase.

Definition at line 79 of file C0HadEarlyHcalEc3.cxx.

References m_inTail, m_peak, and m_tail.

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

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

Definition at line 51 of file C0HadEarlyHcalEc3.cxx.

References m_peak, m_tail, and s_nSigma.

00051                                                              {
00052     
00053     pair<double, double>  peakParams = m_peak->parameters(pa);
00054     double peakMean  = peakParams.first;
00055     double peakSigma = peakParams.second;
00056 
00057     //calculate ther upper and/or lower limit of the tail
00058     double uLimit = peakMean - s_nSigma*peakSigma;
00059     uLimit = max(uLimit, 0.1);
00060     uLimit = min(uLimit, 1.0);
00061     //
00062     double lLimit = 0.0;
00063 
00064     // Sample
00065     if (!(uLimit>0.0)) uLimit = 1.0;
00066 
00067     LinearProcessor lp((uLimit-lLimit), lLimit);
00068     return m_tail->sample(&lp);
00069   }

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

Definition at line 71 of file C0HadEarlyHcalEc3.cxx.

00071                                                            {
00072     return m_peak->sample(0.0, s_nSigma, 1.0, 100, pa);
00073   }

Member Data Documentation

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

Definition at line 80 of file C0HadEarlyHcalEc3.h.

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

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

Definition at line 81 of file C0HadEarlyHcalEc3.h.

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

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

Definition at line 82 of file C0HadEarlyHcalEc3.h.

Referenced by C0HadEarlyHcalEc3(), and components().

const double FastShower::C0HadEarlyHcalEc3::s_nSigma [static, private]
 

Referenced by evalTail().


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