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

FastShower::S0EmEcalEc1 Class Reference

#include <S0EmEcalEc1.h>

Inheritance diagram for FastShower::S0EmEcalEc1:

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

Collaboration graph
[legend]
List of all members.

Public Methods

 S0EmEcalEc1 (IUpdatingGaussian *, IProcessedDist *, IInTail *, IFn *)
 S0EmEcalEc1 (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
SP< IFnm_tailLowerBound

Static Private Attributes

const double s_nSigma
const double s_tailFluctScale

Constructor & Destructor Documentation

FastShower::S0EmEcalEc1::S0EmEcalEc1 IUpdatingGaussian  ,
IProcessedDist  ,
IInTail  ,
IFn  
 

Definition at line 26 of file S0EmEcalEc1.cxx.

Referenced by clone().

00029                                     :
00030     ISampler(), ISlice0(), DebugBase("S0EmEcalEc1"), 
00031     m_peak(g), m_tail(t), m_inTail(it), m_tailLowerBound(tlb){}

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

Definition at line 33 of file S0EmEcalEc1.cxx.

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

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

Member Function Documentation

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

ISampler Interface.

Implements FastShower::ISampler.

Definition at line 43 of file S0EmEcalEc1.cxx.

References S0EmEcalEc1().

00043 {return new S0EmEcalEc1(*this);}

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

sample and fill CoreSamples.

Implements FastShower::ISampler.

Definition at line 46 of file S0EmEcalEc1.cxx.

References evalPeak(), evalTail(), FastShower::CoreSamples::fill(), and m_inTail.

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

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

read back last deposit - used by monitoring code.

Implements FastShower::ISampler.

Definition at line 85 of file S0EmEcalEc1.cxx.

References FastShower::CoreSamples::give().

00085                                                            {
00086     return cs.give(this);
00087   }

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

Reimplemented from FastShower::DebugBase.

Definition at line 88 of file S0EmEcalEc1.cxx.

References m_inTail, m_peak, m_tail, and m_tailLowerBound.

00088                                                  {
00089     v.push_back(m_peak);
00090     v.push_back(m_tail);
00091     v.push_back(m_inTail);
00092     v.push_back(m_tailLowerBound);
00093   }

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

Definition at line 55 of file S0EmEcalEc1.cxx.

References m_peak, m_tail, m_tailLowerBound, s_nSigma, s_tailFluctScale, and FastShower::ProcessedNormal::sample().

Referenced by sample().

00055                                                        {
00056 
00057     pair<double, double>  peakParams = m_peak->parameters(pa);
00058     double peakMean  = peakParams.first;
00059     double peakSigma = peakParams.second;
00060 
00061     //calculate ther upaer and lower limits of the triangular tail
00062     double uLimit = peakMean - s_nSigma*peakSigma;
00063     //
00064     double lLimit = uLimit - ( m_tailLowerBound->value(pa) );
00065     //Add a little fluctuation in triangle base length
00066     ProcessedNormal temp;
00067     lLimit -= s_tailFluctScale*( abs( temp.sample() ) );
00068     if(lLimit<0.){lLimit=0.;}
00069     //
00070     //FIXME - the logic of setting limits to be made clearer
00071     if(uLimit<0.){ uLimit=peakMean;}
00072 
00073     // Sample from a Triangle dist.
00074     TriangleProcessor::EndPoint1  endPoint1 = lLimit;
00075     TriangleProcessor::EndPoint2  endPoint2 = uLimit;
00076    
00077     TriangleProcessor tp(endPoint1,endPoint2);
00078     return m_tail->sample(&tp);
00079   }

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

Definition at line 81 of file S0EmEcalEc1.cxx.

Referenced by sample().

00081                                                      {
00082     return m_peak->sample(0.0, s_nSigma, 1.0, s_nSigma, pa);
00083   }

Member Data Documentation

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

Definition at line 73 of file S0EmEcalEc1.h.

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

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

Definition at line 74 of file S0EmEcalEc1.h.

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

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

Definition at line 75 of file S0EmEcalEc1.h.

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

SP<IFn> FastShower::S0EmEcalEc1::m_tailLowerBound [private]
 

Definition at line 76 of file S0EmEcalEc1.h.

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

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

Referenced by evalTail().

const double FastShower::S0EmEcalEc1::s_tailFluctScale [static, private]
 

Referenced by evalTail().


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