Commit ad218d68 authored by Pawel Sznajder's avatar Pawel Sznajder
Browse files

cosmetics

parent c8ef34da
......@@ -32,35 +32,25 @@ public:
virtual void configure(const ElemUtils::Parameters &parameters);
/**
* Get mass number.
* Set mass number and atomic number.
*/
size_t getA() const;
void setAZ(size_t A, size_t Z);
/**
* Set mass number.
* Get mass number.
*/
void setA(size_t A);
size_t getA() const;
/**
* Get atomic number.
*/
size_t getZ() const;
/**
* Set atomic number.
*/
void setZ(size_t Z);
/**
* Get neutron number.
*/
size_t getN() const;
/**
* Set neutron number.
*/
void setN(size_t N);
protected:
/**
......
......@@ -10,6 +10,7 @@
#include <string>
#include "../../../beans/nuclei/Nuclei.h"
#include "../../../utils/type/PhysicalType.h"
#include "TCSXiConverterModule.h"
......@@ -23,7 +24,8 @@ namespace PARTONS {
* \f$\tau = Q'^{2}/(s-M^{2})\f$
* \f$\xi = \tau/(2 - \tau)\f$
*/
class TCSXiConverterTauToXiNucleiSimple: public TCSXiConverterModule {
class TCSXiConverterTauToXiNucleiSimple: public TCSXiConverterModule,
public Nuclei {
public:
......@@ -42,7 +44,8 @@ public:
* Copy constructor.
* @param other Object to be copied.
*/
TCSXiConverterTauToXiNucleiSimple(const TCSXiConverterTauToXiNucleiSimple &other);
TCSXiConverterTauToXiNucleiSimple(
const TCSXiConverterTauToXiNucleiSimple &other);
/**
* Destructor.
......
......@@ -78,40 +78,24 @@ void Nuclei::isWellConfigured() const {
}
}
size_t Nuclei::getA() const {
return m_A;
}
void Nuclei::setAZ(size_t A, size_t Z) {
void Nuclei::setA(size_t a) {
m_A = A;
m_Z = Z;
m_A = a;
isWellConfigured();
}
size_t Nuclei::getZ() const {
return m_Z;
size_t Nuclei::getA() const {
return m_A;
}
void Nuclei::setZ(size_t z) {
m_Z = z;
isWellConfigured();
size_t Nuclei::getZ() const {
return m_Z;
}
size_t Nuclei::getN() const {
return m_A - m_Z;
}
void Nuclei::setN(size_t N) {
if (N > m_A) {
throw ElemUtils::CustomException(m_className, __func__,
ElemUtils::Formatter()
<< "Number of neutrons higher than mass number, N = "
<< N << " A = " << m_A);
}
m_Z = m_A - N;
}
} /* namespace PARTONS */
......@@ -52,6 +52,11 @@ void TCSProcessBDP01NucleiSimple::configure(
void TCSProcessBDP01NucleiSimple::initModule() {
//USE THESE VARIABLES
//m_A;
//m_Z;
//
//run for mother
ProcessModule<TCSObservableKinematic, TCSObservableResult>::initModule();
......
......@@ -11,14 +11,17 @@ namespace PARTONS {
const unsigned int TCSXiConverterTauToXiNucleiSimple::classId =
BaseObjectRegistry::getInstance()->registerBaseObject(
new TCSXiConverterTauToXiNucleiSimple("TCSXiConverterTauToXiNucleiSimple"));
new TCSXiConverterTauToXiNucleiSimple(
"TCSXiConverterTauToXiNucleiSimple"));
TCSXiConverterTauToXiNucleiSimple::TCSXiConverterTauToXiNucleiSimple(const std::string &className) :
TCSXiConverterModule(className) {
TCSXiConverterTauToXiNucleiSimple::TCSXiConverterTauToXiNucleiSimple(
const std::string &className) :
TCSXiConverterModule(className), Nuclei(className) {
}
TCSXiConverterTauToXiNucleiSimple::TCSXiConverterTauToXiNucleiSimple(const TCSXiConverterTauToXiNucleiSimple &other) :
TCSXiConverterModule(other) {
TCSXiConverterTauToXiNucleiSimple::TCSXiConverterTauToXiNucleiSimple(
const TCSXiConverterTauToXiNucleiSimple &other) :
TCSXiConverterModule(other), Nuclei(other) {
}
TCSXiConverterTauToXiNucleiSimple::~TCSXiConverterTauToXiNucleiSimple() {
......@@ -31,6 +34,11 @@ TCSXiConverterTauToXiNucleiSimple* TCSXiConverterTauToXiNucleiSimple::clone() co
PhysicalType<double> TCSXiConverterTauToXiNucleiSimple::compute(
const TCSObservableKinematic& kinematic) {
//USE THESE VARIABLES
//m_A;
//m_Z;
//
double s =
pow(Constant::PROTON_MASS, 2)
+ 2. * Constant::PROTON_MASS
......
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