remage
Simulation framework for HPGe-based experiments
 
Loading...
Searching...
No Matches
RMGOpWLSProcess Class Reference

A wrapper for the Geant4 optical wavelength shifting (WLS) process. More...

#include <RMGOpWLSProcess.hh>

Inheritance diagram for RMGOpWLSProcess:
Collaboration diagram for RMGOpWLSProcess:

Public Member Functions

 RMGOpWLSProcess (const G4String &aNamePrefix="RMG", G4ProcessType aType=fOptical)
 Constructs a new RMG Optical WLS process.
 
virtual ~RMGOpWLSProcess ()=default
 Virtual destructor.
 
G4VParticleChangePostStepDoIt (const G4Track &aTrack, const G4Step &aStep) override
 Applies the custom optical WLS process in the post-step of a track.
 
void BuildPhysicsTable (const G4ParticleDefinition &aParticleType) override
 Builds the physics table for the WLS process.
 

Detailed Description

A wrapper for the Geant4 optical wavelength shifting (WLS) process.

This class extends G4WrapperProcess to customize the behavior of the standard G4OpWLS process. It uses a material property RMG_WLSMEANNUMBERPHOTONS to control the mean number of emitted photons and prevents the default Poissonian sampling by replacing the original WLSMEANNUMBERPHOTONS property.

Constructor & Destructor Documentation

◆ RMGOpWLSProcess()

RMGOpWLSProcess::RMGOpWLSProcess ( const G4String & aNamePrefix = "RMG",
G4ProcessType aType = fOptical )
explicit

Constructs a new RMG Optical WLS process.

Parameters
aNamePrefixPrefix for naming the process (default "RMG").
aTypeProcess type (default fOptical).

Member Function Documentation

◆ BuildPhysicsTable()

void RMGOpWLSProcess::BuildPhysicsTable ( const G4ParticleDefinition & aParticleType)
override

Builds the physics table for the WLS process.

This method overrides BuildPhysicsTable() to customize the handling of the mean number of emitted photons. After invoking the registered process's BuildPhysicsTable(), it iterates through the global material table. For each material possessing the property WLSMEANNUMBERPHOTONS, it replaces it with RMG_WLSMEANNUMBERPHOTONS to disable the default Poissonian sampling. If a mean emission number greater than 1 is found, a warning is issued and that material is skipped.

Parameters
aParticleTypeThe particle definition for which the physics table is built.

◆ PostStepDoIt()

G4VParticleChange * RMGOpWLSProcess::PostStepDoIt ( const G4Track & aTrack,
const G4Step & aStep )
override

Applies the custom optical WLS process in the post-step of a track.

This method overrides PostStepDoIt() of G4WrapperProcess. It first calls the registered process's PostStepDoIt() to obtain the default particle change. If the returned result indicates that no secondary photon has been produced and the track is stopped, the result is returned unchanged. Otherwise, the method samples a random number compared to the material property RMG_WLSMEANNUMBERPHOTONS and, if the random value exceeds this mean, it kills the secondary photon by proposing a kill status. Finally, the modified particle change is returned.

Parameters
aTrackThe current track.
aStepThe current step.
Returns
Pointer to the modified particle change.

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