///////////////////////////////////////////////////////////////////////////////
//
// Simulates optical Rayleigh scattering, as SNOMAN did. This class
// simulates Rayleigh scattering. It should be used in preference to
// the Geant4 G4SNOMANOpRayleigh class as it will calculate mean free
// paths for all materials not just water. It should only be used when
// simulating RAT in a mode to match SNOMAN.
//
// Author: P G Jones
//
// REVISION HISTORY:
// 2014-01-08 : P G Jones - New file.
//
///////////////////////////////////////////////////////////////////////////////
#ifndef __RAT_SNOMANOpRayleigh_hh__
#define __RAT_SNOMANOpRayleigh_hh__
#include
#include
class G4PhysicsTable;
class G4MaterialPropertiesTable;
namespace RAT
{
class SNOMANOpRayleigh : public G4VDiscreteProcess
{
public:
// Construct the class
//
// processName: optional, defaults to SNOMANOpRayleigh
// type: optional, defaults to fOptical
SNOMANOpRayleigh( const G4String& processName = "SNOMANOpRayleigh",
G4ProcessType type = fOptical );
// Deletes the physics table
~SNOMANOpRayleigh();
// Returns true if this code is applicable to the particle type
G4bool IsApplicable( const G4ParticleDefinition& particleType ) { return ( &particleType == G4OpticalPhoton::OpticalPhoton() ); }
// Returns the mean free path for the track in mm
//
// previousStepSize and condition are unused
G4double GetMeanFreePath( const G4Track& track,
G4double previousStepSize,
G4ForceCondition* condition );
// Invoke scattering to the track
//
// returns a particle change description
G4VParticleChange* PostStepDoIt( const G4Track& track,
const G4Step& step );
private:
// Builds the physics table, i.e. a table of mean free paths
void BuildThePhysicsTable();
// Calculates the mean free paths for a material as a function of photon energy
//
// returns the mean free path vector
G4PhysicsOrderedFreeVector* CalculateRayleighMeanFreePaths( G4Material* const material ) const;
G4PhysicsTable* fPhysicsTable; // The physics table used
};
} //::RAT
#endif