Commit cf258a4e authored by Adrien Matta's avatar Adrien Matta
Browse files

* renaming NPNucleus into NPParticle

        - adding a typedef of NPParticle into NPNucleus to solve
        backward compatibility
        - changing QFS and Reaction to match new terminology
parent 32378f47
Pipeline #83607 passed with stages
in 10 minutes and 48 seconds
add_custom_command(OUTPUT NPNucleusDict.cxx COMMAND ${CMAKE_BINARY_DIR}/scripts/build_dict.sh NPNucleus.h NPNucleusDict.cxx NPNucleus.rootmap libNPPhysics.so NPNucleusLinkDef.h DEPENDS NPNucleus.h NPNucleusLinkDef.h)
add_custom_command(OUTPUT NPParticleDict.cxx COMMAND ${CMAKE_BINARY_DIR}/scripts/build_dict.sh NPParticle.h NPParticleDict.cxx NPParticle.rootmap libNPPhysics.so NPParticleLinkDef.h DEPENDS NPParticle.h NPParticleLinkDef.h)
add_custom_command(OUTPUT NPReactionDict.cxx COMMAND ${CMAKE_BINARY_DIR}/scripts/build_dict.sh NPReaction.h NPReactionDict.cxx NPReaction.rootmap libNPPhysics.so NPReactionLinkDef.h DEPENDS NPReaction.h NPReactionLinkDef.h)
......@@ -14,7 +14,7 @@ add_custom_command(OUTPUT TInteractionCoordinatesDict.cxx COMMAND ${CMAKE_BINARY
add_custom_command(OUTPUT TReactionConditionsDict.cxx COMMAND ${CMAKE_BINARY_DIR}/scripts/build_dict.sh TReactionConditions.h TReactionConditionsDict.cxx TReactionConditions.rootmap libNPReactionConditions.so DEPENDS TReactionConditions.h)
add_library(NPPhysics SHARED NPDecay.cxx NPBeam.cxx NPEnergyLoss.cxx NPFunction.cxx NPNucleus.cxx NPReaction.cxx NPQFS.cxx NPNucleusDict.cxx NPReactionDict.cxx NPQFSDict.cxx NPEnergyLossDict.cxx )
add_library(NPPhysics SHARED NPDecay.cxx NPBeam.cxx NPEnergyLoss.cxx NPFunction.cxx NPParticle.cxx NPReaction.cxx NPQFS.cxx NPParticleDict.cxx NPReactionDict.cxx NPQFSDict.cxx NPEnergyLossDict.cxx )
target_link_libraries(NPPhysics ${ROOT_LIBRARIES} Physics NPCore)
add_library(NPInitialConditions SHARED TInitialConditions.cxx TInitialConditionsDict.cxx )
......@@ -26,4 +26,4 @@ target_link_libraries(NPInteractionCoordinates ${ROOT_LIBRARIES} )
add_library(NPReactionConditions SHARED TReactionConditions.cxx TReactionConditionsDict.cxx)
target_link_libraries(NPReactionConditions ${ROOT_LIBRARIES} )
install(FILES NPDecay.h NPBeam.h NPEnergyLoss.h NPFunction.h NPNucleus.h NPReaction.h NPQFS.h TInitialConditions.h TInteractionCoordinates.h TReactionConditions.h DESTINATION ${CMAKE_INCLUDE_OUTPUT_DIRECTORY})
install(FILES NPDecay.h NPBeam.h NPEnergyLoss.h NPFunction.h NPParticle.h NPNucleus.h NPReaction.h NPQFS.h TInitialConditions.h TInteractionCoordinates.h TReactionConditions.h DESTINATION ${CMAKE_INCLUDE_OUTPUT_DIRECTORY})
......@@ -35,13 +35,11 @@
using namespace std;
// NPL header
#include "NPNucleus.h"
#include "NPParticle.h"
#include "NPInputParser.h"
using namespace NPL;
namespace NPL{
class Beam:public NPL::Nucleus{
class Beam:public NPL::Particle{
public: // Constructors and Destructors
Beam();
......@@ -56,7 +54,7 @@ namespace NPL{
int fVerboseLevel;
private:
//Nucleus* fBeamNucleus;
//Particle* fBeamParticle;
double fEnergy;
double fExcitationEnergy;
double fSigmaEnergy;
......@@ -78,7 +76,7 @@ namespace NPL{
public:
// Getters and Setters
// Set
// void SetBeamNucleus (Nucleus* BeamNucleus) {delete fBeamNucleus ; fBeamNucleus = new Nucleus(BeamNucleus->GetZ(),BeamNucleus->GetA());}
// void SetBeamParticle (Particle* BeamParticle) {delete fBeamParticle ; fBeamParticle = new Particle(BeamParticle->GetZ(),BeamParticle->GetA());}
void SetEnergy (double Energy) {fEnergy=Energy;}
void SetExcitationEnergy(double Excitation) {fExcitationEnergy=Excitation;}
void SetSigmaEnergy (double SigmaEnergy) {fSigmaEnergy=SigmaEnergy;}
......@@ -96,7 +94,7 @@ namespace NPL{
void SetVerboseLevel(int verbose) {fVerboseLevel = verbose;}
// Get
// Nucleus* GetNucleus () const {return fBeamNucleus;}
// Particle* GetParticle () const {return fBeamParticle;}
double GetEnergy () const {return fEnergy;}
double GetExcitationEnergy() const {return fExcitationEnergy;}
double GetSigmaEnergy () const {return fSigmaEnergy;}
......
......@@ -40,6 +40,7 @@
// Root
#include "TH1D.h"
#include "TGenPhaseSpace.h"
namespace NPL{
// A given decay Path
class SingleDecay{
......
#ifndef NPNUCLEUS_h
#define NPNUCLEUS_h
/*****************************************************************************
* Copyright (C) 2009-2016 this file is part of the NPTool Project *
* *
* For the licensing terms see $NPTOOL/Licence/NPTool_Licence *
* For the list of contributors see $NPTOOL/Licence/Contributors *
*****************************************************************************/
/*****************************************************************************
* Original Author: Adrien MATTA contact address: a.matta@surrey.ac.uk *
* *
* Creation Date : febuary 2009 *
* Last update : *
*---------------------------------------------------------------------------*
* Decription: *
* This class manage a nucleus, data are read in the nubtab03.asc file *
* *
*---------------------------------------------------------------------------*
* Comment: *
* *
* *
* *
*****************************************************************************/
// ROOT headers
#include "TLorentzVector.h"
// NPTOOL headers
#include "NPGlobalSystemOfUnits.h"
#include "NPPhysicalConstants.h"
#ifdef NP_SYSTEM_OF_UNITS_H
using namespace NPUNITS;
#endif
#ifdef HEP_PHYSICAL_CONSTANTS_H
using namespace CLHEP;
#endif
// C++ headers
#include <string>
using namespace std;
#include <iostream>
namespace NPL {
class Nucleus {
public:
Nucleus();
Nucleus(string isotope);
Nucleus(string isotope, const string& pathENSDF);
Nucleus(int Z, int A);
Nucleus(string name, vector<string> subpart, double binding,double Ex=0, string SpinParity="", double Spin=0, string Parity="", double LifeTime=-1);
virtual ~Nucleus();
#include "NPParticle.h"
namespace NPL{
typedef Particle Nucleus;
public:
void SetUp(string isotope);
void LoadENSDF(const string& isotope, const string& pathENSDF);
private :
//intrinsic properties
string fName; // Nucleus name
string fNucleusName;
int fCharge; // Nucleus charge
int fAtomicWeight; // Nucleus atomic weight
double fMassExcess; // Nucleus mass excess in keV
double fMass;
string fSpinParity; // Nucleus spin and parity
double fSpin; // Nucleus spin
string fParity; // Nucleus parity
double fLifeTime; // life time
double fLifeTimeErr; // life time error
double fExcitationEnergy; // Excitation Energy
//kinematic properties
double fKineticEnergy;
double fBeta;
double fGamma;
double fBrho;
double fTimeOfFlight;
double fVelocity;
TLorentzVector fEnergyImpulsion;
// ENSDF list of levels
vector<double> fLevelEnergy; // list of level energies
vector<double> fLevelEnergyUncertainty; // list of level energies uncertainty
public:
void EnergyToBrho(double Q=-1000);
void EnergyToTof();
void BetaToVelocity();
void BrhoToEnergy(double Q=-1000);
void BrhoToTof() {BrhoToEnergy(); EnergyToTof();}
void TofToEnergy();
void TofToBrho() {TofToEnergy(); EnergyToBrho();}
void EnergyToBeta();
void BetaToEnergy();
void BetaToGamma();
double DopplerCorrection(double EnergyLabGamma, double ThetaLabGamma);
protected :
void Extract(string line);
public :
void GetNucleusName();
string GetName() const {return fName;}
int GetZ() const {return fCharge;}
int GetA() const {return fAtomicWeight;}
double GetMassExcess() const {return fMassExcess;}
string GetSpinParity() const {return fSpinParity;}
double GetSpin() const {return fSpin;}
string GetParity() const {return fParity;}
double GetLifeTime() const {return fLifeTime;}
double GetLifeTimeError() const {return fLifeTimeErr;}
double GetEnergy() const {return fKineticEnergy;}
double GetBrho() const {return fBrho;}
double GetTimeOfFlight() const {return fTimeOfFlight;}
double GetBeta() const {return fBeta;}
double GetGamma() const {return fGamma;}
double GetVelocity() const {return fVelocity;}
TLorentzVector GetEnergyImpulsion() const {return fEnergyImpulsion;}
double GetExcitationEnergy() const {return fExcitationEnergy;}
void SetName(const char* name) {fName = name;}
void SetZ(int charge) {fCharge = charge;}
void SetA(int mass) {fAtomicWeight = mass;}
void SetMassExcess(double massexcess) {fMassExcess = massexcess;}
void SetSpinParity(const char* spinparity) {fSpinParity = spinparity;}
void SetSpin(double spin) {fSpin = spin;}
void SetParity(const char* parity) {fParity = parity;}
void SetLifeTime(double LifeTime) {fLifeTime=LifeTime;}
void SetLifeTimeError(double LifeTimeErr) {fLifeTimeErr=LifeTimeErr;}
void SetKineticEnergy(double energy) {fKineticEnergy = energy; EnergyToBrho(); EnergyToTof(); EnergyToBeta(); BetaToGamma();BetaToVelocity();}
void SetBrho(double brho) {fBrho = brho; BrhoToEnergy(); BrhoToTof(); EnergyToBeta(); BetaToGamma();BetaToVelocity();}
void SetTimeOfFlight(double tof) {fTimeOfFlight = tof; TofToEnergy(); TofToBrho(); EnergyToBeta(); BetaToGamma();BetaToVelocity();}
void SetEnergyImpulsion(TLorentzVector P) {fEnergyImpulsion = P;
fKineticEnergy = P.E() - Mass();
EnergyToBrho();
EnergyToTof();
EnergyToBeta();
BetaToGamma();
BetaToVelocity();}
void SetExcitationEnergy(double Ex) {fExcitationEnergy=Ex;}
void SetBeta(double beta) {fBeta = beta; BetaToGamma(); BetaToEnergy(); EnergyToTof(); EnergyToBrho();BetaToVelocity();}
double GetEnergyCM(double EnergyLab, double ThetaLab, double PhiLab, double relativisticboost);
double GetThetaCM(double EnergyLab, double ThetaLab, double PhiLab, double relativisticboost);
// Nuclear mass in MeV
double Mass() const {return (fAtomicWeight*amu_c2 + fMassExcess/1000. - fCharge*electron_mass_c2+fExcitationEnergy);}
double GetBindingEnergy() const {return (fCharge*proton_mass_c2 + (fAtomicWeight-fCharge)*neutron_mass_c2 + fCharge*electron_mass_c2 - fAtomicWeight*amu_c2 - fMassExcess/1000);}
void Print() const ;
public:
void DefineMassByThreshold(const vector<string>& v); // Define the mass as the sum of the mass of the particle named in v
void DefineMassByThreshold(const vector<NPL::Nucleus>& N); // Define the mass as the sum of the mass of the particle defined in N
public:
double GetSn() const;
double GetSp() const;
double GetS2n() const;
double GetS2p() const;
double GetSt() const;
double GetS3He() const;
double GetSa() const;
double GetSXn(unsigned int X) const;
double GetSXp(unsigned int X) const;
void PrintThreshold() const;
// methods for ENSDF
public:
unsigned int GetNumberOfLevels() {return fLevelEnergy.size();}
vector<double> GetLevelEnergyList() {return fLevelEnergy;}
vector<double> GetLevelEnergyUncertaintyList() {return fLevelEnergyUncertainty;}
double GetLevelEnergy(Int_t i) {return fLevelEnergy[i];}
double GetLevelEnergyUncertainty(Int_t i){return fLevelEnergyUncertainty[i];}
ClassDef(Nucleus,0)
};
}
}
#endif
......@@ -12,7 +12,7 @@
* Last update : may 2012 morfouac@ipno.in2p3.fr *
*---------------------------------------------------------------------------*
* Decription: *
* This class manage a nucleus, data are read in the nubtab12.asc file *
* This class manage a particle, data are read in the nubtab12.asc file *
* *
*---------------------------------------------------------------------------*
* Comment: *
......@@ -22,7 +22,7 @@
*****************************************************************************/
// NPTOOL headers
#include "NPNucleus.h"
#include "NPParticle.h"
#include "NPCore.h"
using namespace NPL;
......@@ -43,10 +43,10 @@ using namespace std;
ClassImp(Nucleus)
ClassImp(Particle)
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Nucleus::Nucleus(){
Particle::Particle(){
//----------- Default Constructor ----------
fName= "XX DEFAULT XX";
fCharge= 0;
......@@ -61,25 +61,25 @@ Nucleus::Nucleus(){
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Nucleus::Nucleus(string name){
Particle::Particle(string name){
SetUp(name);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Nucleus::Nucleus(string name, const string& path){
Particle::Particle(string name, const string& path){
SetUp(name);
LoadENSDF(name, path);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Nucleus::Nucleus(string name, vector<string> subpart, double binding,double Ex, string SpinParity, double Spin, string Parity, double LifeTime){
Particle::Particle(string name, vector<string> subpart, double binding,double Ex, string SpinParity, double Spin, string Parity, double LifeTime){
fName= name;
fCharge= 0;
fAtomicWeight= 0;
unsigned int size = subpart.size();
double Mass = 0;
for(unsigned int i = 0 ; i < size ; i++){
Nucleus N = Nucleus(subpart[i]);
Particle N = Particle(subpart[i]);
Mass+= N.Mass();
fAtomicWeight+= N.GetA();
fCharge+= N.GetZ();
......@@ -97,7 +97,7 @@ Nucleus::Nucleus(string name, vector<string> subpart, double binding,double Ex,
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void Nucleus::LoadENSDF(const string& isotope, const string& pathENSDF)
void Particle::LoadENSDF(const string& isotope, const string& pathENSDF)
{
// open file to read
TString fileName = Form("%s/AR_%s.ens", pathENSDF.c_str(), isotope.c_str());
......@@ -179,7 +179,7 @@ void Nucleus::LoadENSDF(const string& isotope, const string& pathENSDF)
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void Nucleus::SetUp(string name){
void Particle::SetUp(string name){
if(name=="electron"){
fName = "electron";
fCharge = -1;
......@@ -254,7 +254,7 @@ void Nucleus::SetUp(string name){
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Nucleus::Nucleus(int Z, int A)
Particle::Particle(int Z, int A)
{
//----------- Constructor Using nubtab12.asc by Z and A----------
......@@ -298,12 +298,12 @@ Nucleus::Nucleus(int Z, int A)
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Nucleus::~Nucleus()
Particle::~Particle()
{
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void Nucleus::Extract(string line){
void Particle::Extract(string line){
// name of the isotope
fName = line.substr(11,7);
// charge and mass
......@@ -440,12 +440,12 @@ void Nucleus::Extract(string line){
if (s_spinparity.find("17/2") != string::npos) fSpin = 8.5 ;
if (s_spinparity.find("19/2") != string::npos) fSpin = 9.5 ;
if (s_spinparity.find("21/2") != string::npos) fSpin = 10.5 ;
GetNucleusName();
GetParticleName();
fMass=Mass();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void Nucleus::Print() const
void Particle::Print() const
{
//------------ Imprime a l'ecran les caracteristiques d'un noyau -------
cout << endl;
......@@ -456,12 +456,12 @@ void Nucleus::Print() const
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void Nucleus::GetNucleusName() {
fNucleusName.assign(fName);
void Particle::GetParticleName() {
fParticleName.assign(fName);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void Nucleus::EnergyToBrho(double Q){
void Particle::EnergyToBrho(double Q){
if(Q==-1000)
Q=GetZ();
......@@ -470,19 +470,19 @@ void Nucleus::EnergyToBrho(double Q){
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void Nucleus::EnergyToTof(){
void Particle::EnergyToTof(){
fTimeOfFlight = 1/sqrt(1-(Mass()*Mass())/(fKineticEnergy+Mass())/(fKineticEnergy+Mass()))/(c_light*1e6);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void Nucleus::TofToEnergy() {
void Particle::TofToEnergy() {
double Energy = sqrt( Mass()*Mass()/(1-pow((1/((c_light*1e6)*fTimeOfFlight)),2)) );
fKineticEnergy = Energy - Mass();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void Nucleus::BrhoToEnergy(double Q ){
void Particle::BrhoToEnergy(double Q ){
if(Q==-1000)
Q=GetZ();
......@@ -491,27 +491,27 @@ void Nucleus::BrhoToEnergy(double Q ){
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void Nucleus::EnergyToBeta(){
void Particle::EnergyToBeta(){
fBeta = sqrt(pow(fKineticEnergy,2) + 2*fKineticEnergy*Mass())/(fKineticEnergy + Mass());
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void Nucleus::BetaToEnergy(){
void Particle::BetaToEnergy(){
fKineticEnergy = Mass()/sqrt(1-pow(fBeta,2)) - Mass();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void Nucleus::BetaToGamma(){
void Particle::BetaToGamma(){
fGamma = 1/sqrt(1-pow(fBeta,2));
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void Nucleus::BetaToVelocity(){
void Particle::BetaToVelocity(){
fVelocity = (c_light*1e6)*fBeta*1e-7;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
double Nucleus::DopplerCorrection(double EnergyLabGamma, double ThetaLabGamma){
double Particle::DopplerCorrection(double EnergyLabGamma, double ThetaLabGamma){
double EnergyGammaCorrected = EnergyLabGamma*(1-fBeta*cos(ThetaLabGamma))/( sqrt(1-pow(fBeta,2)) );
return EnergyGammaCorrected;
......@@ -519,7 +519,7 @@ double Nucleus::DopplerCorrection(double EnergyLabGamma, double ThetaLabGamma){
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
double Nucleus::GetEnergyCM(double EnergyLab, double ThetaLab, double PhiLab, double relativisticboost){
double Particle::GetEnergyCM(double EnergyLab, double ThetaLab, double PhiLab, double relativisticboost){
SetKineticEnergy(EnergyLab);
double EnergyCM;
double ImpulsionLab;
......@@ -547,7 +547,7 @@ double Nucleus::GetEnergyCM(double EnergyLab, double ThetaLab, double PhiLab, do
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
double Nucleus::GetThetaCM(double EnergyLab, double ThetaLab, double PhiLab, double relativisticboost){
double Particle::GetThetaCM(double EnergyLab, double ThetaLab, double PhiLab, double relativisticboost){
SetKineticEnergy(EnergyLab);
double EnergyCM;
double ThetaCM;
......@@ -577,18 +577,18 @@ double Nucleus::GetThetaCM(double EnergyLab, double ThetaLab, double PhiLab, dou
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void Nucleus::DefineMassByThreshold(const vector<string>& v){
void Particle::DefineMassByThreshold(const vector<string>& v){
// Define the mass as the sum of the mass of the particle named in v
unsigned int size = v.size();
vector<NPL::Nucleus> N;
vector<NPL::Particle> N;
for(unsigned int i = 0 ; i < size ; i++)
N.push_back(NPL::Nucleus(v[i]));
N.push_back(NPL::Particle(v[i]));
DefineMassByThreshold(N);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void Nucleus::DefineMassByThreshold(const vector<NPL::Nucleus>& N){
void Particle::DefineMassByThreshold(const vector<NPL::Particle>& N){
// Define the mass as the sum of the mass of the particle defined in N
unsigned int size = N.size();
double Mass = 0;
......@@ -601,7 +601,7 @@ void Nucleus::DefineMassByThreshold(const vector<NPL::Nucleus>& N){
}
// Check the threshold make any sense (same A, same Z):
if(A!=GetA()|| Z!=GetZ()){
NPL::SendWarning("NPL::Nucleus","Mass and charge is not conserved in DefineMassByThreshold! Doing no change to nucleus");
NPL::SendWarning("NPL::Particle","Mass and charge is not conserved in DefineMassByThreshold! Doing no change to particle");
return;
}
......@@ -611,52 +611,52 @@ void Nucleus::DefineMassByThreshold(const vector<NPL::Nucleus>& N){
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
double Nucleus::GetSXn(unsigned int X) const {
Nucleus N(GetZ(),GetA()-X);
double Particle::GetSXn(unsigned int X) const {
Particle N(GetZ(),GetA()-X);
return N.Mass()+X*neutron_mass_c2-Mass();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
double Nucleus::GetSXp(unsigned int X) const {
Nucleus N(GetZ()-X,GetA()-X);
double Particle::GetSXp(unsigned int X) const {
Particle N(GetZ()-X,GetA()-X);
return N.Mass()+X*proton_mass_c2-Mass();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
double Nucleus::GetSn() const {
double Particle::GetSn() const {
return GetSXn(1);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
double Nucleus::GetSp() const {
double Particle::GetSp() const {
return GetSXp(1);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
double Nucleus::GetS2n() const {
double Particle::GetS2n() const {
return GetSXn(2);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
double Nucleus::GetS2p() const {
double Particle::GetS2p() const {
return GetSXp(2);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
double Nucleus::GetSt() const {
Nucleus N(GetZ()-1,GetA()-3);
Nucleus A(1,3);
double Particle::GetSt() const {
Particle N(GetZ()-1,GetA()-3);
Particle A(1,3);
return N.Mass()+A.Mass()-Mass();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
double Nucleus::GetS3He() const {
Nucleus N(GetZ()-2,GetA()-3);
Nucleus A(2,3);
double Particle::GetS3He() const {
Particle N(GetZ()-2,GetA()-3);
Particle A(2,3);
return N.Mass()+A.Mass()-Mass();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
double Nucleus::GetSa() const {
Nucleus N(GetZ()-2,GetA()-4);
Nucleus A(2,4);
double Particle::GetSa() const {
Particle N(GetZ()-2,GetA()-4);
Particle A(2,4);
return N.Mass()+A.Mass()-Mass();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void Nucleus::PrintThreshold() const {
void Particle::PrintThreshold() const {
cout << GetName() << " thresholds : " << endl;
cout << " Sn : " << GetSn() << " MeV" << endl;
cout << " Sp : " << GetSp() << " MeV" << endl;
......
#ifndef NPPARTICLE_h
#define NPPARTICLE_h
/*****************************************************************************
* Copyright (C) 2009-2016 this file is part of the NPTool Project *
* *
* For the licensing terms see $NPTOOL/Licence/NPTool_Licence *
* For the list of contributors see $NPTOOL/Licence/Contributors *
*****************************************************************************/
/*****************************************************************************
* Original Author: Adrien MATTA contact address: a.matta@surrey.ac.uk *
* *
* Creation Date : febuary 2009 *
* Last update : *
*---------------------------------------------------------------------------*
* Decription: *
* This class manage a particle, data are read in the nubtab03.asc file *
* *
*---------------------------------------------------------------------------*
* Comment: *
* *
* *
* *
*****************************************************************************/
// ROOT headers
#include "TLorentzVector.h"
// NPTOOL headers
#include "NPGlobalSystemOfUnits.h"
#include "NPPhysicalConstants.h"
#ifdef NP_SYSTEM_OF_UNITS_H
using namespace NPUNITS;
#endif
#ifdef HEP_PHYSICAL_CONSTANTS_H
using namespace CLHEP;
#endif
// C++ headers
#include <string>
using namespace std;
#include <iostream>
namespace NPL {
class Particle {