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

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

#include <RMGGeneratorMUSUNCosmicMuons.hh>

Inheritance diagram for RMGGeneratorMUSUNCosmicMuons:
Collaboration diagram for RMGGeneratorMUSUNCosmicMuons:

Public Member Functions

 RMGGeneratorMUSUNCosmicMuons (RMGGeneratorMUSUNCosmicMuons const &)=delete
 
RMGGeneratorMUSUNCosmicMuonsoperator= (RMGGeneratorMUSUNCosmicMuons const &)=delete
 
 RMGGeneratorMUSUNCosmicMuons (RMGGeneratorMUSUNCosmicMuons &&)=delete
 
RMGGeneratorMUSUNCosmicMuonsoperator= (RMGGeneratorMUSUNCosmicMuons &&)=delete
 
void GeneratePrimaries (G4Event *) override
 Read the next muon entry from the temporary file and shoot it.
 
void SetParticlePosition (G4ThreeVector) override
 No-op: vertex sampling is fixed by the input MUSUN file.
 
void BeginOfRunAction (const G4Run *) override
 Convert the MUSUN ASCII input to Geant4 CSV and open it for reading.
 
void EndOfRunAction (const G4Run *) override
 Close the input file and clean up the temporary directory.
 
- Public Member Functions inherited from RMGVGenerator
 RMGVGenerator (std::string name)
 
 RMGVGenerator (RMGVGenerator const &)=delete
 
RMGVGeneratoroperator= (RMGVGenerator const &)=delete
 
 RMGVGenerator (RMGVGenerator &&)=delete
 
RMGVGeneratoroperator= (RMGVGenerator &&)=delete
 
void SetReportingFrequency (int freq)
 
std::string GetGeneratorName ()
 

Additional Inherited Members

- Protected Attributes inherited from RMGVGenerator
std::string fGeneratorName
 
std::unique_ptr< G4UImessengerfMessenger
 
int fReportingFrequency = 1000
 

Detailed Description

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.

Member Function Documentation

◆ BeginOfRunAction()

void RMGGeneratorMUSUNCosmicMuons::BeginOfRunAction ( const G4Run * )
overridevirtual

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

Reimplemented from RMGVGenerator.

◆ EndOfRunAction()

void RMGGeneratorMUSUNCosmicMuons::EndOfRunAction ( const G4Run * )
overridevirtual

Close the input file and clean up the temporary directory.

Reimplemented from RMGVGenerator.

◆ GeneratePrimaries()

void RMGGeneratorMUSUNCosmicMuons::GeneratePrimaries ( G4Event * event)
overridevirtual

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

Implements RMGVGenerator.

◆ SetParticlePosition()

void RMGGeneratorMUSUNCosmicMuons::SetParticlePosition ( G4ThreeVector )
inlineoverridevirtual

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

Implements RMGVGenerator.


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