10 #ifndef SRC_INCLUDE_ROOTOUTPUT_H_ 11 #define SRC_INCLUDE_ROOTOUTPUT_H_ 17 #include <boost/filesystem.hpp> 106 RootOutput(
const bf::path &path,
const std::string &name,
118 const int event_number)
override;
129 double impact_parameter,
bool empty_event)
override;
138 const std::unique_ptr<Clock> &clock,
173 template <
typename T>
183 const ParticleList &outgoing,
const double weight,
184 const double partial_weight);
194 std::array<double, max_buffer_size_>
p0,
px,
py,
pz,
t,
x,
y,
z,
243 #endif // SRC_INCLUDE_ROOTOUTPUT_H_ std::array< double, max_buffer_size_ > formation_time_
Buffer for filling TTree. See class documentation for definitions.
const bf::path filename_
Filename of output.
bool write_initial_conditions_
Option to write particles tree for initial conditions.
A class to pre-calculate and store parameters relevant for density calculation.
int nout
Buffer for filling TTree. See class documentation for definitions.
void particles_to_tree(T &particles)
Writes particles to a tree defined by treename.
bool empty_event_
Buffer for filling TTree. See class documentation for definitions.
int current_event_
Number of current event.
std::array< int, max_buffer_size_ > proc_id_origin_
Buffer for filling TTree. See class documentation for definitions.
bool write_particles_
Option to write particles tree.
std::array< double, max_buffer_size_ > py
Buffer for filling TTree. See class documentation for definitions.
std::unique_ptr< TFile > root_out_file_
Pointer to root output file.
void at_eventstart(const Particles &particles, const int event_number) override
update event number and writes intermediate particles to a tree.
std::array< double, max_buffer_size_ > x
Buffer for filling TTree. See class documentation for definitions.
int npart
Buffer for filling TTree. See class documentation for definitions.
std::array< double, max_buffer_size_ > p0
Buffer for filling TTree. See class documentation for definitions.
std::array< double, max_buffer_size_ > time_last_coll_
Buffer for filling TTree. See class documentation for definitions.
TTree * particles_tree_
TTree for particles output.
SMASH output to ROOT file SMASH supports ROOT output as an option (see http://root.cern.ch).
void init_trees()
Basic initialization routine, creating the TTree objects for particles and collisions.
int nin
Buffer for filling TTree. See class documentation for definitions.
const bool coll_extended_
Whether extended collisions output is on.
void collisions_to_tree(const ParticleList &incoming, const ParticleList &outgoing, const double weight, const double partial_weight)
Writes collisions to a tree defined by treename.
const bool part_extended_
Whether extended particle output is on.
std::array< double, max_buffer_size_ > t
Buffer for filling TTree. See class documentation for definitions.
RootOutput(const bf::path &path, const std::string &name, const OutputParameters &out_par)
Construct ROOT output.
int output_counter_
Number of output in a given event.
std::array< double, max_buffer_size_ > z
Buffer for filling TTree. See class documentation for definitions.
std::array< int, max_buffer_size_ > proc_type_origin_
Buffer for filling TTree. See class documentation for definitions.
void at_intermediate_time(const Particles &particles, const std::unique_ptr< Clock > &clock, const DensityParameters &dens_param) override
Writes intermediate particles to a tree defined by treename, if it is allowed (i.e., particles_only_final_ is false).
Helper structure for Experiment to hold output options and parameters.
Action is the base class for a generic process that takes a number of incoming particles and transfor...
std::array< double, max_buffer_size_ > y
Buffer for filling TTree. See class documentation for definitions.
const bool ic_extended_
Whether extended ic output is on.
bool write_collisions_
Option to write collisions tree.
std::array< double, max_buffer_size_ > px
Buffer for filling TTree. See class documentation for definitions.
double wgt
Buffer for filling TTree. See class documentation for definitions.
bf::path filename_unfinished_
Filename of output as long as simulation is still running.
void at_interaction(const Action &action, const double density) override
Writes collisions to a tree defined by treename.
double impact_b
Buffer for filling TTree. See class documentation for definitions.
void at_eventend(const Particles &particles, const int event_number, double impact_parameter, bool empty_event) override
update event number and impact parameter, and writes intermediate particles to a tree.
TTree * collisions_tree_
TTree for collision output.
int tcounter
Buffer for filling TTree. See class documentation for definitions.
std::array< double, max_buffer_size_ > xsec_factor_
Buffer for filling TTree. See class documentation for definitions.
bool particles_only_final_
Print only final particles in the event, no intermediate output.
std::array< int, max_buffer_size_ > charge
Buffer for filling TTree. See class documentation for definitions.
The Particles class abstracts the storage and manipulation of particles.
std::array< int, max_buffer_size_ > pdg_mother1_
Buffer for filling TTree. See class documentation for definitions.
int ev
Buffer for filling TTree. See class documentation for definitions.
std::array< double, max_buffer_size_ > pz
Buffer for filling TTree. See class documentation for definitions.
std::array< int, max_buffer_size_ > pdgcode
Buffer for filling TTree. See class documentation for definitions.
int autosave_frequency_
Root file cannot be read if it was not properly closed and finalized.
Abstraction of generic output.
std::array< int, max_buffer_size_ > coll_per_part_
Buffer for filling TTree. See class documentation for definitions.
static const int max_buffer_size_
Maximal buffer size.
std::array< int, max_buffer_size_ > pdg_mother2_
Buffer for filling TTree. See class documentation for definitions.
double par_wgt
Buffer for filling TTree. See class documentation for definitions.