17#include <fairlogger/Logger.h>
26std::vector<std::string>
split(
const std::string&
value,
char sep)
28 std::vector<std::string> out;
31 while (std::getline(
stream, token, sep)) {
42 const std::string& envelope,
double minEnergyGeV)
49 for (
const auto& model : mModels) {
51 SetModelParticles(model,
"all");
58 for (
const auto& model : mModels) {
59 if (model ==
"toyAbsorber") {
60 LOG(info) <<
"fast simulation: registering model " << model <<
" on envelope '" << mEnvelope
61 <<
"' above " << mMinEnergy <<
" GeV";
64 LOG(error) <<
"fast simulation: unknown model " << model <<
"; ignored";
77 LOG(info) <<
"fast simulation is ENABLED on envelope '" <<
params.fastSimEnvelope <<
"'";
87 return TG4RunConfiguration::CreateUserPostDetConstruction();
89 std::vector<FastSimRegionConstruction::ModelRegions> wanted;
90 wanted.reserve(models.size());
91 for (
auto& model : models) {
92 wanted.push_back({model,
params.fastSimEnvelope,
params.fastSimRegions});
static const G4Params & Instance()
Creates and registers the models named in G4.fastSimModels.
void Construct() override
G4FastSimulation(std::vector< std::string > models, const std::string &envelope, double minEnergyGeV)
TG4VUserFastSimulation * CreateUserFastSimulation() override
TG4VUserPostDetConstruction * CreateUserPostDetConstruction() override
GLsizei const GLfloat * value
GLenum const GLfloat * params
std::vector< std::string > split(const std::string &str, char delimiter=',')
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"