7 #ifndef SRC_INCLUDE_SMASH_OUTPUTPARAMETERS_H_
8 #define SRC_INCLUDE_SMASH_OUTPUTPARAMETERS_H_
30 std::optional<std::map<std::string, std::string>>
logs{std::nullopt};
32 std::optional<std::vector<std::string>>
paths{std::nullopt};
34 std::optional<std::vector<std::string>>
preloads{std::nullopt};
36 std::optional<std::vector<std::string>>
analyses{std::nullopt};
88 if (thermo_conf.has_value({
"Position"})) {
89 const std::array<double, 3> a = thermo_conf.
take({
"Position"});
92 std::set<ThermodynamicQuantity> quan = thermo_conf.take({
"Quantities"});
102 "Requested Thermodynamics output with Density type None. ",
103 "Change the density type to avoid output being dropped.");
105 td_smearing = thermo_conf.take({
"Smearing"},
true);
115 if (conf.has_value({
"Collisions"})) {
116 coll_extended = conf.take({
"Collisions",
"Extended"},
false);
117 coll_printstartend = conf.take({
"Collisions",
"Print_Start_End"},
false);
120 if (conf.has_value({
"Dileptons"})) {
121 dil_extended = conf.take({
"Dileptons",
"Extended"},
false);
124 if (conf.has_value({
"Photons"})) {
125 photons_extended = conf.take({
"Photons",
"Extended"},
false);
128 if (conf.has_value({
"Initial_Conditions"})) {
129 ic_extended = conf.take({
"Initial_Conditions",
"Extended"},
false);
132 if (conf.has_value({
"Rivet"})) {
133 auto rivet_conf = conf.extract_sub_configuration({
"Rivet"});
134 logg[
LOutput].debug() <<
"Reading Rivet section from configuration:\n"
135 << rivet_conf.to_string() <<
"\n";
152 if (rivet_conf.has_value({
"Logging"})) {
153 rivet_parameters.logs =
154 make_optional<std::map<std::string, std::string>>(
155 rivet_conf.take({
"Logging"}));
157 if (rivet_conf.has_value({
"Paths"})) {
158 rivet_parameters.paths =
159 make_optional<std::vector<std::string>>(rivet_conf.take({
"Paths"}));
161 if (rivet_conf.has_value({
"Preloads"})) {
162 rivet_parameters.preloads = make_optional<std::vector<std::string>>(
163 rivet_conf.take({
"Preloads"}));
165 if (rivet_conf.has_value({
"Analyses"})) {
166 rivet_parameters.analyses = make_optional<std::vector<std::string>>(
167 rivet_conf.take({
"Analyses"}));
169 if (rivet_conf.has_value({
"Cross_Section"})) {
170 rivet_parameters.cross_sections = make_optional<std::array<double, 2>>(
171 rivet_conf.take({
"Cross_Section"}));
173 rivet_parameters.ignore_beams = rivet_conf.take({
"Ignore_Beams"},
true);
174 if (rivet_conf.has_value({
"Weights"})) {
175 rivet_parameters.any_weight_parameter_was_given =
true;
176 if (rivet_conf.has_value({
"Weights",
"Select"})) {
177 rivet_parameters.to_be_enabled_weights =
178 make_optional<std::vector<std::string>>(
179 rivet_conf.take({
"Weights",
"Select"}));
181 if (rivet_conf.has_value({
"Weights",
"Deselect"})) {
182 rivet_parameters.to_be_disabled_weights =
183 make_optional<std::vector<std::string>>(
184 rivet_conf.take({
"Weights",
"Deselect"}));
186 if (rivet_conf.has_value({
"Weights",
"Nominal"})) {
187 rivet_parameters.nominal_weight_name = make_optional<std::string>(
188 rivet_conf.take({
"Weights",
"Nominal"}));
190 if (rivet_conf.has_value({
"Weights",
"Cap"})) {
191 rivet_parameters.cap_on_weights =
192 make_optional<double>(rivet_conf.take({
"Weights",
"Cap"}));
194 if (rivet_conf.has_value({
"Weights",
"NLO_Smearing"})) {
195 rivet_parameters.nlo_smearing = make_optional<double>(
196 rivet_conf.take({
"Weights",
"NLO_Smearing"}));
198 if (rivet_conf.has_value({
"Weights",
"No_Multi"})) {
199 rivet_parameters.no_multi_weight =
200 make_optional<bool>(rivet_conf.take({
"Weights",
"No_Multi"}));
203 logg[
LOutput].debug() <<
"After processing configuration:\n"
204 << rivet_conf.to_string() <<
"\n";
214 if (name ==
"Collisions") {
215 return coll_extended;
216 }
else if (name ==
"Dileptons") {
218 }
else if (name ==
"Photons") {
219 return photons_extended;
Interface to the SMASH configuration files.
bool has_value(std::initializer_list< const char * > keys) const
Return whether there is a non-empty value behind the requested keys.
Configuration extract_sub_configuration(std::initializer_list< const char * > keys, Configuration::GetEmpty empty_if_not_existing=Configuration::GetEmpty::No)
Create a new configuration from a then-removed section of the present object.
Value take(std::initializer_list< const char * > keys)
The default interface for SMASH to read configuration values.
The ThreeVector class represents a physical three-vector with the components .
@ EckartDensity
Density in the Eckart frame.
@ Tmn
Energy-momentum tensor in lab frame.
@ LandauVelocity
Velocity of the Landau rest frame.
@ j_QBS
Electric (Q), baryonic (B) and strange (S) currents.
@ TmnLandau
Energy-momentum tensor in Landau rest frame.
OutputOnlyFinal
Whether and when only final state particles should be printed.
@ Yes
Print only final-state particles.
#define SMASH_SOURCE_LOCATION
Hackery that is required to output the location in the source code where the log statement occurs.
std::array< einhard::Logger<>, std::tuple_size< LogArea::AreaTuple >::value > logg
An array that stores all pre-configured Logger objects.
static constexpr int LExperiment
static constexpr int LOutput
DensityType
Allows to choose which kind of density to calculate.
Helper structure for Experiment to hold output options and parameters.
bool dil_extended
Extended format for dilepton output.
OutputParameters()
Default constructor, useful for tests.
bool coll_extended
Extended format for collisions output.
bool part_extended
Extended format for particles output.
bool photons_extended
Extended format for photon output.
bool td_v_landau
Print out Landau velocity of type td_dens_type or not?
bool td_tmn_landau
Print out energy-momentum tensor in Landau rest frame (of type td_dens_type) or not?
RivetOutputParameters rivet_parameters
Rivet specfic parameters.
bool td_jQBS
Print out QBS 4-currents or not?
OutputOnlyFinal part_only_final
Print only final particles in event.
DensityType td_dens_type
Type (e.g., baryon/pion/hadron) of thermodynamic quantity.
OutputParameters(Configuration conf)
Constructor from configuration.
bool td_tmn
Print out energy-momentum tensor of type td_dens_type or not?
bool td_smearing
Whether smearing is on or off; WARNING : if smearing is off, then final result is in GeV instead of G...
bool td_rho_eckart
Print out Eckart rest frame density of type td_dens_type or not?
bool td_only_participants
Flag reporting whether only participants are considered (true) or also spectators (false)
bool ic_extended
Extended initial conditions output.
ThreeVector td_position
Point, where thermodynamic quantities are calculated.
bool get_coll_extended(std::string name) const
Pass correct extended flag to binary collision output constructor.
bool coll_printstartend
Print initial and final particles in event into collision output.
Helper structure for OutputParameters in order to store and hand over Rivet parameters.
std::optional< std::vector< std::string > > to_be_enabled_weights
Weights to be enabled for processing.
std::optional< std::string > nominal_weight_name
Nominal weight name.
std::optional< std::map< std::string, std::string > > logs
Logging in Rivet.
std::optional< std::vector< std::string > > preloads
Data files to pre-load e.g., for centrality configurations.
std::optional< std::vector< std::string > > paths
Paths to analyses libraries and data.
std::optional< double > nlo_smearing
How to smear for NLO calculations.
std::optional< std::vector< std::string > > analyses
Analyses (including options) to add to run.
bool ignore_beams
Whether Rivet should ignore beams.
std::optional< double > cap_on_weights
Cap (maximum) on weights.
std::optional< bool > no_multi_weight
Whether Rivet should not care about multi weights.
std::optional< std::vector< std::string > > to_be_disabled_weights
Weights to be disabled for processing.
bool any_weight_parameter_was_given
Whether any weight parameter was specified.
std::optional< std::array< double, 2 > > cross_sections
Cross sections.