104 file_{path /
"SMASH_IC.dat",
"w"},
108 "# %s initial conditions: hypersurface of constant proper time\n",
111 "# tau x y eta mt px py Rap pdg charge "
112 "baryon_number strangeness\n");
114 "# fm fm fm none GeV GeV GeV none none e "
122 std::fprintf(
file_.
get(),
"# event %i start\n", event_number);
127 std::fprintf(
file_.
get(),
"# event %i end\n", event_number);
133 "End time might be too small for initial conditions output. "
134 "Hypersurface has not yet been crossed by ",
135 particles.
size(),
" particle(s).");
140 const std::unique_ptr<Clock> &,
153 const double m_trans =
158 const double rapidity =
168 std::fprintf(
file_.
get(),
"%g %g %g %g %g %g %g %g %s %i %i %i \n",
182 const double next_proper_time = particle.
position().
tau();
184 throw std::runtime_error(
185 "Hypersurface proper time changed during evolution.");
Action is the base class for a generic process that takes a number of incoming particles and transfor...
virtual ProcessType get_type() const
Get the process type.
const ParticleList & incoming_particles() const
Get the list of particles that go into the action.
A class to pre-calculate and store parameters relevant for density calculation.
double eta() const
calculate the space-time rapidity from the given four vector
double tau() const
calculate the proper time from the given four vector
RenamingFilePtr file_
Pointer to output file.
ICOutput(const std::filesystem::path &path, const std::string &name, const OutputParameters &out_par)
Create a new IC output.
double IC_proper_time_
Proper time of the particles removed when extracting initial conditions.
void at_eventend(const Particles &particles, const int event_number, const EventInfo &event) override
Write event end line.
void at_interaction(const Action &action, const double) override
Write particle data at the hypersurface crossing point to the IC output.
void at_eventstart(const Particles &, const int event_number, const EventInfo &) override
Write event start line.
void at_intermediate_time(const Particles &, const std::unique_ptr< Clock > &, const DensityParameters &, const EventInfo &) override
Unused, but needed since virtually declared in mother class.
Abstraction of generic output.
ParticleData contains the dynamic information of a certain particle.
PdgCode pdgcode() const
Get the pdgcode of the particle.
const ParticleType & type() const
Get the type of the particle.
const FourVector & momentum() const
Get the particle's 4-momentum.
double effective_mass() const
Get the particle's effective mass.
HistoryData get_history() const
Get history information.
const FourVector & position() const
Get the particle's position in Minkowski space.
int32_t charge() const
The charge of the particle.
int baryon_number() const
The Particles class abstracts the storage and manipulation of particles.
std::string string() const
FILE * get()
Get the underlying FILE* pointer.
std::array< einhard::Logger<>, std::tuple_size< LogArea::AreaTuple >::value > logg
An array that stores all pre-configured Logger objects.
static constexpr int LHyperSurfaceCrossing
@ HyperSurfaceCrossing
See here for a short description.
constexpr double really_small
Numerical error tolerance.
Structure to contain custom data for output.
bool impose_kinematic_cut_for_SMASH_IC
Whether or not kinematic cuts are employed for SMASH IC.
int32_t collisions_per_particle
Collision counter per particle, zero only for initially present particles.
Helper structure for Experiment to hold output options and parameters.