2021-02-13 17:38:38 -05:00
|
|
|
/*
|
|
|
|
Nucleus.h
|
|
|
|
Nucleus is a derived class of Vec4. A nucleus is the kinematics is essentially a 4 vector with the
|
|
|
|
additional properties of the number of total nucleons (A), the number of protons (Z), a ground state mass,
|
|
|
|
an exctitation energy, and an isotopic symbol.
|
|
|
|
|
|
|
|
--GWM Jan 2021
|
|
|
|
*/
|
2020-11-16 13:38:39 -05:00
|
|
|
#ifndef NUCLEUS_H
|
|
|
|
#define NUCLEUS_H
|
|
|
|
|
2020-12-11 16:56:27 -05:00
|
|
|
#include "Vec4.h"
|
2020-11-16 13:38:39 -05:00
|
|
|
#include <string>
|
|
|
|
|
2020-12-11 16:56:27 -05:00
|
|
|
namespace Mask {
|
|
|
|
|
|
|
|
class Nucleus : public Vec4 {
|
2020-11-16 13:38:39 -05:00
|
|
|
public:
|
|
|
|
Nucleus();
|
|
|
|
Nucleus(int Z, int A);
|
|
|
|
Nucleus(int Z, int A, double px, double py, double pz, double E);
|
|
|
|
~Nucleus();
|
|
|
|
bool SetIsotope(int Z, int A);
|
2021-04-12 10:22:35 -04:00
|
|
|
inline void SetThetaCM(double tcm) { m_theta_cm = tcm; }; //save theta in rxn CM frame
|
2020-11-16 13:38:39 -05:00
|
|
|
inline int GetZ() const { return m_z; };
|
|
|
|
inline int GetA() const { return m_a; };
|
|
|
|
inline double GetExcitationEnergy() const { return GetInvMass() - m_gs_mass; };
|
|
|
|
inline double GetGroundStateMass() const { return m_gs_mass; };
|
|
|
|
inline const char* GetIsotopicSymbol() const { return m_symbol.c_str(); };
|
2021-04-12 10:22:35 -04:00
|
|
|
inline double GetThetaCM() const { return m_theta_cm; };
|
2021-09-03 17:03:41 -04:00
|
|
|
inline void SetDetected() { m_detectFlag = true; };
|
|
|
|
inline void SetNotDetected() { m_detectFlag = false; };
|
|
|
|
inline bool IsDetected() { return m_detectFlag; };
|
2020-11-16 13:38:39 -05:00
|
|
|
|
|
|
|
inline Nucleus& operator=(const Nucleus& rhs) {
|
|
|
|
SetIsotope(rhs.GetZ(), rhs.GetA());
|
|
|
|
SetVectorCartesian(rhs.GetPx(), rhs.GetPy(), rhs.GetPz(), rhs.GetE());
|
2021-04-12 10:22:35 -04:00
|
|
|
SetThetaCM(rhs.GetThetaCM());
|
2020-11-16 13:38:39 -05:00
|
|
|
return *this;
|
|
|
|
};
|
|
|
|
|
2021-02-13 17:38:38 -05:00
|
|
|
//Conservation of nucleons and momentum
|
|
|
|
inline Nucleus operator+(const Nucleus& daughter) {
|
2020-11-16 13:38:39 -05:00
|
|
|
return Nucleus(GetZ()+daughter.GetZ(), GetA()+daughter.GetA(), GetPx()+daughter.GetPx(), GetPy()+daughter.GetPy(), GetPz()+daughter.GetPz(), GetE()+daughter.GetE());
|
|
|
|
};
|
|
|
|
inline Nucleus operator-(const Nucleus& daughter) {
|
|
|
|
return (GetZ() - daughter.GetZ()) <= 0 || (GetA() - daughter.GetA()) <= 0 ? Nucleus() :
|
|
|
|
Nucleus(GetZ()-daughter.GetZ(), GetA() - daughter.GetA(), GetPx()-daughter.GetPx(), GetPy()-daughter.GetPy(), GetPz()-daughter.GetPz(), GetE()-daughter.GetE());
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
private:
|
|
|
|
int m_z, m_a;
|
|
|
|
double m_gs_mass;
|
2021-04-12 10:22:35 -04:00
|
|
|
double m_theta_cm;
|
2020-11-16 13:38:39 -05:00
|
|
|
std::string m_symbol;
|
|
|
|
|
2021-09-03 17:03:41 -04:00
|
|
|
bool m_detectFlag;
|
|
|
|
|
2020-11-16 13:38:39 -05:00
|
|
|
};
|
|
|
|
|
2020-12-11 16:56:27 -05:00
|
|
|
};
|
|
|
|
|
2020-11-16 13:38:39 -05:00
|
|
|
#endif
|