G4DarkBreM  v2.1.0
Geant4 Dark Bremmstrahlung from MadGraph
g4db::example::PersistDarkBremProducts Class Reference

event action used to store the OutgoingKinematics if a dark brem occurred More...

Inheritance diagram for g4db::example::PersistDarkBremProducts:
[legend]
Collaboration diagram for g4db::example::PersistDarkBremProducts:
[legend]

Public Member Functions

 PersistDarkBremProducts (const std::string &out_file)
 Open the output CSV and write the header row.
 
 ~PersistDarkBremProducts ()
 Print out the number of events with a dark brem compared to the requested number.
 
void EndOfEventAction (const G4Event *event) final override
 Check the OutgoingKinematics and write out the four-momenta if the dark brem ocurred.
 

Private Attributes

std::ofstream out_
 the output file we are writing to
 
long unsigned int events_started_ {0}
 number of events that we simulated
 
long unsigned int events_completed_ {0}
 number of events with a dark brem in it
 

Detailed Description

event action used to store the OutgoingKinematics if a dark brem occurred

This uses OutgoingKinematics::stream to write out the CSV where data will be stored.

Note
The OutgoingKinematics::stream method and the CSV header row written here need to match for the CSV to make sense.

We don't do any caching, just trusting the std::ofstream to handle the caching, only flushing when necessary and when destructed.

We also print out the number of events that successfully had a dark brem compared to the number of events requested. This is helpful for the user so that they know (1) there is not a problem and (2) potential tuning of the bias factor.


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