49 static const std::map<std::string, G4APrime::DecayMode> decay_lut = {
50 {
"no_decay", G4APrime::DecayMode::NoDecay},
51 {
"flat_decay", G4APrime::DecayMode::FlatDecay},
52 {
"geant_decay", G4APrime::DecayMode::GeantDecay}};
53 auto decay_it{decay_lut.find(
54 model.getParameter<std::string>(
"decay_mode",
"no_decay"))};
55 if (decay_it == decay_lut.end()) {
58 "Unrecognized decay mode '" +
59 model.getParameter<std::string>(
"decay_mode") +
61 " options are 'no_decay', 'flat_decay', or 'geant_decay'.");
64 double ap_tau = model.getParameter<
double>(
"ap_tau", -1.0);
73 G4APrime::Initialize(
ap_mass_, 622, ap_tau, decay_it->second);
81 auto model_name{model.
getParameter<std::string>(
"name")};
82 if (model_name ==
"vertex_library" or model_name ==
"g4db") {
83 static const std::map<std::string, g4db::G4DarkBreMModel::ScalingMethod>
86 g4db::G4DarkBreMModel::ScalingMethod::ForwardOnly},
87 {
"cm_scaling", g4db::G4DarkBreMModel::ScalingMethod::CMScaling},
88 {
"undefined", g4db::G4DarkBreMModel::ScalingMethod::Undefined}};
89 auto scaling_method_it{
90 method_lut.find(model.getParameter<std::string>(
"method"))};
91 if (scaling_method_it == method_lut.end()) {
94 "Unrecognized scaling method '" +
95 model.getParameter<std::string>(
"method") +
97 " options are 'forward_only', 'cm_scaling', or 'undefined'.");
101 process_ = std::make_unique<G4DarkBremsstrahlung>(
102 std::make_shared<g4db::G4DarkBreMModel>(
103 model.getParameter<std::string>(
"library_path"),
107 model.getParameter<
double>(
"threshold"),
108 model.getParameter<
double>(
"epsilon"), scaling_method_it->second,
109 g4db::G4DarkBreMModel::XsecMethod::Auto,
110 model.getParameter<
double>(
"max_R_for_full", 50.0),
111 model.getParameter<
int>(
"aprime_lhe_id", 622),
113 model.getParameter<
bool>(
"scale_APrime",
false),
114 model.getParameter<
double>(
"dist_decay_min", 0.0),
115 model.getParameter<
double>(
"dist_decay_max", 1.0)),
121 EXCEPTION_RAISE(
"BadConf",
122 "Unrecognized model name '" + model_name +
"'.");
124 G4cout <<
"[ APrimePhysics ] : Initialization of dark brem complete"