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

FastShower::CalcPeak Class Reference

Collaboration diagram for FastShower::CalcPeak:

Collaboration graph
[legend]
List of all members.

Public Methods

 CalcPeak (const ParticleParameters &pp, HaloDepositor::HaloFnsIter hfIter)
 CalcPeak is designed to be used with the STL generate algorithm.

double operator() ()

Private Attributes

const ParticleParametersm_pp
SplitDecision m_sp
ProcessedFlat m_pf
HaloDepositor::HaloFnsIter m_hfIter

Constructor & Destructor Documentation

FastShower::CalcPeak::CalcPeak const ParticleParameters   pp,
HaloDepositor::HaloFnsIter    hfIter
[inline]
 

CalcPeak is designed to be used with the STL generate algorithm.

A value of ParticleParameters is stored at construction. An iterator pointing to the first element of a container of pointers to function objects is stored at construction.

On subsequent calls function operator uses the ParticleParamters to calculate the the area in the "peak", and then points at the next function to use.

uses a SplitDecision to determine whether to sample from peak or tail.

if peak is sampled returns a flat random variable in range [0.0, 0.01] otherwise returns a triangle random variable in range [0.01, 1.0]

Definition at line 43 of file HaloDepositor.cxx.

00044                                               :m_pp(pp), m_hfIter(hfIter){}

Member Function Documentation

double FastShower::CalcPeak::operator()   [inline]
 

in peak

Definition at line 45 of file HaloDepositor.cxx.

00045                        {
00046       m_sp.setBoundary( (*m_hfIter++)->value(m_pp) );
00047       if(m_sp.lower()){
00048         LinearProcessor lp(0.01, 0.0);
00049         return m_pf.sample(&lp);
00050       }else{
00051         TriangleProcessor tp(1.0, 0.01);
00052         return m_pf.sample(&tp);
00053       }
00054     }

Member Data Documentation

const ParticleParameters& FastShower::CalcPeak::m_pp [private]
 

Definition at line 56 of file HaloDepositor.cxx.

SplitDecision FastShower::CalcPeak::m_sp [private]
 

Definition at line 57 of file HaloDepositor.cxx.

ProcessedFlat FastShower::CalcPeak::m_pf [private]
 

Definition at line 58 of file HaloDepositor.cxx.

HaloDepositor::HaloFnsIter FastShower::CalcPeak::m_hfIter [private]
 

Definition at line 59 of file HaloDepositor.cxx.


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