CORSIKA  @c8_version@
The framework to simulate particle cascades for astroparticle physics
corsika::EnergyLossWriter< TOutput > Class Template Reference

The EnergyLossWriter can be used to pool the dEdX energy loss of several processes/modules into one output file/stream. More...

#include <EnergyLossWriter.hpp>

Inheritance diagram for corsika::EnergyLossWriter< TOutput >:

Public Member Functions

 EnergyLossWriter (ShowerAxis const &axis, GrammageType dX=10_g/square(1_cm), unsigned int const nBins=200, GrammageType dX_threshold=0.0001_g/square(1_cm))
 Construct a new writer.
 
void startOfLibrary (boost::filesystem::path const &directory) final override
 
void startOfShower (unsigned int const showerId) final override
 
void endOfShower (unsigned int const showerId) final override
 
void endOfLibrary () final override
 
void write (Point const &p0, Point const &p1, Code const PID, HEPEnergyType const dE)
 Add continuous energy loss.
 
void write (Point const &point, Code const PID, HEPEnergyType const dE)
 Add localized energy loss.
 
void write (GrammageType const Xstart, GrammageType const Xend, Code const PID, HEPEnergyType const dE)
 Add binned energy loss.
 
HEPEnergyType getEnergyLost () const
 Get total observed energy loss. More...
 
YAML::Node getSummary () const
 Return a summary.
 
YAML::Node getConfig () const
 Return the configuration of this output.
 

Detailed Description

template<typename TOutput = EnergyLossWriterParquet<dEdX_output::NColumns>>
class corsika::EnergyLossWriter< TOutput >

The EnergyLossWriter can be used to pool the dEdX energy loss of several processes/modules into one output file/stream.

Typically several processes/modules can lead to energy losses along the shower axis in the shower. The EnergyLossWriter can be used in combination with the SubWriter class to collect all of them into a single output stream:

# showerAxis must be a ShowerAxis object
# the X binning can be specified.
EnergyLossWriter dEdX{showerAxis, 10_g / square(1_cm), 200};
# add to OutputManager:
output.add("energyloss", dEdX);
# add SubWriters, e.g. BetheBlochPDG, CONEX:
BetheBlochPDG<SubWriter<decltype(dEdX)>> long{dEdX};
CONEXhybrid<SubWriter<decltype(dEdX)>> conex{..., dEdX};
...

The default output option is parquet format.

Template Parameters
TOutput

Definition at line 108 of file EnergyLossWriter.hpp.

Member Function Documentation

◆ getEnergyLost()

template<typename TOutput = EnergyLossWriterParquet<dEdX_output::NColumns>>
HEPEnergyType corsika::EnergyLossWriter< TOutput >::getEnergyLost ( ) const

Get total observed energy loss.

Returns
HEPEnergyType The total energy.

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