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

FastShower::SNEmEcalBar1 Class Reference

#include <SNEmEcalBar1.h>

Inheritance diagram for FastShower::SNEmEcalBar1:

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

Collaboration graph
[legend]
List of all members.

Public Methods

 SNEmEcalBar1 (IUpdatingGaussian *, IProcessedDist *, IInTail *, IFn *)
 SNEmEcalBar1 (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 &cs) 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

Constructor & Destructor Documentation

FastShower::SNEmEcalBar1::SNEmEcalBar1 IUpdatingGaussian  ,
IProcessedDist  ,
IInTail  ,
IFn  
 

Definition at line 24 of file SNEmEcalBar1.cxx.

Referenced by clone().

00027                                       :
00028     ISampler(), ICellSN(), DebugBase("SNEmEcalBar1"), 
00029     m_peak(g), m_tail(f), m_inTail(it), m_tailLowerBound(tlb){}

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

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

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

Member Function Documentation

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

ISampler interface.

Implements FastShower::ISampler.

Definition at line 42 of file SNEmEcalBar1.cxx.

References SNEmEcalBar1().

00042 {return new SNEmEcalBar1(*this);}

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

sample and fill CoreSamples.

Implements FastShower::ISampler.

Definition at line 45 of file SNEmEcalBar1.cxx.

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

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

double FastShower::SNEmEcalBar1::lastValue const CoreSamples   cs const [virtual]
 

read back last deposit - used by monitoring code.

Implements FastShower::ISampler.

Definition at line 81 of file SNEmEcalBar1.cxx.

References FastShower::CoreSamples::give().

00081                                                             {
00082     return cs.give(this);
00083   }

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

Reimplemented from FastShower::DebugBase.

Definition at line 85 of file SNEmEcalBar1.cxx.

References m_inTail, m_peak, m_tail, and m_tailLowerBound.

00085                                                   {
00086     v.push_back(m_peak);
00087     v.push_back(m_tail);
00088     v.push_back(m_inTail);
00089     v.push_back(m_tailLowerBound);
00090   }

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

Definition at line 54 of file SNEmEcalBar1.cxx.

References m_peak, m_tail, m_tailLowerBound, and s_nSigma.

Referenced by sample().

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

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

Definition at line 74 of file SNEmEcalBar1.cxx.

References m_peak, and s_nSigma.

Referenced by sample().

00074                                                        {
00075     pair<double, double>  peakParams = m_peak->parameters(pa);
00076     double peakMean  = peakParams.first;
00077     if (peakMean<=0.0) return 0.0;
00078     return m_peak->sample(0.0, s_nSigma, peakMean, s_nSigma, pa);
00079   }

Member Data Documentation

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

Definition at line 76 of file SNEmEcalBar1.h.

Referenced by components(), evalPeak(), evalTail(), and SNEmEcalBar1().

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

Definition at line 77 of file SNEmEcalBar1.h.

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

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

Definition at line 78 of file SNEmEcalBar1.h.

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

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

Definition at line 79 of file SNEmEcalBar1.h.

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

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

Referenced by evalPeak(), and 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