Class RMGGeneratorCosmicMuons

Inheritance Relationships

Base Type

Class Documentation

class RMGGeneratorCosmicMuons : public RMGVGenerator

Cosmic-muon primary generator backed by the EcoMug sampler.

Generates atmospheric muons sampled either from a horizontal plane or from the upper hemisphere of a sphere (see SkyShape). Momentum, zenith/azimuth and source-position ranges are configurable through messenger commands. Vertex position is sampled internally by EcoMug, so SetParticlePosition is a no-op.

Based on EcoMug, Pagano et al., NIM A 1014 (2021) 165732, https://doi.org/10.1016/j.nima.2021.165732.

Public Types

enum class SkyShape

Geometric shape of the surface from which muons are sampled.

Values:

enumerator kPlane

Horizontal square plane at a fixed height.

enumerator kSphere

Upper hemisphere of a sphere centred at the origin.

Public Functions

RMGGeneratorCosmicMuons()
~RMGGeneratorCosmicMuons()
RMGGeneratorCosmicMuons(RMGGeneratorCosmicMuons const&) = delete
RMGGeneratorCosmicMuons &operator=(RMGGeneratorCosmicMuons const&) = delete
RMGGeneratorCosmicMuons(RMGGeneratorCosmicMuons&&) = delete
RMGGeneratorCosmicMuons &operator=(RMGGeneratorCosmicMuons&&) = delete
virtual void GeneratePrimaries(G4Event*) override

Sample a muon from EcoMug and fire it through the internal particle gun.

inline virtual void SetParticlePosition(G4ThreeVector) override

No-op: vertex sampling is owned by EcoMug.

virtual void BeginOfRunAction(const G4Run*) override

Configure EcoMug with the user-supplied sky shape and kinematic ranges.

inline virtual void EndOfRunAction(const G4Run*) override

Called at the end of a run.

Derived generators can perform any necessary finalization in this method.