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

FastShower::SNEmEcalEc1 Class Reference

#include <SNEmEcalEc1.h>

Inheritance diagram for FastShower::SNEmEcalEc1:

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

Collaboration graph
[legend]
List of all members.

Public Methods

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

Definition at line 27 of file SNEmEcalEc1.cxx.

Referenced by clone().

00029                                        :
00030     ISampler(), ICellSN(), DebugBase("SNEmEcalEc1"), 
00031     m_peak(g), m_tail(f), m_inTail(it){}

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

Definition at line 33 of file SNEmEcalEc1.cxx.

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

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

Member Function Documentation

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

ISampler interface.

Implements FastShower::ISampler.

Definition at line 42 of file SNEmEcalEc1.cxx.

References SNEmEcalEc1().

00042 {return new SNEmEcalEc1(*this);}

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

sample and fill CoreSamples.

Implements FastShower::ISampler.

Definition at line 45 of file SNEmEcalEc1.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::SNEmEcalEc1::lastValue const CoreSamples   const [virtual]
 

read back last deposit - used by monitoring code.

Implements FastShower::ISampler.

Definition at line 111 of file SNEmEcalEc1.cxx.

References FastShower::CoreSamples::give().

00111                                                            {
00112     return cs.give(this);
00113   }

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

Reimplemented from FastShower::DebugBase.

Definition at line 115 of file SNEmEcalEc1.cxx.

References m_inTail, m_peak, and m_tail.

00115                                                  {
00116     v.push_back(m_peak);
00117     v.push_back(m_tail);
00118     v.push_back(m_inTail);
00119   }

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

Definition at line 54 of file SNEmEcalEc1.cxx.

References FastShower::CoreSamples::cell0(), FastShower::PolyArgs::cs(), FastShower::ParticleParameters::energy(), FastShower::SplitDecision::lower(), m_peak, m_tail, FastShower::PolyArgs::pp(), 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 tails
00061     double uLimit = peakMean - s_nSigma*peakSigma;
00062     double lLimit = 0.0;
00063 
00064     double energy = pa.pp()->energy();
00065     double cell0  = pa.cs()->cell0();
00066 
00067     //find a better name for "limit" (see TailFracSNEmEcalEc1.cxx)
00068     double limit = 0.0; 
00069     if (energy<15.0) {limit = 0.45;}
00070     else if (energy<25.0) {limit = 0.40;}
00071 
00072     if (cell0 < limit) {
00073       double fracBin1 = 0.0;
00074       fracBin1 = (energy<10.0)?  0.35/(0.35+0.25) :  0.0;
00075       fracBin1 = (energy>=10.0 && energy<25.0)?  1.09 - 0.0507*energy :  0.0;
00076       fracBin1 = max(fracBin1, 0.0);
00077       fracBin1 = min(fracBin1, 1.0);
00078       SplitDecision inBin1(fracBin1);
00079       if (inBin1.lower()) {
00080         lLimit = 0.0;
00081         uLimit = 0.05;
00082       } else {
00083         lLimit = 0.05;
00084       }
00085     } else {
00086       if (energy<15.0) {
00087         lLimit = 0.50*peakMean;
00088       } else if (energy<30.0) {
00089         lLimit = 0.75*peakMean;
00090       } else {
00091         lLimit = 0.95*peakMean;
00092       }
00093     }
00094     //
00095     if(lLimit<0.){lLimit=0.;}
00096     //IMPROVEME - the logic of setting limits to be made clearer
00097     if(uLimit<0.){ uLimit=peakMean;}
00098     if(uLimit<=lLimit){ uLimit=peakMean;}
00099     //
00100     LinearProcessor lp( (uLimit-lLimit), lLimit );
00101     return m_tail->sample(&lp);
00102   }

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

Definition at line 104 of file SNEmEcalEc1.cxx.

References m_peak, and s_nSigma.

Referenced by sample().

00104                                                       {
00105     pair<double, double>  peakParams = m_peak->parameters(pa);
00106     double peakMean  = peakParams.first;
00107     if (peakMean<=0.0) return 0.0;
00108     return m_peak->sample(0.0, s_nSigma, peakMean, s_nSigma, pa);
00109   }

Member Data Documentation

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

Definition at line 71 of file SNEmEcalEc1.h.

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

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

Definition at line 72 of file SNEmEcalEc1.h.

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

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

Definition at line 73 of file SNEmEcalEc1.h.

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

const double FastShower::SNEmEcalEc1::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