14 #include <boost/filesystem.hpp>
102 file_{path /
"SMASH_IC.dat",
"w"},
106 "# %s initial conditions: hypersurface of constant proper time\n",
108 std::fprintf(
file_.
get(),
"# tau x y eta mt px py Rap pdg charge\n");
109 std::fprintf(
file_.
get(),
"# fm fm fm none GeV GeV GeV none none e\n");
116 std::fprintf(
file_.
get(),
"# event %i start\n", event_number);
121 std::fprintf(
file_.
get(),
"# event %i end\n", event_number);
127 "End time might be too small for initial conditions output. "
128 "Hypersurface has not yet been crossed by ",
129 particles.
size(),
" particle(s).");
134 const std::unique_ptr<Clock> &,
147 const double m_trans =
152 const double rapidity =
162 std::fprintf(
file_.
get(),
"%g %g %g %g %g %g %g %g %s %i \n",
174 const double next_proper_time = particle.
position().
tau();
176 throw std::runtime_error(
177 "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.
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.
ICOutput(const bf::path &path, const std::string &name, const OutputParameters &out_par)
Create a new 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.
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.
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
Hypersurface crossing Particles are removed from the evolution and printed to a separate output to se...
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.