 |
Version: SMASH-2.0.2
|
|
Go to the documentation of this file.
227 filename_(path / (name +
".root")),
228 write_collisions_(name ==
"Collisions" || name ==
"Dileptons" ||
230 write_particles_(name ==
"Particles"),
231 write_initial_conditions_(name ==
"SMASH_IC"),
232 particles_only_final_(out_par.part_only_final),
233 autosave_frequency_(1000),
234 part_extended_(out_par.part_extended),
235 coll_extended_(out_par.coll_extended),
236 ic_extended_(out_par.ic_extended) {
278 "form_time[npart]/D");
281 "proc_id_origin[npart]/I");
283 "proc_type_origin[npart]/I");
285 "time_last_coll[npart]/D");
287 "pdg_mother1[npart]/I");
289 "pdg_mother2[npart]/I");
319 "form_time[npart]/D");
322 "proc_id_origin[npart]/I");
324 "proc_type_origin[npart]/I");
326 "time_last_coll[npart]/D");
328 "pdg_mother1[npart]/I");
330 "pdg_mother2[npart]/I");
347 const int event_number,
const EventInfo &event) {
352 test_p_ =
event.test_particles;
356 E_tot_ =
event.total_energy;
369 const std::unique_ptr<Clock> &,
373 test_p_ =
event.test_particles;
377 E_tot_ =
event.total_energy;
389 test_p_ =
event.test_particles;
393 E_tot_ =
event.total_energy;
416 if (particles.
size() != 0) {
418 "End time might be too small for initial conditions output. "
419 "Hypersurface has not yet been crossed by ",
420 particles.
size(),
" particle(s).");
438 template <
typename T>
444 bool exceeded_buffer_message =
true;
446 for (
const auto &
p : particles) {
449 if (exceeded_buffer_message) {
451 <<
"\nThe number of particles N = " << particles.size()
454 << std::ceil(particles.size() /
456 <<
" separate ROOT Tree entries will be created at this output."
457 <<
"\nMaximum buffer size (max_buffer_size_) can be changed in "
458 <<
"rootoutput.h\n\n";
459 exceeded_buffer_message =
false;
468 p0_[i] =
p.momentum().x0();
469 px_[i] =
p.momentum().x1();
470 py_[i] =
p.momentum().x2();
471 pz_[i] =
p.momentum().x3();
473 t_[i] =
p.position().x0();
474 x_[i] =
p.position().x1();
475 y_[i] =
p.position().x2();
476 z_[i] =
p.position().x3();
479 const auto h =
p.get_history();
501 const ParticleList &outgoing,
503 const double partial_weight) {
505 nin_ = incoming.size();
506 nout_ = outgoing.size();
518 for (
const ParticleList &plist : {incoming, outgoing}) {
519 for (
const auto &
p : plist) {
523 p0_[i] =
p.momentum().x0();
524 px_[i] =
p.momentum().x1();
525 py_[i] =
p.momentum().x2();
526 pz_[i] =
p.momentum().x3();
528 t_[i] =
p.position().x0();
529 x_[i] =
p.position().x1();
530 y_[i] =
p.position().x2();
531 z_[i] =
p.position().x3();
534 const auto h =
p.get_history();
virtual ProcessType get_type() const
Get the process type.
double wgt_
Property that is written to ROOT output.
bf::path filename_unfinished_
Filename of output as long as simulation is still running.
std::vector< int > charge_
Property that is written to ROOT output.
double E_tot_
Property that is written to ROOT output.
std::vector< int > pdg_mother1_
Property that is written to ROOT output.
const bool coll_extended_
Whether extended collisions output is on.
static constexpr int LOutput
A class to pre-calculate and store parameters relevant for density calculation.
std::vector< double > y_
Property that is written to ROOT output.
std::vector< double > z_
Property that is written to ROOT output.
std::vector< int > proc_id_origin_
Property that is written to ROOT output.
std::vector< int > pdg_mother2_
Property that is written to ROOT output.
std::vector< double > xsec_factor_
Property that is written to ROOT output.
std::vector< double > p0_
Property that is written to ROOT output.
void at_eventend(const Particles &particles, const int event_number, const EventInfo &event) override
update event number and impact parameter, and writes intermediate particles to a tree.
int ev_
Property that is written to ROOT output.
virtual double get_partial_weight() const =0
Return the specific weight for the chosen outgoing channel, which is mainly used for the partial weig...
std::vector< double > py_
Property that is written to ROOT output.
RootOutput(const bf::path &path, const std::string &name, const OutputParameters &out_par)
Construct ROOT output.
const bf::path filename_
Filename of output.
double E_fields_tot_
Property that is written to ROOT output.
bool write_initial_conditions_
Option to write particles tree for initial conditions.
std::vector< double > pz_
Property that is written to ROOT output.
std::vector< double > formation_time_
Property that is written to ROOT output.
int test_p_
Property that is written to ROOT output.
Structure to contain custom data for output.
std::array< einhard::Logger<>, std::tuple_size< LogArea::AreaTuple >::value > logg
An array that stores all pre-configured Logger objects.
const ParticleList & outgoing_particles() const
Get the list of particles that resulted from the action.
void init_trees()
Basic initialization routine, creating the TTree objects for particles and collisions.
double current_t_
Property that is written to ROOT output.
void at_interaction(const Action &action, const double density) override
Writes collisions to a tree defined by treename.
int output_counter_
Number of output in a given event.
int autosave_frequency_
Root file cannot be read if it was not properly closed and finalized.
bool empty_event_
Property that is written to ROOT output.
@ IfNotEmpty
Print only final-state particles, and those only if the event is not empty.
Helper structure for Experiment to hold output options and parameters.
@ No
Print initial, intermediate and final-state particles.
int nout_
Property that is written to ROOT output.
bool write_particles_
Option to write particles tree.
std::vector< int > coll_per_part_
Property that is written to ROOT output.
Abstraction of generic output.
void at_eventstart(const Particles &particles, const int event_number, const EventInfo &event) override
update event number and writes intermediate particles to a tree.
std::vector< int > pdgcode_
Property that is written to ROOT output.
virtual double get_total_weight() const =0
Return the total weight value, which is mainly used for the weight output entry.
int npart_
Property that is written to ROOT output.
static constexpr int LHyperSurfaceCrossing
double modus_l_
Property that is written to ROOT output.
TTree * collisions_tree_
TTree for collision output.
double impact_b_
Property that is written to ROOT output.
bool write_collisions_
Option to write collisions tree.
int current_event_
Number of current event.
std::vector< double > px_
Property that is written to ROOT output.
std::vector< double > t_
Property that is written to ROOT output.
std::vector< double > time_last_coll_
Property that is written to ROOT output.
std::unique_ptr< TFile > root_out_file_
Pointer to root output file.
bool empty_event
True if no collisions happened.
TTree * particles_tree_
TTree for particles output.
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.
int nin_
Property that is written to ROOT output.
void at_intermediate_time(const Particles &particles, const std::unique_ptr< Clock > &clock, const DensityParameters &dens_param, const EventInfo &event) override
Writes intermediate particles to a tree defined by treename, if it is allowed (i.e....
double par_wgt_
Property that is written to ROOT output.
static const int max_buffer_size_
Maximal buffer size.
@ HyperSurfaceCrossing
Hypersurface crossing Particles are removed from the evolution and printed to a separate output to se...
void particles_to_tree(T &particles)
Writes particles to a tree defined by treename.
OutputOnlyFinal particles_only_final_
Print only final particles in the event, no intermediate output.
const ParticleList & incoming_particles() const
Get the list of particles that go into the action.
double E_kinetic_tot_
Property that is written to ROOT output.
int tcounter_
Property that is written to ROOT output.
const bool ic_extended_
Whether extended ic output is on.
std::vector< double > x_
Property that is written to ROOT output.
std::vector< int > proc_type_origin_
Property that is written to ROOT output.