16#ifndef _RMG_GENERATOR_COSMIC_MUONS_HH_
17#define _RMG_GENERATOR_COSMIC_MUONS_HH_
22#include "CLHEP/Units/SystemOfUnits.h"
23#include "G4GenericMessenger.hh"
24#include "G4ParticleGun.hh"
26#include "RMGVGenerator.hh"
41class RMGGeneratorCosmicMuons :
public RMGVGenerator {
70 std::unique_ptr<EcoMug> fEcoMug;
71 std::unique_ptr<G4ParticleGun> fGun =
nullptr;
73 std::unique_ptr<G4GenericMessenger> fMessenger =
nullptr;
74 void DefineCommands();
75 void SetSkyShape(std::string shape);
78 double fSkyPlaneSize = -1;
79 double fSkyPlaneHeight = 50 * u::m;
80 double fSkyHSphereRadius = 50 * u::m;
82 double fSpherePositionThetaMin = 0 * u::deg;
83 double fSpherePositionThetaMax = 90 * u::deg;
84 double fSpherePositionPhiMin = 0 * u::deg;
85 double fSpherePositionPhiMax = 360 * u::deg;
87 double fMomentumMin = 0 * u::GeV;
88 double fMomentumMax = 1 * u::TeV;
89 double fThetaMin = 0 * u::deg;
90 double fThetaMax = 90 * u::deg;
91 double fPhiMin = 0 * u::deg;
92 double fPhiMax = 360 * u::deg;
Cosmic-muon primary generator backed by the EcoMug sampler.
Definition RMGGeneratorCosmicMuons.hh:41
void BeginOfRunAction(const G4Run *) override
Configure EcoMug with the user-supplied sky shape and kinematic ranges.
Definition RMGGeneratorCosmicMuons.cc:47
void GeneratePrimaries(G4Event *) override
Sample a muon from EcoMug and fire it through the internal particle gun.
Definition RMGGeneratorCosmicMuons.cc:102
SkyShape
Geometric shape of the surface from which muons are sampled.
Definition RMGGeneratorCosmicMuons.hh:46
@ kPlane
Horizontal square plane at a fixed height.
Definition RMGGeneratorCosmicMuons.hh:47
@ kSphere
Upper hemisphere of a sphere centred at the origin.
Definition RMGGeneratorCosmicMuons.hh:48
void SetParticlePosition(G4ThreeVector) override
No-op: vertex sampling is owned by EcoMug.
Definition RMGGeneratorCosmicMuons.hh:62
void EndOfRunAction(const G4Run *) override
Called at the end of a run.
Definition RMGGeneratorCosmicMuons.hh:66