Class RMGParticleFilterScheme¶
Defined in File RMGParticleFilterScheme.hh
Inheritance Relationships¶
Base Type¶
public RMGVOutputScheme(Class RMGVOutputScheme)
Class Documentation¶
-
class RMGParticleFilterScheme : public RMGVOutputScheme¶
Filter-output scheme for particles.
This optional output scheme filters out all particles specified via their PDG code. Optionally, it can apply this filter to a specified volume or ignore a specified volume. Properties need to be specified per macro.
Does nothing if the output scheme is not enabled per macro before run initialization. Also does nothing if no particle is specified. If no volume is specified the filter is applied to all volumes.
Public Functions
-
RMGParticleFilterScheme()¶
-
virtual std::optional<G4ClassificationOfNewTrack> StackingActionClassify(const G4Track*, int) override¶
Wraps
G4UserStackingAction::StackingActionClassify.This is used to classify all specified particles as
fKillif they are in the specified volumes (or no volume is specified).If the primary particle is filtered out here, the simulation crashes. To avoid the crash, the particle will be simulated anyways and a warning message will be shown.
-
inline void AddParticle(int pdg)¶
Add a particle, identified by its PDG code, to the list of particles to kill.
-
void AddKeepVolume(std::string name)¶
Add a physical volume, by name, to the volumes in which the filter will not be applied.
This means that specified particles outside of the specified keep-volumes will be filtered. It is therefore not possible to specify keep-volumes and kill-volumes in the same geometry.
-
void AddKillVolume(std::string name)¶
Add a physical volume, by name, to the volumes in which the filter will be applied.
This means that specified particles outside of the specified kill-volumes will not be affected by the filter. It is therefore not possible to specify keep-volumes and kill-volumes in the same geometry.
-
void AddKeepProcess(std::string name)¶
Add a physics process by name. This will only keep the specified particles when they were created by this process, all other particles will not be kept.
This means that specified particles that are not created by these processes will not be affected by the filter. It is therefore not possible to specify keep-processes and kill-processes at the same time.
-
void AddKillProcess(std::string name)¶
Add a physics process by name. This will apply the filter only to particles created by this process.
This means that specified particles that are not created by these processes will be filtered. It is therefore not possible to specify keep-processes and kill-processes at the same time.
-
RMGParticleFilterScheme()¶