 |
Version: SMASH-1.8
|
|
Go to the documentation of this file.
90 filename_(path / (name +
".root")),
91 write_collisions_(name ==
"Collisions" || name ==
"Dileptons" ||
93 write_particles_(name ==
"Particles"),
94 write_initial_conditions_(name ==
"SMASH_IC"),
95 particles_only_final_(out_par.part_only_final),
96 autosave_frequency_(1000),
97 part_extended_(out_par.part_extended),
98 coll_extended_(out_par.coll_extended),
99 ic_extended_(out_par.ic_extended) {
133 "form_time[npart]/D");
136 "proc_id_origin[npart]/I");
138 "proc_type_origin[npart]/I");
140 "time_last_coll[npart]/D");
142 "pdg_mother1[npart]/I");
144 "pdg_mother2[npart]/I");
174 "form_time[npart]/D");
177 "proc_id_origin[npart]/I");
179 "proc_type_origin[npart]/I");
181 "time_last_coll[npart]/D");
183 "pdg_mother1[npart]/I");
185 "pdg_mother2[npart]/I");
202 const int event_number) {
217 const std::unique_ptr<Clock> &,
227 double impact_parameter,
bool empty_event) {
248 if (particles.
size() != 0) {
250 "End time might be too small for initial conditions output. "
251 "Hypersurface has not yet been crossed by ",
252 particles.
size(),
" particle(s).");
270 template <
typename T>
277 for (
const auto &
p : particles) {
284 t[i] =
p.position().x0();
285 x[i] =
p.position().x1();
286 y[i] =
p.position().x2();
287 z[i] =
p.position().x3();
289 p0[i] =
p.momentum().x0();
290 px[i] =
p.momentum().x1();
291 py[i] =
p.momentum().x2();
292 pz[i] =
p.momentum().x3();
294 pdgcode[i] =
p.pdgcode().get_decimal();
298 const auto h =
p.get_history();
320 const ParticleList &outgoing,
322 const double partial_weight) {
324 nin = incoming.size();
325 nout = outgoing.size();
337 for (
const ParticleList &plist : {incoming, outgoing}) {
338 for (
const auto &
p : plist) {
339 t[i] =
p.position().x0();
340 x[i] =
p.position().x1();
341 y[i] =
p.position().x2();
342 z[i] =
p.position().x3();
344 p0[i] =
p.momentum().x0();
345 px[i] =
p.momentum().x1();
346 py[i] =
p.momentum().x2();
347 pz[i] =
p.momentum().x3();
349 pdgcode[i] =
p.pdgcode().get_decimal();
353 const auto h =
p.get_history();
virtual ProcessType get_type() const
Get the process type.
int npart
Property that is written to ROOT output.
bf::path filename_unfinished_
Filename of output as long as simulation is still running.
std::array< int, max_buffer_size_ > pdgcode
Property that is written to ROOT output.
const bool coll_extended_
Whether extended collisions output is on.
A class to pre-calculate and store parameters relevant for density calculation.
double impact_b
Property that is written to ROOT output.
int ev
Property that is written to ROOT output.
int nout
Property that is written to ROOT output.
std::array< double, max_buffer_size_ > z
Property that is written to ROOT output.
std::array< double, max_buffer_size_ > y
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::array< double, max_buffer_size_ > formation_time_
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.
bool write_initial_conditions_
Option to write particles tree for initial conditions.
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.
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.
double wgt
Property that is written to ROOT output.
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.
Print only final-state particles, and those only if the event is not empty.
Helper structure for Experiment to hold output options and parameters.
std::array< int, max_buffer_size_ > coll_per_part_
Property that is written to ROOT output.
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.
bool write_particles_
Option to write particles tree.
Abstraction of generic output.
std::array< int, max_buffer_size_ > charge
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.
static constexpr int LHyperSurfaceCrossing
std::array< double, max_buffer_size_ > x
Property that is written to ROOT output.
TTree * collisions_tree_
TTree for collision output.
std::array< double, max_buffer_size_ > px
Property that is written to ROOT output.
int nin
Property that is written to ROOT output.
std::array< double, max_buffer_size_ > py
Property that is written to ROOT output.
bool write_collisions_
Option to write collisions tree.
int current_event_
Number of current event.
std::array< double, max_buffer_size_ > xsec_factor_
Property that is written to ROOT output.
double par_wgt
Property that is written to ROOT output.
std::array< int, max_buffer_size_ > pdg_mother1_
Property that is written to ROOT output.
std::unique_ptr< TFile > root_out_file_
Pointer to root output file.
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....
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.
std::array< double, max_buffer_size_ > p0
Property that is written to ROOT output.
const bool part_extended_
Whether extended particle output is on.
static const int max_buffer_size_
Maximal buffer size.
Hypersurface crossing Particles are removed from the evolution and printed to a separate output to se...
std::array< double, max_buffer_size_ > time_last_coll_
Property that is written to ROOT output.
void particles_to_tree(T &particles)
Writes particles to a tree defined by treename.
int tcounter
Property that is written to ROOT output.
OutputOnlyFinal particles_only_final_
Print only final particles in the event, no intermediate output.
void at_eventstart(const Particles &particles, const int event_number) override
update event number and writes intermediate particles to a tree.
const ParticleList & incoming_particles() const
Get the list of particles that go into the action.
std::array< int, max_buffer_size_ > proc_id_origin_
Property that is written to ROOT output.
std::array< double, max_buffer_size_ > pz
Property that is written to ROOT output.
const bool ic_extended_
Whether extended ic output is on.
std::array< double, max_buffer_size_ > t
Property that is written to ROOT output.
std::array< int, max_buffer_size_ > proc_type_origin_
Property that is written to ROOT output.
std::array< int, max_buffer_size_ > pdg_mother2_
Property that is written to ROOT output.