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

FastShower::SNEmEcalEc2 Class Reference

#include <SNEmEcalEc2.h>

Inheritance diagram for FastShower::SNEmEcalEc2:

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

Collaboration graph
[legend]
List of all members.

Public Methods

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

Definition at line 25 of file SNEmEcalEc2.cxx.

Referenced by clone().

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

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

Definition at line 31 of file SNEmEcalEc2.cxx.

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

00032                                             :
00033     DebugBase("SN2"), 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::SNEmEcalEc2::clone   const [virtual]
 

ISampler interface.

Implements FastShower::ISampler.

Definition at line 40 of file SNEmEcalEc2.cxx.

References SNEmEcalEc2().

00040 {return new SNEmEcalEc2(*this);}

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

sample and fill CoreSamples.

Implements FastShower::ISampler.

Definition at line 43 of file SNEmEcalEc2.cxx.

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

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::SNEmEcalEc2::lastValue const CoreSamples   const [virtual]
 

read back last deposit - used by monitoring code.

Implements FastShower::ISampler.

Definition at line 88 of file SNEmEcalEc2.cxx.

References FastShower::CoreSamples::give().

00088                                                            {
00089     return cs.give(this);
00090   }

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

Reimplemented from FastShower::DebugBase.

Definition at line 92 of file SNEmEcalEc2.cxx.

References m_inTail, m_peak, and m_tail.

00092                                                  {
00093     v.push_back(m_peak);
00094     v.push_back(m_tail);
00095     v.push_back(m_inTail);
00096   }

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

Definition at line 52 of file SNEmEcalEc2.cxx.

References FastShower::ParticleParameters::energy(), m_peak, m_tail, FastShower::PolyArgs::pp(), and s_nSigma.

Referenced by sample().

00052                                                       {
00053 
00054     pair<double, double>  peakParams = m_peak->parameters(pa);
00055     double peakMean  = peakParams.first;
00056     double peakSigma = peakParams.second;
00057       
00058     //calculate the upper and lower limits of the tails
00059     double uLimit = peakMean - s_nSigma*peakSigma;
00060     //
00061     double energy = pa.pp()->energy();
00062 
00063     double lLimit = 0.0;
00064     if (energy<30.0){
00065       lLimit = 0.10*peakMean;
00066     }else if (energy<70.0){
00067       lLimit = 0.70*peakMean;
00068     }else{
00069       lLimit = 0.0;
00070     }
00071     //
00072     if(lLimit<0.){lLimit=0.;}
00073     //IMPROVEME - the logic of setting limits to be made clearer
00074     if(uLimit<0.){ uLimit=peakMean;}
00075     if(uLimit<=lLimit){ uLimit=peakMean;}
00076     //
00077     LinearProcessor lp( (uLimit-lLimit), lLimit );
00078     return m_tail->sample(&lp);
00079   }

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

Definition at line 81 of file SNEmEcalEc2.cxx.

References m_peak, and s_nSigma.

Referenced by sample().

00081                                                       {
00082     pair<double, double>  peakParams = m_peak->parameters(pa);
00083     double peakMean  = peakParams.first;
00084     if (peakMean<=0.0) return 0.0;
00085     return m_peak->sample(0.0, s_nSigma, peakMean, s_nSigma, pa);
00086   }

Member Data Documentation

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

Definition at line 71 of file SNEmEcalEc2.h.

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

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

Definition at line 72 of file SNEmEcalEc2.h.

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

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

Definition at line 73 of file SNEmEcalEc2.h.

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

const double FastShower::SNEmEcalEc2::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:01 2003 for FastShowerUtils by doxygen1.3-rc1