Monte Carlo LYSO
Geant4 simulation for the LYSO calorimeter prototype
Functions | Variables
summary.cc File Reference

Definition of the function MC_summary() (and the auxiliary function extract_value()) More...

#include "summary.hh"
Include dependency graph for summary.cc:

Go to the source code of this file.

Functions

G4String extract_value (const G4String &line, const G4String &keyword)
 Auxiliary function called by MC_summary() to extract settings from the macro files used for the Monte Carlo. More...
 
void MC_summary (G4String macrofile, G4int seed, G4double duration, const G4String &output_filename)
 Writes the summary of the Monte Carlo to a text file, updating it at the end of every simulation. More...
 

Variables

G4int beamType = 0
 
G4int modeType = 0
 
G4bool boolLightGuide = false
 

Detailed Description

Definition of the function MC_summary() (and the auxiliary function extract_value())

Definition in file summary.cc.

Function Documentation

◆ extract_value()

G4String extract_value ( const G4String &  line,
const G4String &  keyword 
)

Auxiliary function called by MC_summary() to extract settings from the macro files used for the Monte Carlo.

Parameters
lineThe line from the macro file
keywordThe string representing the command in the macro files, after which the setting is taken
Returns
The extracted value

Definition at line 13 of file summary.cc.

◆ MC_summary()

void MC_summary ( G4String  macrofile,
G4int  seed,
G4double  duration,
const G4String &  output_filename 
)

Writes the summary of the Monte Carlo to a text file, updating it at the end of every simulation.

The summary includes:

  • Monte Carlo ID (the seed of the run), date, username and duration;
  • Settings related to the primary generator;
  • Settings related to the construction.
Parameters
macrofileThe name of the run macro file
seedThe seed of the simulation
durationThe duration (in seconds) of the simulation
output_filenameThe name of the text output file

Definition at line 32 of file summary.cc.