Jpp - the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Protected Attributes | List of all members
JMARKOV::JIsotropicScattering Class Reference

Implementation of the JScatteringModel interface with isotropic scattering. More...

#include <JScatteringModel.hh>

Inheritance diagram for JMARKOV::JIsotropicScattering:
JMARKOV::JScatteringModel

Public Member Functions

 JIsotropicScattering (double _lambda_scat)
 Constructor. More...
 
double getScatteringProbability (double ct)
 Return the probability density as a function of cos(theta) More...
 
JVersor3D generateDirection ()
 Return a randomly generated direction according to the scattering probability distribution. More...
 
virtual double getScatteringLength ()
 

Protected Attributes

double lambda_scat
 

Detailed Description

Implementation of the JScatteringModel interface with isotropic scattering.

Definition at line 446 of file JScatteringModel.hh.

Constructor & Destructor Documentation

JMARKOV::JIsotropicScattering::JIsotropicScattering ( double  _lambda_scat)
inline

Constructor.

Definition at line 453 of file JScatteringModel.hh.

453  {
454  lambda_scat = _lambda_scat ;
455  }

Member Function Documentation

double JMARKOV::JIsotropicScattering::getScatteringProbability ( double  ct)
inlinevirtual

Return the probability density as a function of cos(theta)

dP / dOmega = dP / dcosTheta dPhi

to scatter in a given direction. Theta=0 is forward scattering.

Implements JMARKOV::JScatteringModel.

Definition at line 457 of file JScatteringModel.hh.

457  {
458  return 1.0/(4.0*M_PI) ;
459  }
JVersor3D JMARKOV::JIsotropicScattering::generateDirection ( )
inlinevirtual

Return a randomly generated direction according to the scattering probability distribution.

This uses gRandom.

Implements JMARKOV::JScatteringModel.

Definition at line 461 of file JScatteringModel.hh.

461  {
462  double phi = gRandom->Uniform(0,2*M_PI) ;
463  double ct = gRandom->Uniform(-1,1) ;
464  return JVersor3D( JAngle3D( acos(ct),phi) ) ;
465  }
Data structure for angles in three dimensions.
Definition: JAngle3D.hh:33
Data structure for normalised vector in three dimensions.
Definition: JVersor3D.hh:26
virtual double JMARKOV::JScatteringModel::getScatteringLength ( )
inlinevirtualinherited

Reimplemented in JMARKOV::JCombinedScattering.

Definition at line 72 of file JScatteringModel.hh.

72 { return lambda_scat ; }

Member Data Documentation

double JMARKOV::JScatteringModel::lambda_scat
protectedinherited

Definition at line 76 of file JScatteringModel.hh.


The documentation for this class was generated from the following file: