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

FastShower::C0HadEarlyEcalEc1 Class Reference

#include <C0HadEarlyEcalEc1.h>

Inheritance diagram for FastShower::C0HadEarlyEcalEc1:

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

Collaboration graph
[legend]
List of all members.

Public Methods

 C0HadEarlyEcalEc1 (IUpdatingGaussian *, IProcessedDist *, IInTail *)
 C0HadEarlyEcalEc1 (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_nSigma1
const double s_nSigma2
const double s_nSigma3

Constructor & Destructor Documentation

FastShower::C0HadEarlyEcalEc1::C0HadEarlyEcalEc1 IUpdatingGaussian  ,
IProcessedDist  ,
IInTail  
 

Definition at line 27 of file C0HadEarlyEcalEc1.cxx.

Referenced by clone().

00029                                                      :
00030     ISampler(), ICell0(), DebugBase("C0HadEarlyEcalEc1"), 
00031     m_peak(g), m_tail(t), m_inTail(it){}

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

Definition at line 33 of file C0HadEarlyEcalEc1.cxx.

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

00034                                                           :
00035     DebugBase(s), 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::C0HadEarlyEcalEc1::clone   const [virtual]
 

ISampler Interface.

Implements FastShower::ISampler.

Definition at line 42 of file C0HadEarlyEcalEc1.cxx.

References C0HadEarlyEcalEc1().

00042                                            {
00043     return new C0HadEarlyEcalEc1(*this);
00044   }

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

sample and fill CoreSamples.

Implements FastShower::ISampler.

Definition at line 47 of file C0HadEarlyEcalEc1.cxx.

References FastShower::ParticleParameters::energy(), evalPeak(), evalTail(), FastShower::CoreSamples::fill(), m_inTail, and FastShower::PolyArgs::pp().

00048                                                          {
00049     //
00050     double energy = pa.pp()->energy();
00051     double aDelPhi = pa.pp()->energy();
00052     //
00053     if ( energy<30.0  &&  aDelPhi<0.035 ){
00054       cs.fill(this, evalPeak(pa));
00055     }else{
00056       if( m_inTail->operator()(pa) ){
00057         cs.fill(this, evalTail(pa));
00058       }else{
00059         cs.fill(this, evalPeak(pa));
00060       }
00061     }
00062   }

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

read back last deposit - used by monitoring code.

Implements FastShower::ISampler.

Definition at line 100 of file C0HadEarlyEcalEc1.cxx.

References FastShower::CoreSamples::give().

00100                                                                  {
00101     return cs.give(this);
00102   }

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

Reimplemented from FastShower::DebugBase.

Definition at line 104 of file C0HadEarlyEcalEc1.cxx.

References m_inTail, m_peak, and m_tail.

00104                                                        {
00105     v.push_back(m_peak);
00106     v.push_back(m_tail);
00107     v.push_back(m_inTail);
00108   }

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

Definition at line 64 of file C0HadEarlyEcalEc1.cxx.

References FastShower::ParticleParameters::energy(), m_peak, m_tail, FastShower::PolyArgs::pp(), s_nSigma1, s_nSigma2, and s_nSigma3.

Referenced by sample().

00064                                                              {
00065 
00066     pair<double, double>  peakParams = m_peak->parameters(pa);
00067     double peakMean  = peakParams.first;
00068     double peakSigma = peakParams.second;
00069     //calculate ther upper and lower limits of the tails
00070     //
00071     // tail
00072     double energy = pa.pp()->energy();
00073     double uLimit = peakMean - s_nSigma1*peakSigma;
00074     uLimit = min(uLimit,1.0);
00075     uLimit = max(uLimit,0.0);
00076     //
00077     double lLimit;
00078     if (energy<30.0) {
00079       lLimit = 0.0;
00080     }else if (energy<70.0) {
00081       lLimit = peakMean - s_nSigma2*peakSigma;
00082     }else {
00083       lLimit = peakMean - s_nSigma3*peakSigma;
00084     }
00085     lLimit = max(lLimit,0.0);
00086     if(lLimit>uLimit){lLimit=0.0;}
00087     //
00088     if (!(uLimit-lLimit)>0.0) {
00089       lLimit = 0.0;
00090       uLimit = 1.0;
00091     }
00092     LinearProcessor lp( (uLimit-lLimit),lLimit );
00093     return m_tail->sample(&lp);
00094   }

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

Definition at line 96 of file C0HadEarlyEcalEc1.cxx.

Referenced by sample().

00096                                                            {
00097     return m_peak->sample(0.0, 100, 1.0, 100, pa);
00098   }

Member Data Documentation

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

Definition at line 80 of file C0HadEarlyEcalEc1.h.

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

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

Definition at line 81 of file C0HadEarlyEcalEc1.h.

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

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

Definition at line 82 of file C0HadEarlyEcalEc1.h.

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

const double FastShower::C0HadEarlyEcalEc1::s_nSigma1 [static, private]
 

Referenced by evalTail().

const double FastShower::C0HadEarlyEcalEc1::s_nSigma2 [static, private]
 

Referenced by evalTail().

const double FastShower::C0HadEarlyEcalEc1::s_nSigma3 [static, private]
 

Referenced by evalTail().


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