46 lines
2.4 KiB
C++
Executable File
46 lines
2.4 KiB
C++
Executable File
#ifndef INJECTOR_GENERATOR_H
|
|
#define INJECTOR_GENERATOR_H
|
|
|
|
#include <map>
|
|
#include <memory>
|
|
#include "simulation/injector.h"
|
|
#include "simulation/jansson_additionals.h"
|
|
#include "simulation/parameter.h"
|
|
#include "simulation/species.h"
|
|
|
|
namespace generator {
|
|
|
|
// return a shared_ptr to an Injector object described in the Parameter object
|
|
// the tracked_species should contain all TrackedSpecie objects that are considered in the simulation
|
|
// (background_species is not used)
|
|
// Parameter has to have a json-object "Injector" in the root object
|
|
// - in "Injector" a json-object "CreatedSpecies" has to exist, which
|
|
// consists of one more arbitrarily named json-objects
|
|
// these json-objects have to contain:
|
|
// - a json-string "TrackedSpecieName", which has to correspond to one
|
|
// of the strings used to describe the TrackedSpecies in the "Tracked" json-object of the same Paramter file
|
|
// - a json-object "CreationVelocityDistribution" following the description in "generators/velocity_distribution_generator.h"
|
|
// - a json-object "EventPositionDistribution" has to exit
|
|
// - therein a json-object "ScalarField" has to exist, which describes the distribution from which positions will be drawn (following the
|
|
// description in "generators/scalar_field_generator.h")
|
|
// - a json-object "DensityLimit", which has to contain
|
|
// - a json-double "min", which described the minimal density value of the used density distribution
|
|
// - a json-double "max", which described the maximal density value of the used density distribution
|
|
// - a json-object "PositionLimits" consisting of three json-object "rPosition", "phiPosition" and "zPosition", which
|
|
// all have the same sturcture:
|
|
// - a json-double "min", describing the minimum value that a drawn position should have
|
|
// - a json-double "max", describing the maximum value that a drawn position should have
|
|
// - a json-object "MotherDriftVelocity", which has a form as described in "generators/drift_velocity_generator.h"
|
|
//
|
|
// (example in "simulation_config/parameter_katrin_example.json")
|
|
std::shared_ptr<Injector> buildInjector(
|
|
std::map<std::string, std::shared_ptr<species::TrackedSpecie>>&
|
|
tracked_species,
|
|
std::map<std::string, std::shared_ptr<species::BackgroundSpecie>>&
|
|
background_species,
|
|
Parameter& parameter);
|
|
|
|
};
|
|
|
|
#endif /* INJECTOR_GENERATOR_H */
|