10TReaction::TReaction(
const char* beam, 
const char* targ, 
const char* ejec, 
const char* reco, 
double eBeam, 
double ex3, 
bool inverse)
 
   11   : fTBeam(eBeam), fInverse(inverse), fExc(ex3)
 
   20   for(
int i = 0; i < 4; i++) {
 
   27      SetName(Form(
"%s(%s,%s)%s", beam, targ, ejec, reco));
 
   29      SetName(Form(
"%s(%s,%s)%s", targ, beam, ejec, reco));
 
 
   68   gStyle->SetTitleYOffset(1.5);
 
   69   gStyle->SetTitleXOffset(1.2);
 
   70   gStyle->SetDrawOption(
"AC");
 
 
   85   fPCm[0] = sqrt((
fS - pow(
fM[0] - 
fM[1], 2)) * (
fS - pow(
fM[0] + 
fM[1], 2))) / (2 * sqrt(
fS));
 
   87   fPCm[2] = sqrt((
fS - pow(exc + 
fM[2] - 
fM[3], 2)) * (
fS - pow(exc + 
fM[2] + 
fM[3], 2))) / (2 * sqrt(
fS));
 
   90   for(
int i = 0; i < 4; i++) {
 
   91      fECm[i] = sqrt(pow(
fM[i], 2) + pow(
fPCm[i], 2));
 
   94      fGCm[i] = 1 / sqrt(1 - pow(
fVCm[i], 2));
 
  103         } 
else if(val < 1.001) {   
 
 
  116   if(part == 0 || part == 1) {
 
 
  125   if(part == 0 || part == 1) {
 
  130   return ELab - 
fM[part];   
 
 
  135   if(part == 0 || part == 1) {
 
 
  146   if(part == 0 || part == 1) {
 
  151   double Pperp = 
fPCm[part] * sin(theta_cm);
 
  152   return sqrt(pow(Pperp, 2) + pow(Pz, 2));
 
 
  157   if(part == 0 || part == 1) {
 
  162   return 1 / sqrt(1 - pow(VLab, 2));
 
 
  167   if(ekin == 0.00 && theta_lab == 0.00) {
 
  171   double val1 = pow(
fM[0] + 
fM[1], 2) + pow(
fM[2], 2) + 2 * 
fM[1] * 
fTLab[0];
 
  172   double val2 = 2 * 
fCmG * sqrt(pow(
fM[0] + 
fM[1], 2) + 2 * 
fM[1] * 
fTLab[0]);
 
  173   double val3 = 
fM[2] + ekin - 
fCmV * sqrt(pow(ekin, 2) + 2 * 
fM[2] * ekin) * TMath::Cos(theta_lab);
 
  175   return sqrt(val1 - val2 * val3) - 
fM[3];
 
 
  194   return sqrt(pow(ekin, 2) + 2 * 
fM[part] * ekin) / (ekin + 
fM[part]);
 
 
  202   static const double alpha = 1.29596;   
 
  209   double a = pow(
fNuc[0]->GetZ() * 
fNuc[1]->GetZ() / 
fTLab[0], 2);
 
  210   return scale * alpha * a / pow(sin(theta_cm / 2), 4);   
 
 
  224   theta_lab = std::max(theta_lab, 
fThetaMax[part]);
 
  227   double gtan2    = pow(tan(theta_lab) * 
fCmG, 2);
 
  229   double expr     = sqrt(1 + gtan2 * (1 - pow(x, 2)));
 
  230   double theta_cm = 0.;
 
  233   if(tan(theta_lab) >= 0) {
 
  234      theta_cm = acos((-x * gtan2 + expr) / (1 + gtan2));
 
  236      theta_cm = acos((-x * gtan2 - expr) / (1 + gtan2));
 
  240      theta_cm = 
PI - theta_cm;
 
  244      theta_cm = -theta_cm;
 
 
  268      theta_cm = 
PI - theta_cm;
 
  271   double theta_lab = TMath::ATan2(sin(theta_cm), 
fCmG * (cos(theta_cm) + 
fCmV / 
fVCm[part]));
 
 
  284      theta_cm = 
PI - theta_cm;
 
  286   double val1 = pow(pow(sin(theta_cm), 2) + pow(
fCmG * (x + cos(theta_cm)), 2), 1.5);
 
  287   double val2 = (
fCmG * (1 + x * cos(theta_cm)));
 
 
  305   auto*       g     = 
new TGraph();
 
  306   const char* frame = Form(
"%s", Frame_Lab ? 
"Lab" : 
"Cm");
 
  308   g->SetName(Form(
"KinVsTheta%s_%s", frame, GetName()));
 
  310      Form(
"Kinematics for %s; Theta_{%s} [deg]; Kinetic energy [%s]", GetName(), frame, Units_keV ? 
"keV" : 
"MeV"));
 
  315   for(
int i = 0; i <= 180; i++) {
 
  316      theta = 
static_cast<double>(i);   
 
  329      if(theta < thmin || theta > thmax) {
 
  332      g->SetPoint(i, theta, T);
 
 
  341   auto*       g     = 
new TGraph();
 
  342   const char* frame = Form(
"%s", Frame_Lab ? 
"Lab" : 
"Cm");
 
  343   const char* other = Form(
"%s", !Frame_Lab ? 
"Lab" : 
"Cm");
 
  345   g->SetName(Form(
"ThetaVsTheta%s_%s", frame, GetName()));
 
  346   g->SetTitle(Form(
"Angle conversion for %s; Theta_{%s} [deg]; Theta_{%s} [deg]", GetName(), frame, other));
 
  348   double theta_cm  = 0.;
 
  349   double theta_lab = 0.;
 
  351   for(
int i = 0; i <= 180; i++) {
 
  352      theta_cm  = 
static_cast<double>(i);   
 
  355      if((Frame_Lab && (theta_lab < thmin || theta_lab > thmax))) {
 
  358      if(!Frame_Lab && (theta_cm < thmin || theta_cm > thmax)) {
 
  364         g->SetPoint(i, theta_lab, theta_cm);
 
  366         g->SetPoint(i, theta_cm, theta_lab);
 
 
  376   auto*       g     = 
new TGraph();
 
  377   const char* frame = Form(
"%s", Frame_Lab ? 
"Lab" : 
"Cm");
 
  378   const char* other = Form(
"%s", !Frame_Lab ? 
"Lab" : 
"Cm");
 
  380   g->SetName(Form(
"%s_OmegaVsTheta%s", GetName(), frame));
 
  381   g->SetTitle(Form(
"Solid angle conversion for %s; Theta_{%s} [deg]; dOmega_{%s} / dOmega_{%s}", GetName(), frame,
 
  386   for(
int i = 0; i <= 180; i++) {
 
  388      theta = 
static_cast<double>(i);   
 
  396      if(theta < thmin || theta > thmax || Om > 1e3) {   
 
  399      g->SetPoint(g->GetN(), theta, Om);
 
 
  408   auto*       g     = 
new TGraph();
 
  409   const char* frame = Form(
"%s", Frame_Lab ? 
"Lab" : 
"Cm");
 
  411   g->SetName(Form(
"%s_RutherfordVsTheta%s", GetName(), frame));
 
  412   g->SetTitle(Form(
"Rutherford cross section for %s; Theta_{%s} [deg]; dSigma / dOmega_{%s} [%s/sr]", GetName(), frame,
 
  413                    frame, Units_mb ? 
"mb" : 
"fm^2"));
 
  418   for(
int i = 1; i <= 180; i++) {
 
  419      theta = 
static_cast<double>(i);   
 
  428      if(theta < thmin || theta > thmax) {
 
  431      g->SetPoint(g->GetN(), theta, R);
 
 
  442   std::cout << std::endl
 
  444             << 
" * * * * * * * * * * * * * * * * * * * * * * * * *" << std::endl;
 
  445   std::cout << std::endl
 
  447             << 
"\tTReaction  '" << GetName() << 
"' :" << std::endl
 
  450   std::cout << 
" -> Beam '" << 
fNuc[0]->GetName() << 
"' kinetic energy = " << 
fTBeam << 
" [MeV]" << std::endl;
 
  451   std::cout << 
" -> Reaction Q value (total)   = " << 
fQVal << 
" [MeV]" << std::endl;
 
  452   std::cout << 
" -> Reaction kinematics type   = '" << (
fInverse ? 
"INVERSE" : 
"NORMAL") << 
"'" << std::endl;
 
  454      std::cout << std::endl
 
  455                << 
" Inverse beam '" << 
fNuc[1]->GetName() << 
"' [lab frame] :- " << std::endl;
 
  456      std::cout << 
"\t Kinetic energy = " << (
fGLab[0] - 1) * 
fM[1] << 
" [MeV]" << std::endl;
 
  457      std::cout << 
"\t Velocity       = " << 
fVLab[0] << 
" [/c] " << std::endl;
 
  460   std::cout << std::endl
 
  461             << 
" Center of mass motion :- " << std::endl;
 
  462   std::cout << 
"\t CmE  = " << 
fCmE << 
" [MeV]" << std::endl;
 
  463   std::cout << 
"\t CmTi = " << 
fCmTi << 
" [MeV]" << std::endl;
 
  464   std::cout << 
"\t CmTf = " << 
fCmTf << 
" [MeV]" << std::endl;
 
  465   std::cout << 
"\t CmV  = " << 
fCmV << 
" [/c]" << std::endl;
 
  466   std::cout << 
"\t CmP  = " << 
fCmP << 
" [MeV/c]" << std::endl;
 
  467   std::cout << 
"\t CmG  = " << 
fCmG << std::endl;
 
  468   std::cout << std::endl;
 
  470   if(pstring.find(
"all") != std::string::npos) {
 
  471      for(
int i = 0; i < 4; i++) {
 
  472         std::cout << std::endl
 
  473                   << 
" Particle " << i << 
" : '" << 
fNuc[i]->GetName() << 
"' : \t A = " << 
fNuc[i]->
GetA() << 
", Z = " << 
fNuc[i]->
GetZ() << 
", Mass = " << 
fM[i] << 
" [MeV]" << std::endl;
 
  476            std::cout << 
"\t ECm = " << 
fECm[i] << 
" [MeV]\t\t ELab = " << 
fELab[i] << 
" [MeV]" << std::endl;
 
  477            std::cout << 
"\t TCm = " << 
fTCm[i] << 
" [MeV]\t\t TLab = " << 
fTLab[i] << 
" [MeV]" << std::endl;
 
  478            std::cout << 
"\t VCm = " << 
fVCm[i] << 
" [/c]\t\t VLab = " << 
fVLab[i] << 
" [/c]" << std::endl;
 
  479            std::cout << 
"\t PCm = " << 
fPCm[i] << 
" [MeV/c]\t PLab = " << 
fPLab[i] << 
" [MeV/c]" << std::endl;
 
  480            std::cout << 
"\t GCm = " << 
fGCm[i] << 
" \t\t GLab = " << 
fGLab[i] << std::endl;
 
  482            std::cout << 
"\t ECm = " << 
fECm[i] << 
" [MeV]\t\t ELab = N/A" << std::endl;
 
  483            std::cout << 
"\t TCm = " << 
fTCm[i] << 
" [MeV]\t\t TLab = N/A" << std::endl;
 
  484            std::cout << 
"\t VCm = " << 
fVCm[i] << 
" [/c]\t\t VLab = N/A" << std::endl;
 
  485            std::cout << 
"\t PCm = " << 
fPCm[i] << 
" [MeV/c]\t PLab = N/A" << std::endl;
 
  486            std::cout << 
"\t GCm = " << 
fGCm[i] << 
" \t\t GLab = N/A" << std::endl;
 
  487            std::cout << 
"\t\t ThetaLab_max = " << 
fThetaMax[i] * 
R2D << 
" [deg]" << std::endl;
 
  491   std::cout << std::endl
 
  493             << 
" * * * * * * * * * * * * * * * * * * * * * * * * *" << std::endl
 
 
  512   for(
int i = 0; i < 4; i++) {
 
 
int GetZ() const
Gets the Z (# of protons) of the nucleus.
 
int GetA() const
Gets the A (Z + N) of the nucleus.
 
double GetMass() const
Gets the mass of the nucleus (in MeV)
 
TGraph * OmegaVsTheta(double thmin=0.0, double thmax=180.0, int part=2, bool Frame_Lab=true) const
 
TGraph * KinVsTheta(double thmin=0.0, double thmax=180.0, int part=2, bool Frame_Lab=true, bool Units_keV=true) const
 
double ConvertThetaLabToCm(double theta_lab, int part=2) const
 
double GetVLabFromThetaCm(double theta_cm=0.0, int part=0) const
 
void ConvertCmToLab(double theta_cm, double omega_cm, double &theta_lab, double &omega_lab, int part=2) const
 
double AnalysisBeta(double ekin, int part) const
 
double GetELabFromThetaCm(double theta_cm=0.0, int part=0) const
 
void Clear(Option_t *opt="") override
 
double ConvertThetaCmToLab(double theta_cm, int part=2) const
 
double GetTBeam(bool inverse) const
 
double ConvertOmegaLabToCm(double theta_lab, int part=2) const
 
double GetPLabFromThetaCm(double theta_cm=0.0, int part=0) const
 
void Print(Option_t *opt="") const override
 
TReaction(const char *beam, const char *targ, const char *ejec, const char *reco, double eBeam=0.0, double ex3=0.0, bool inverse=false)
 
TGraph * RutherfordVsTheta(double thmin=1.0, double thmax=179.0, int part=2, bool Frame_Lab=true, bool Units_mb=true) const
 
void ConvertLabToCm(double theta_lab, double omega_lab, double &theta_cm, double &omega_cm, int part=2) const
 
void AnalysisAngDist(double ekin, double theta_lab, int part, double &exc, double &theta_cm, double &omega_lab2cm)
 
TGraph * ThetaVsTheta(double thmin=0.0, double thmax=180.0, int part=2, bool Frame_Lab=true) const
 
double GetRutherfordCm(double theta_cm, int part=2, bool Units_mb=true) const
 
double ConvertOmegaCmToLab(double theta_cm, int part=2) const
 
double GetGLabFromThetaCm(double theta_cm=0.0, int part=0) const
 
double GetRutherfordLab(double theta_lab, int part=2, bool Units_mb=true) const
 
void SetCmFrame(double exc)
 
double GetExcEnergy(double ekin=0.00, double theta_lab=0.00, int part=2) const
 
double GetTLabFromThetaCm(double theta_cm=0.0, int part=0) const