Commit b0f1ecd5 authored by Lennart Huth's avatar Lennart Huth
Browse files

beeing pedantic

parent 06683da6
...@@ -60,11 +60,12 @@ Detector::Detector(const Configuration& config) : m_role(DetectorRole::NONE) { ...@@ -60,11 +60,12 @@ Detector::Detector(const Configuration& config) : m_role(DetectorRole::NONE) {
// Material budget of detector, including support material // Material budget of detector, including support material
if(!config.has("material_budget")) { if(!config.has("material_budget")) {
LOG(WARNING) << "No material budget given for " << m_detectorName << ", assuming zero"; LOG(WARNING) << "No material budget given for " << m_detectorName << ", assuming zero";
} } else if(config.get<double>("material_budget") < 0) {
m_materialBudget = config.get<double>("material_budget", 0.0);
if(m_materialBudget < 0) {
throw InvalidValueError(config, "material_budget", "Material budget is negative"); throw InvalidValueError(config, "material_budget", "Material budget is negative");
} else {
m_materialBudget = config.get<double>("material_budget");
} }
// Intrinsic position resolution, defaults to 4um: // Intrinsic position resolution, defaults to 4um:
m_resolution = config.get<ROOT::Math::XYVector>("resolution", ROOT::Math::XYVector(0.004, 0.004)); m_resolution = config.get<ROOT::Math::XYVector>("resolution", ROOT::Math::XYVector(0.004, 0.004));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment