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

FastShower::ProcessedNormal Class Reference

#include <ProcessedNormal.h>

Inheritance diagram for FastShower::ProcessedNormal:

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

Collaboration graph
[legend]
List of all members.

Public Methods

virtual double sample () const
 underlying dist

virtual double sample (const IDistProcessor *) const
 processed

virtual double sample (double, double, const IDistProcessor *) const
 processed + truncated

IProcessedDistclone () const
 make a copy of a condcrete object seen through this interface


Member Function Documentation

double FastShower::ProcessedNormal::sample   const [virtual]
 

underlying dist

Implements FastShower::IProcessedDist.

Definition at line 7 of file ProcessedNormal.cxx.

Referenced by FastShower::S0EmEcalEc1::evalTail(), FastShower::S0EmEcalBar1::evalTail(), FastShower::C0EmEcalBar1::evalTail(), FastShower::ProcessedNormalTester::test1(), FastShower::SmearHardPhoton::value(), and FastShower::SmearElectron::value().

00007                                       {
00008     return RandGauss::shoot();
00009   }

double FastShower::ProcessedNormal::sample const IDistProcessor   const [virtual]
 

processed

Implements FastShower::IProcessedDist.

Definition at line 10 of file ProcessedNormal.cxx.

References FastShower::IDistProcessor::process().

00010                                                               {
00011     return dp->process(RandGauss::shoot());
00012   }

double FastShower::ProcessedNormal::sample double   ,
double   ,
const IDistProcessor  
const [virtual]
 

processed + truncated

Implements FastShower::IProcessedDist.

Definition at line 13 of file ProcessedNormal.cxx.

References FastShower::IDistProcessor::process().

00015                                                                 {
00016 
00017     //cout<<"*** "<<text()<<": low/upLim = "<<lowLim<<" / "<<upLim<<endl;
00018     assert(lowLim<upLim);
00019     
00020     double value = dp->process( RandGauss::shoot() );
00021 
00022     //keep going until within truncation limits;
00023     int ncalls = 0;
00024     while(value < lowLim || value > upLim){
00025       value = dp->process( RandGauss::shoot() );
00026       ++ncalls;
00027       if( ncalls%2 == 1000){
00028         cout<<"Processed Normal called "<< ncalls<<" times"<<endl;
00029         cout<<"Processed Normal lowLim "
00030             << lowLim<<" upLim"<<upLim<<" value"<<value<<endl;
00031       }
00032     }
00033     
00034     return value;
00035   }

IProcessedDist * FastShower::ProcessedNormal::clone   const [virtual]
 

make a copy of a condcrete object seen through this interface

Implements FastShower::IProcessedDist.

Definition at line 36 of file ProcessedNormal.cxx.

00036                                                {
00037     IProcessedDist* iptr = new ProcessedNormal(*this);
00038     return iptr;
00039   } 

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