Commit 2f996d8b authored by Pawel Sznajder's avatar Pawel Sznajder
Browse files

set default units in configure

parent 9b6ea18b
......@@ -87,7 +87,7 @@ void ConvolCoeffFunctionKinematic::configure(
PhysicalUnit(parameters.getLastAvailable().getString()).getType();
setXi(value, unit);
} else {
setXi(value);
setXi(value, PhysicalUnit::NONE);
}
} else {
errorMissingParameter(GPDKinematic::KINEMATIC_PARAMETER_NAME_XI);
......@@ -105,7 +105,7 @@ void ConvolCoeffFunctionKinematic::configure(
PhysicalUnit(parameters.getLastAvailable().getString()).getType();
setT(value, unit);
} else {
setT(value);
setT(value, PhysicalUnit::GEV2);
}
} else {
errorMissingParameter(GPDKinematic::KINEMATIC_PARAMETER_NAME_T);
......@@ -123,7 +123,7 @@ void ConvolCoeffFunctionKinematic::configure(
PhysicalUnit(parameters.getLastAvailable().getString()).getType();
setMuF2(value, unit);
} else {
setMuF2(value);
setMuF2(value, PhysicalUnit::GEV2);
}
} else {
errorMissingParameter(GPDKinematic::KINEMATIC_PARAMETER_NAME_MUF2);
......@@ -141,7 +141,7 @@ void ConvolCoeffFunctionKinematic::configure(
PhysicalUnit(parameters.getLastAvailable().getString()).getType();
setMuR2(value, unit);
} else {
setMuR2(value);
setMuR2(value, PhysicalUnit::GEV2);
}
} else {
errorMissingParameter(GPDKinematic::KINEMATIC_PARAMETER_NAME_MUR2);
......
......@@ -78,7 +78,7 @@ void DVCSConvolCoeffFunctionKinematic::configure(
PhysicalUnit(parameters.getLastAvailable().getString()).getType();
setQ2(value, unit);
} else {
setQ2(value);
setQ2(value, PhysicalUnit::GEV2);
}
} else {
errorMissingParameter(
......@@ -101,9 +101,9 @@ std::string DVCSConvolCoeffFunctionKinematic::toString() const {
void DVCSConvolCoeffFunctionKinematic::updateHashSum() const {
setHashSum(
Partons::getInstance()->getServiceObjectRegistry()->getCryptographicHashService()->generateSHA1HashSum(
ElemUtils::Formatter() << m_xi.toStdString() << m_t.toStdString()
<< m_Q2.toStdString() << m_MuF2.toStdString()
<< m_MuR2.toStdString()));
ElemUtils::Formatter() << m_xi.toStdString()
<< m_t.toStdString() << m_Q2.toStdString()
<< m_MuF2.toStdString() << m_MuR2.toStdString()));
}
void DVCSConvolCoeffFunctionKinematic::serialize(
......
......@@ -78,7 +78,7 @@ void TCSConvolCoeffFunctionKinematic::configure(
PhysicalUnit(parameters.getLastAvailable().getString()).getType();
setQ2Prim(value, unit);
} else {
setQ2Prim(value);
setQ2Prim(value, PhysicalUnit::GEV2);
}
} else {
errorMissingParameter(
......
......@@ -104,7 +104,7 @@ void GPDKinematic::configure(const ElemUtils::Parameters &parameters) {
PhysicalUnit(parameters.getLastAvailable().getString()).getType();
setX(value, unit);
} else {
setX(value);
setX(value, PhysicalUnit::NONE);
}
} else {
errorMissingParameter(GPDKinematic::KINEMATIC_PARAMETER_NAME_X);
......@@ -122,7 +122,7 @@ void GPDKinematic::configure(const ElemUtils::Parameters &parameters) {
PhysicalUnit(parameters.getLastAvailable().getString()).getType();
setXi(value, unit);
} else {
setXi(value);
setXi(value, PhysicalUnit::NONE);
}
} else {
errorMissingParameter(GPDKinematic::KINEMATIC_PARAMETER_NAME_XI);
......@@ -140,7 +140,7 @@ void GPDKinematic::configure(const ElemUtils::Parameters &parameters) {
PhysicalUnit(parameters.getLastAvailable().getString()).getType();
setT(value, unit);
} else {
setT(value);
setT(value, PhysicalUnit::GEV2);
}
} else {
errorMissingParameter(GPDKinematic::KINEMATIC_PARAMETER_NAME_T);
......@@ -158,7 +158,7 @@ void GPDKinematic::configure(const ElemUtils::Parameters &parameters) {
PhysicalUnit(parameters.getLastAvailable().getString()).getType();
setMuF2(value, unit);
} else {
setMuF2(value);
setMuF2(value, PhysicalUnit::GEV2);
}
} else {
errorMissingParameter(GPDKinematic::KINEMATIC_PARAMETER_NAME_MUF2);
......@@ -176,7 +176,7 @@ void GPDKinematic::configure(const ElemUtils::Parameters &parameters) {
PhysicalUnit(parameters.getLastAvailable().getString()).getType();
setMuR2(value, unit);
} else {
setMuR2(value);
setMuR2(value, PhysicalUnit::GEV2);
}
} else {
errorMissingParameter(GPDKinematic::KINEMATIC_PARAMETER_NAME_MUR2);
......@@ -235,9 +235,9 @@ bool GPDKinematic::operator !=(const GPDKinematic& other) const {
void GPDKinematic::updateHashSum() const {
setHashSum(
Partons::getInstance()->getServiceObjectRegistry()->getCryptographicHashService()->generateSHA1HashSum(
ElemUtils::Formatter() << m_x.toStdString() << m_xi.toStdString()
<< m_t.toStdString() << m_MuF2.toStdString()
<< m_MuR2.toStdString()));
ElemUtils::Formatter() << m_x.toStdString()
<< m_xi.toStdString() << m_t.toStdString()
<< m_MuF2.toStdString() << m_MuR2.toStdString()));
}
const PhysicalType<double>& GPDKinematic::getX() const {
......
......@@ -112,7 +112,7 @@ void DVCSObservableKinematic::configure(
PhysicalUnit(parameters.getLastAvailable().getString()).getType();
setXB(value, unit);
} else {
setXB(value);
setXB(value, PhysicalUnit::NONE);
}
} else {
errorMissingParameter(
......@@ -131,7 +131,7 @@ void DVCSObservableKinematic::configure(
PhysicalUnit(parameters.getLastAvailable().getString()).getType();
setT(value, unit);
} else {
setT(value);
setT(value, PhysicalUnit::GEV2);
}
} else {
errorMissingParameter(GPDKinematic::KINEMATIC_PARAMETER_NAME_T);
......@@ -150,7 +150,7 @@ void DVCSObservableKinematic::configure(
PhysicalUnit(parameters.getLastAvailable().getString()).getType();
setQ2(value, unit);
} else {
setQ2(value);
setQ2(value, PhysicalUnit::GEV2);
}
} else {
errorMissingParameter(
......@@ -170,7 +170,7 @@ void DVCSObservableKinematic::configure(
PhysicalUnit(parameters.getLastAvailable().getString()).getType();
setE(value, unit);
} else {
setE(value);
setE(value, PhysicalUnit::GEV);
}
} else {
errorMissingParameter(
......@@ -190,7 +190,7 @@ void DVCSObservableKinematic::configure(
PhysicalUnit(parameters.getLastAvailable().getString()).getType();
setPhi(value, unit);
} else {
setPhi(value);
setPhi(value, PhysicalUnit::DEG);
}
} else {
errorMissingParameter(
......
......@@ -112,7 +112,7 @@ void TCSObservableKinematic::configure(
PhysicalUnit(parameters.getLastAvailable().getString()).getType();
setT(value, unit);
} else {
setT(value);
setT(value, PhysicalUnit::GEV2);
}
} else {
errorMissingParameter(GPDKinematic::KINEMATIC_PARAMETER_NAME_T);
......@@ -131,7 +131,7 @@ void TCSObservableKinematic::configure(
PhysicalUnit(parameters.getLastAvailable().getString()).getType();
setQ2Prim(value, unit);
} else {
setQ2Prim(value);
setQ2Prim(value, PhysicalUnit::GEV2);
}
} else {
errorMissingParameter(
......@@ -151,7 +151,7 @@ void TCSObservableKinematic::configure(
PhysicalUnit(parameters.getLastAvailable().getString()).getType();
setE(value, unit);
} else {
setE(value);
setE(value, PhysicalUnit::GEV);
}
} else {
errorMissingParameter(
......@@ -171,7 +171,7 @@ void TCSObservableKinematic::configure(
PhysicalUnit(parameters.getLastAvailable().getString()).getType();
setPhi(value, unit);
} else {
setPhi(value);
setPhi(value, PhysicalUnit::DEG);
}
} else {
errorMissingParameter(
......@@ -191,7 +191,7 @@ void TCSObservableKinematic::configure(
PhysicalUnit(parameters.getLastAvailable().getString()).getType();
setTheta(value, unit);
} else {
setTheta(value);
setTheta(value, PhysicalUnit::DEG);
}
} else {
errorMissingParameter(
......
Supports Markdown
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