Version: SMASH-2.0.2
smash::OutputParameters Struct Reference

#include <outputparameters.h>

Helper structure for Experiment to hold output options and parameters.

Experiment has one member of this struct.

Definition at line 25 of file outputparameters.h.

Collaboration diagram for smash::OutputParameters:
[legend]

Public Member Functions

 OutputParameters ()
 Default constructor, useful for tests. More...
 
 OutputParameters (Configuration &&conf)
 Constructor from configuration. More...
 
bool get_coll_extended (std::string name) const
 Pass correct extended flag to binary collision output constructor. More...
 

Public Attributes

ThreeVector td_position
 Point, where thermodynamic quantities are calculated. More...
 
DensityType td_dens_type
 Type (e.g., baryon/pion/hadron) of thermodynamic quantity. More...
 
bool td_rho_eckart
 Print out Eckart rest frame density of type td_dens_type or not? More...
 
bool td_tmn
 Print out energy-momentum tensor of type td_dens_type or not? More...
 
bool td_tmn_landau
 Print out energy-momentum tensor in Landau rest frame (of type td_dens_type) or not? More...
 
bool td_v_landau
 Print out Landau velocity of type td_dens_type or not? More...
 
bool td_jQBS
 Print out QBS 4-currents or not? More...
 
bool td_smearing
 Whether smearing is on or off; WARNING : if smearing is off, then final result is in GeV instead of GeV/fm3. More...
 
bool part_extended
 Extended format for particles output. More...
 
OutputOnlyFinal part_only_final
 Print only final particles in event. More...
 
bool coll_extended
 Extended format for collisions output. More...
 
bool coll_printstartend
 Print initial and final particles in event into collision output. More...
 
bool dil_extended
 Extended format for dilepton output. More...
 
bool photons_extended
 Extended format for photon output. More...
 
bool ic_extended
 Extended initial conditions output. More...
 
Configuration subcon_for_rivet
 Rivet specfic setup configurations. More...
 

Constructor & Destructor Documentation

◆ OutputParameters() [1/2]

smash::OutputParameters::OutputParameters ( )
inline

Default constructor, useful for tests.

Definition at line 27 of file outputparameters.h.

28  : td_position(ThreeVector()),
30  td_rho_eckart(false),
31  td_tmn(false),
32  td_tmn_landau(false),
33  td_v_landau(false),
34  td_jQBS(false),
35  td_smearing(true),
36  part_extended(false),
38  coll_extended(false),
39  coll_printstartend(false),
40  dil_extended(false),
41  photons_extended(false),
42  ic_extended(false),
43  subcon_for_rivet(0) {}

◆ OutputParameters() [2/2]

smash::OutputParameters::OutputParameters ( Configuration &&  conf)
inlineexplicit

Constructor from configuration.

Definition at line 46 of file outputparameters.h.

46  : OutputParameters() {
48 
49  if (conf.has_value({"Thermodynamics"})) {
50  auto subcon = conf["Thermodynamics"];
51  if (subcon.has_value({"Position"})) {
52  const std::array<double, 3> a = subcon.take({"Position"});
53  td_position = ThreeVector(a[0], a[1], a[2]);
54  }
55  std::set<ThermodynamicQuantity> quan = subcon.take({"Quantities"});
57  td_tmn = (quan.count(ThermodynamicQuantity::Tmn) > 0);
60  td_jQBS = (quan.count(ThermodynamicQuantity::j_QBS) > 0);
61  td_dens_type = subcon.take({"Type"}, DensityType::Baryon);
64  logg[LExperiment].warn(
65  "Requested Thermodynamics output with Density type None. ",
66  "Change the density type to avoid output being dropped.");
67  }
68  td_smearing = subcon.take({"Smearing"}, true);
69  }
70 
71  if (conf.has_value({"Particles"})) {
72  part_extended = conf.take({"Particles", "Extended"}, false);
74  conf.take({"Particles", "Only_Final"}, OutputOnlyFinal::Yes);
75  }
76 
77  if (conf.has_value({"Collisions"})) {
78  coll_extended = conf.take({"Collisions", "Extended"}, false);
79  coll_printstartend = conf.take({"Collisions", "Print_Start_End"}, false);
80  }
81 
82  if (conf.has_value({"Dileptons"})) {
83  dil_extended = conf.take({"Dileptons", "Extended"}, false);
84  }
85 
86  if (conf.has_value({"Photons"})) {
87  photons_extended = conf.take({"Photons", "Extended"}, false);
88  }
89 
90  if (conf.has_value({"Initial_Conditions"})) {
91  ic_extended = conf.take({"Initial_Conditions", "Extended"}, false);
92  }
93 
94  if (conf.has_value({"Rivet"})) {
95  subcon_for_rivet = conf["Rivet"];
96  }
97  }

Member Function Documentation

◆ get_coll_extended()

bool smash::OutputParameters::get_coll_extended ( std::string  name) const
inline

Pass correct extended flag to binary collision output constructor.

Parameters
[in]name(File)name of the output.
Returns
Extended flag for binary output.

Definition at line 104 of file outputparameters.h.

104  {
105  if (name == "Collisions") {
106  return coll_extended;
107  } else if (name == "Dileptons") {
108  return dil_extended;
109  } else if (name == "Photons") {
110  return photons_extended;
111  } else {
112  return false; // error
113  }
114  }

Member Data Documentation

◆ td_position

ThreeVector smash::OutputParameters::td_position

Point, where thermodynamic quantities are calculated.

Definition at line 117 of file outputparameters.h.

◆ td_dens_type

DensityType smash::OutputParameters::td_dens_type

Type (e.g., baryon/pion/hadron) of thermodynamic quantity.

Definition at line 120 of file outputparameters.h.

◆ td_rho_eckart

bool smash::OutputParameters::td_rho_eckart

Print out Eckart rest frame density of type td_dens_type or not?

Definition at line 123 of file outputparameters.h.

◆ td_tmn

bool smash::OutputParameters::td_tmn

Print out energy-momentum tensor of type td_dens_type or not?

Definition at line 126 of file outputparameters.h.

◆ td_tmn_landau

bool smash::OutputParameters::td_tmn_landau

Print out energy-momentum tensor in Landau rest frame (of type td_dens_type) or not?

Definition at line 132 of file outputparameters.h.

◆ td_v_landau

bool smash::OutputParameters::td_v_landau

Print out Landau velocity of type td_dens_type or not?

Definition at line 135 of file outputparameters.h.

◆ td_jQBS

bool smash::OutputParameters::td_jQBS

Print out QBS 4-currents or not?

Definition at line 138 of file outputparameters.h.

◆ td_smearing

bool smash::OutputParameters::td_smearing

Whether smearing is on or off; WARNING : if smearing is off, then final result is in GeV instead of GeV/fm3.

Definition at line 144 of file outputparameters.h.

◆ part_extended

bool smash::OutputParameters::part_extended

Extended format for particles output.

Definition at line 147 of file outputparameters.h.

◆ part_only_final

OutputOnlyFinal smash::OutputParameters::part_only_final

Print only final particles in event.

Definition at line 150 of file outputparameters.h.

◆ coll_extended

bool smash::OutputParameters::coll_extended

Extended format for collisions output.

Definition at line 153 of file outputparameters.h.

◆ coll_printstartend

bool smash::OutputParameters::coll_printstartend

Print initial and final particles in event into collision output.

Definition at line 156 of file outputparameters.h.

◆ dil_extended

bool smash::OutputParameters::dil_extended

Extended format for dilepton output.

Definition at line 159 of file outputparameters.h.

◆ photons_extended

bool smash::OutputParameters::photons_extended

Extended format for photon output.

Definition at line 162 of file outputparameters.h.

◆ ic_extended

bool smash::OutputParameters::ic_extended

Extended initial conditions output.

Definition at line 165 of file outputparameters.h.

◆ subcon_for_rivet

Configuration smash::OutputParameters::subcon_for_rivet

Rivet specfic setup configurations.

Definition at line 168 of file outputparameters.h.


The documentation for this struct was generated from the following file:
ThermodynamicQuantity::TmnLandau
@ TmnLandau
smash::OutputParameters::ic_extended
bool ic_extended
Extended initial conditions output.
Definition: outputparameters.h:165
ThermodynamicQuantity::LandauVelocity
@ LandauVelocity
smash::LExperiment
static constexpr int LExperiment
Definition: outputparameters.h:19
smash::OutputParameters::td_jQBS
bool td_jQBS
Print out QBS 4-currents or not?
Definition: outputparameters.h:138
smash::OutputParameters::td_v_landau
bool td_v_landau
Print out Landau velocity of type td_dens_type or not?
Definition: outputparameters.h:135
smash::logg
std::array< einhard::Logger<>, std::tuple_size< LogArea::AreaTuple >::value > logg
An array that stores all pre-configured Logger objects.
Definition: logging.cc:39
smash::OutputParameters::td_position
ThreeVector td_position
Point, where thermodynamic quantities are calculated.
Definition: outputparameters.h:117
smash::OutputParameters::part_extended
bool part_extended
Extended format for particles output.
Definition: outputparameters.h:147
smash::OutputParameters::photons_extended
bool photons_extended
Extended format for photon output.
Definition: outputparameters.h:162
ThermodynamicQuantity::Tmn
@ Tmn
smash::OutputParameters::td_rho_eckart
bool td_rho_eckart
Print out Eckart rest frame density of type td_dens_type or not?
Definition: outputparameters.h:123
smash::OutputParameters::coll_extended
bool coll_extended
Extended format for collisions output.
Definition: outputparameters.h:153
smash::OutputParameters::coll_printstartend
bool coll_printstartend
Print initial and final particles in event into collision output.
Definition: outputparameters.h:156
smash::OutputParameters::td_tmn
bool td_tmn
Print out energy-momentum tensor of type td_dens_type or not?
Definition: outputparameters.h:126
OutputOnlyFinal::Yes
@ Yes
Print only final-state particles.
ThermodynamicQuantity::EckartDensity
@ EckartDensity
smash::OutputParameters::OutputParameters
OutputParameters()
Default constructor, useful for tests.
Definition: outputparameters.h:27
smash::OutputParameters::part_only_final
OutputOnlyFinal part_only_final
Print only final particles in event.
Definition: outputparameters.h:150
smash::OutputParameters::td_dens_type
DensityType td_dens_type
Type (e.g., baryon/pion/hadron) of thermodynamic quantity.
Definition: outputparameters.h:120
smash::DensityType::None
@ None
ThermodynamicQuantity::j_QBS
@ j_QBS
smash::DensityType::Baryon
@ Baryon
SMASH_SOURCE_LOCATION
#define SMASH_SOURCE_LOCATION
Hackery that is required to output the location in the source code where the log statement occurs.
Definition: logging.h:243
smash::OutputParameters::td_smearing
bool td_smearing
Whether smearing is on or off; WARNING : if smearing is off, then final result is in GeV instead of G...
Definition: outputparameters.h:144
smash::OutputParameters::subcon_for_rivet
Configuration subcon_for_rivet
Rivet specfic setup configurations.
Definition: outputparameters.h:168
smash::OutputParameters::dil_extended
bool dil_extended
Extended format for dilepton output.
Definition: outputparameters.h:159
smash::OutputParameters::td_tmn_landau
bool td_tmn_landau
Print out energy-momentum tensor in Landau rest frame (of type td_dens_type) or not?
Definition: outputparameters.h:132