40 static const std::map<std::string, G4APrime::DecayMode> decay_lut = {
41 {
"no_decay", G4APrime::DecayMode::NoDecay},
42 {
"flat_decay", G4APrime::DecayMode::FlatDecay},
43 {
"geant_decay", G4APrime::DecayMode::GeantDecay}};
45 decay_lut.find(model.get<std::string>(
"decay_mode",
"no_decay"))};
46 if (decay_it == decay_lut.end()) {
49 "Unrecognized decay mode '" + model.get<std::string>(
"decay_mode") +
51 " options are 'no_decay', 'flat_decay', or 'geant_decay'.");
54 double ap_tau = model.get<
double>(
"ap_tau", -1.0);
63 G4APrime::Initialize(
ap_mass_, 622, ap_tau, decay_it->second);
70 auto model_name{model.get<std::string>(
"name")};
71 if (model_name ==
"vertex_library" or model_name ==
"g4db") {
72 static const std::map<std::string, g4db::G4DarkBreMModel::ScalingMethod>
75 g4db::G4DarkBreMModel::ScalingMethod::ForwardOnly},
76 {
"cm_scaling", g4db::G4DarkBreMModel::ScalingMethod::CMScaling},
77 {
"undefined", g4db::G4DarkBreMModel::ScalingMethod::Undefined}};
78 auto scaling_method_it{method_lut.find(model.get<std::string>(
"method"))};
79 if (scaling_method_it == method_lut.end()) {
82 "Unrecognized scaling method '" + model.get<std::string>(
"method") +
84 " options are 'forward_only', 'cm_scaling', or 'undefined'.");
88 process_ = std::make_unique<G4DarkBremsstrahlung>(
89 std::make_shared<g4db::G4DarkBreMModel>(
90 model.get<std::string>(
"library_path"),
94 model.get<
double>(
"threshold"), model.get<
double>(
"epsilon"),
95 scaling_method_it->second,
96 g4db::G4DarkBreMModel::XsecMethod::Auto,
97 model.get<
double>(
"max_R_for_full", 50.0),
98 model.get<
int>(
"aprime_lhe_id", 1023),
100 model.get<
bool>(
"scale_APrime",
false),
101 model.get<
double>(
"dist_decay_min", 0.0),
102 model.get<
double>(
"dist_decay_max", 1.0)),
108 EXCEPTION_RAISE(
"BadConf",
109 "Unrecognized model name '" + model_name +
"'.");
111 ldmx_log(trace) <<
"Initialization of dark brem complete";