Class RMGGeneratorMUSUNCosmicMuons

Inheritance Relationships

Base Type

Class Documentation

class RMGGeneratorMUSUNCosmicMuons : public RMGVGenerator

Primary generator reading pre-sampled cosmic-muon kinematics from a MUSUN file.

The input file (an ASCII MUSUN dump) is converted to a temporary Geant4 CSV ntuple at the beginning of the run and read row-by-row by RMGAnalysisReader. Vertex sampling is controlled by the input file, so SetParticlePosition is a no-op.

Public Functions

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

Read the next muon entry from the temporary file and shoot it.

inline virtual void SetParticlePosition(G4ThreeVector) override

No-op: vertex sampling is fixed by the input MUSUN file.

virtual void BeginOfRunAction(const G4Run*) override

Convert the MUSUN ASCII input to Geant4 CSV and open it for reading.

virtual void EndOfRunAction(const G4Run*) override

Close the input file and clean up the temporary directory.