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

FastShower::S0EmEcalBar1 Class Reference

#include <S0EMEcalBar1.h>

Inheritance diagram for FastShower::S0EmEcalBar1:

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

Collaboration graph
[legend]
List of all members.

Public Methods

 S0EmEcalBar1 ()
 S0EmEcalBar1 (const S0EmEcalBar1 &c)
 ~S0EmEcalBar1 ()
S0EmEcalBar1 & operator= (const S0EmEcalBar1 &)
virtual ISamplerclone () const
 ISampler interface.

virtual void sample (const ParticleParameters &, CoreSamples &) const
 S0EmEcalBar1 (IUpdatingGaussian *, IProcessedDist *, IInTail *, IFn *)
 S0EmEcalBar1 (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< GaussUpdating > m_peak
SP< ProcessedFlatm_flat
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::S0EmEcalBar1::S0EmEcalBar1   [inline]
 

Definition at line 44 of file S0EMEcalBar1.h.

Referenced by clone().

00044 {}

FastShower::S0EmEcalBar1::S0EmEcalBar1 const S0EmEcalBar1 &    c
 

FastShower::S0EmEcalBar1::~S0EmEcalBar1   [inline]
 

Definition at line 46 of file S0EMEcalBar1.h.

00046 {}

FastShower::S0EmEcalBar1::S0EmEcalBar1 IUpdatingGaussian  ,
IProcessedDist  ,
IInTail  ,
IFn  
 

Definition at line 27 of file S0EmEcalBar1.cxx.

00030                                      :
00031     ISampler(), ISlice0(), DebugBase("S0EmEcalBar1"), 
00032     m_peak(g), m_tail(tail), m_inTail(it), m_tailLowerBound(ts){}

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

Definition at line 34 of file S0EmEcalBar1.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().

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

Member Function Documentation

S0EmEcalBar1& FastShower::S0EmEcalBar1::operator= const S0EmEcalBar1 &   
 

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

ISampler interface.

Implements FastShower::ISampler.

Definition at line 45 of file S0EmEcalBar1.cxx.

References S0EmEcalBar1().

00045 {return new S0EmEcalBar1(*this);}

virtual void FastShower::S0EmEcalBar1::sample const ParticleParameters  ,
CoreSamples  
const [virtual]
 

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

ISampler Interface.

Implements FastShower::ISampler.

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

sample and fill CoreSamples.

Implements FastShower::ISampler.

Definition at line 47 of file S0EmEcalBar1.cxx.

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

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

read back last deposit - used by monitoring code.

Implements FastShower::ISampler.

Definition at line 86 of file S0EmEcalBar1.cxx.

References FastShower::CoreSamples::give().

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

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

Reimplemented from FastShower::DebugBase.

Definition at line 90 of file S0EmEcalBar1.cxx.

References m_inTail, m_peak, m_tail, and m_tailLowerBound.

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

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

Definition at line 56 of file S0EmEcalBar1.cxx.

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

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

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

Definition at line 82 of file S0EmEcalBar1.cxx.

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

Member Data Documentation

SP<GaussUpdating> FastShower::S0EmEcalBar1::m_peak [private]
 

Definition at line 52 of file S0EMEcalBar1.h.

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

SP<ProcessedFlat> FastShower::S0EmEcalBar1::m_flat [private]
 

Definition at line 53 of file S0EMEcalBar1.h.

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

Definition at line 79 of file S0EmEcalBar1.h.

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

Definition at line 80 of file S0EmEcalBar1.h.

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

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

Definition at line 81 of file S0EmEcalBar1.h.

Referenced by components(), and S0EmEcalBar1().

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

Definition at line 82 of file S0EmEcalBar1.h.

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

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

Referenced by evalTail().

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

Referenced by evalTail().


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