Jpp  master_rocky-37-gf0c5bc59d
the software that should make you happy
Public Member Functions | Protected Attributes | List of all members
JMARKOV::JIsotropicSource Class Reference

Implementation of the JSourceModel class that represents an isotropic source. More...

#include <JScatteringModel.hh>

Inheritance diagram for JMARKOV::JIsotropicSource:
JMARKOV::JSourceModel

Public Member Functions

 JIsotropicSource ()
 
double getEmissionProbability (JVersor3D dir)
 Return the probability density. More...
 
JVersor3D generateDirection ()
 Return a randomly generated direction according to the emission distribution. More...
 
void setPosition (JPosition3D &_pos)
 
const JPosition3DgetPosition () const
 

Protected Attributes

JPosition3D pos
 

Detailed Description

Implementation of the JSourceModel class that represents an isotropic source.

Definition at line 121 of file JScatteringModel.hh.

Constructor & Destructor Documentation

◆ JIsotropicSource()

JMARKOV::JIsotropicSource::JIsotropicSource ( )
inline

Definition at line 124 of file JScatteringModel.hh.

124 {}

Member Function Documentation

◆ getEmissionProbability()

double JMARKOV::JIsotropicSource::getEmissionProbability ( JVersor3D  dir)
inlinevirtual

Return the probability density.

dP / dOmega = dP / dCosTheta dPhi

that a photon from this source is emitted in a given direction, given that a photon is emitted.

Implements JMARKOV::JSourceModel.

Definition at line 126 of file JScatteringModel.hh.

126  {
127  return 1.0/(4.0*M_PI) ;
128  }

◆ generateDirection()

JVersor3D JMARKOV::JIsotropicSource::generateDirection ( )
inlinevirtual

Return a randomly generated direction according to the emission distribution.

This uses gRandom.

Implements JMARKOV::JSourceModel.

Definition at line 130 of file JScatteringModel.hh.

130  {
131  double dx, dy, dz ;
132  gRandom->Sphere(dx,dy,dz,1) ;
133  return JVersor3D(dx,dy,dz) ;
134  }
Data structure for normalised vector in three dimensions.
Definition: JVersor3D.hh:28

◆ setPosition()

void JMARKOV::JSourceModel::setPosition ( JPosition3D _pos)
inlineinherited

Definition at line 108 of file JScatteringModel.hh.

108 { pos = _pos ; }

◆ getPosition()

const JPosition3D& JMARKOV::JSourceModel::getPosition ( ) const
inlineinherited

Definition at line 110 of file JScatteringModel.hh.

110 { return pos ; }

Member Data Documentation

◆ pos

JPosition3D JMARKOV::JSourceModel::pos
protectedinherited

Definition at line 114 of file JScatteringModel.hh.


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