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)
19 for(
int i = 0; i < 4; i++) {
26 SetName(Form(
"%s(%s,%s)%s", beam, targ, ejec, reco));
28 SetName(Form(
"%s(%s,%s)%s", targ, beam, ejec, reco));
67 gStyle->SetTitleYOffset(1.5);
68 gStyle->SetTitleXOffset(1.2);
69 gStyle->SetDrawOption(
"AC");
84 fPCm[0] = sqrt((
fS - pow(
fM[0] -
fM[1], 2)) * (
fS - pow(
fM[0] +
fM[1], 2))) / (2 * sqrt(
fS));
86 fPCm[2] = sqrt((
fS - pow(exc +
fM[2] -
fM[3], 2)) * (
fS - pow(exc +
fM[2] +
fM[3], 2))) / (2 * sqrt(
fS));
89 for(
int i = 0; i < 4; i++) {
90 fECm[i] = sqrt(pow(
fM[i], 2) + pow(
fPCm[i], 2));
93 fGCm[i] = 1 / sqrt(1 - pow(
fVCm[i], 2));
102 }
else if(val < 1.001) {
115 if(part == 0 || part == 1) {
124 if(part == 0 || part == 1) {
129 return ELab -
fM[part];
134 if(part == 0 || part == 1) {
145 if(part == 0 || part == 1) {
150 double Pperp =
fPCm[part] * sin(theta_cm);
151 return sqrt(pow(Pperp, 2) + pow(Pz, 2));
156 if(part == 0 || part == 1) {
161 return 1 / sqrt(1 - pow(VLab, 2));
166 if(ekin == 0.00 && theta_lab == 0.00) {
170 double val1 = pow(
fM[0] +
fM[1], 2) + pow(
fM[2], 2) + 2 *
fM[1] *
fTLab[0];
171 double val2 = 2 *
fCmG * sqrt(pow(
fM[0] +
fM[1], 2) + 2 *
fM[1] *
fTLab[0]);
172 double val3 =
fM[2] + ekin -
fCmV * sqrt(pow(ekin, 2) + 2 *
fM[2] * ekin) * TMath::Cos(theta_lab);
174 return sqrt(val1 - val2 * val3) -
fM[3];
193 return sqrt(pow(ekin, 2) + 2 *
fM[part] * ekin) / (ekin +
fM[part]);
201 static const double alpha = 1.29596;
208 double a = pow(
fNuc[0]->GetZ() *
fNuc[1]->GetZ() /
fTLab[0], 2);
209 return scale * alpha * a / pow(sin(theta_cm / 2), 4);
223 theta_lab = std::min(theta_lab,
fThetaMax[part]);
226 double gtan2 = pow(tan(theta_lab) *
fCmG, 2);
228 double expr = sqrt(1 + gtan2 * (1 - pow(x, 2)));
229 double theta_cm = 0.;
232 if(tan(theta_lab) >= 0) {
233 theta_cm = acos((-x * gtan2 + expr) / (1 + gtan2));
235 theta_cm = acos((-x * gtan2 - expr) / (1 + gtan2));
239 theta_cm =
PI - theta_cm;
243 theta_cm = -theta_cm;
267 theta_cm =
PI - theta_cm;
270 double theta_lab = TMath::ATan2(sin(theta_cm),
fCmG * (cos(theta_cm) +
fCmV /
fVCm[part]));
283 theta_cm =
PI - theta_cm;
285 double val1 = pow(pow(sin(theta_cm), 2) + pow(
fCmG * (x + cos(theta_cm)), 2), 1.5);
286 double val2 = (
fCmG * (1 + x * cos(theta_cm)));
304 auto* g =
new TGraph();
305 const char* frame = Form(
"%s", Frame_Lab ?
"Lab" :
"Cm");
307 g->SetName(Form(
"KinVsTheta%s_%s", frame, GetName()));
309 Form(
"Kinematics for %s; Theta_{%s} [deg]; Kinetic energy [%s]", GetName(), frame, Units_keV ?
"keV" :
"MeV"));
314 for(
int i = 0; i <= 180; i++) {
315 theta =
static_cast<double>(i);
328 if(theta < thmin || theta > thmax) {
331 g->SetPoint(i, theta, T);
340 auto* g =
new TGraph();
341 const char* frame = Form(
"%s", Frame_Lab ?
"Lab" :
"Cm");
342 const char* other = Form(
"%s", !Frame_Lab ?
"Lab" :
"Cm");
344 g->SetName(Form(
"ThetaVsTheta%s_%s", frame, GetName()));
345 g->SetTitle(Form(
"Angle conversion for %s; Theta_{%s} [deg]; Theta_{%s} [deg]", GetName(), frame, other));
347 double theta_cm = 0.;
348 double theta_lab = 0.;
350 for(
int i = 0; i <= 180; i++) {
351 theta_cm =
static_cast<double>(i);
354 if((Frame_Lab && (theta_lab < thmin || theta_lab > thmax))) {
357 if(!Frame_Lab && (theta_cm < thmin || theta_cm > thmax)) {
363 g->SetPoint(i, theta_lab, theta_cm);
365 g->SetPoint(i, theta_cm, theta_lab);
375 auto* g =
new TGraph();
376 const char* frame = Form(
"%s", Frame_Lab ?
"Lab" :
"Cm");
377 const char* other = Form(
"%s", !Frame_Lab ?
"Lab" :
"Cm");
379 g->SetName(Form(
"%s_OmegaVsTheta%s", GetName(), frame));
380 g->SetTitle(Form(
"Solid angle conversion for %s; Theta_{%s} [deg]; dOmega_{%s} / dOmega_{%s}", GetName(), frame,
385 for(
int i = 0; i <= 180; i++) {
387 theta =
static_cast<double>(i);
395 if(theta < thmin || theta > thmax || Om > 1e3) {
398 g->SetPoint(g->GetN(), theta, Om);
407 auto* g =
new TGraph();
408 const char* frame = Form(
"%s", Frame_Lab ?
"Lab" :
"Cm");
410 g->SetName(Form(
"%s_RutherfordVsTheta%s", GetName(), frame));
411 g->SetTitle(Form(
"Rutherford cross section for %s; Theta_{%s} [deg]; dSigma / dOmega_{%s} [%s/sr]", GetName(), frame,
412 frame, Units_mb ?
"mb" :
"fm^2"));
417 for(
int i = 1; i <= 180; i++) {
418 theta =
static_cast<double>(i);
427 if(theta < thmin || theta > thmax) {
430 g->SetPoint(g->GetN(), theta, R);
441 std::cout << std::endl
443 <<
" * * * * * * * * * * * * * * * * * * * * * * * * *" << std::endl;
444 std::cout << std::endl
446 <<
"\tTReaction '" << GetName() <<
"' :" << std::endl
449 std::cout <<
" -> Beam '" <<
fNuc[0]->GetName() <<
"' kinetic energy = " <<
fTBeam <<
" [MeV]" << std::endl;
450 std::cout <<
" -> Reaction Q value (total) = " <<
fQVal <<
" [MeV]" << std::endl;
451 std::cout <<
" -> Reaction kinematics type = '" << (
fInverse ?
"INVERSE" :
"NORMAL") <<
"'" << std::endl;
453 std::cout << std::endl
454 <<
" Inverse beam '" <<
fNuc[1]->GetName() <<
"' [lab frame] :- " << std::endl;
455 std::cout <<
"\t Kinetic energy = " << (
fGLab[0] - 1) *
fM[1] <<
" [MeV]" << std::endl;
456 std::cout <<
"\t Velocity = " <<
fVLab[0] <<
" [/c] " << std::endl;
459 std::cout << std::endl
460 <<
" Center of mass motion :- " << std::endl;
461 std::cout <<
"\t CmE = " <<
fCmE <<
" [MeV]" << std::endl;
462 std::cout <<
"\t CmTi = " <<
fCmTi <<
" [MeV]" << std::endl;
463 std::cout <<
"\t CmTf = " <<
fCmTf <<
" [MeV]" << std::endl;
464 std::cout <<
"\t CmV = " <<
fCmV <<
" [/c]" << std::endl;
465 std::cout <<
"\t CmP = " <<
fCmP <<
" [MeV/c]" << std::endl;
466 std::cout <<
"\t CmG = " <<
fCmG << std::endl;
467 std::cout << std::endl;
469 if(pstring.find(
"all") != std::string::npos) {
470 for(
int i = 0; i < 4; i++) {
471 std::cout << std::endl
472 <<
" Particle " << i <<
" : '" <<
fNuc[i]->GetName() <<
"' : \t A = " <<
fNuc[i]->
GetA() <<
", Z = " <<
fNuc[i]->
GetZ() <<
", Mass = " <<
fM[i] <<
" [MeV]" << std::endl;
475 std::cout <<
"\t ECm = " <<
fECm[i] <<
" [MeV]\t\t ELab = " <<
fELab[i] <<
" [MeV]" << std::endl;
476 std::cout <<
"\t TCm = " <<
fTCm[i] <<
" [MeV]\t\t TLab = " <<
fTLab[i] <<
" [MeV]" << std::endl;
477 std::cout <<
"\t VCm = " <<
fVCm[i] <<
" [/c]\t\t VLab = " <<
fVLab[i] <<
" [/c]" << std::endl;
478 std::cout <<
"\t PCm = " <<
fPCm[i] <<
" [MeV/c]\t PLab = " <<
fPLab[i] <<
" [MeV/c]" << std::endl;
479 std::cout <<
"\t GCm = " <<
fGCm[i] <<
" \t\t GLab = " <<
fGLab[i] << std::endl;
481 std::cout <<
"\t ECm = " <<
fECm[i] <<
" [MeV]\t\t ELab = N/A" << std::endl;
482 std::cout <<
"\t TCm = " <<
fTCm[i] <<
" [MeV]\t\t TLab = N/A" << std::endl;
483 std::cout <<
"\t VCm = " <<
fVCm[i] <<
" [/c]\t\t VLab = N/A" << std::endl;
484 std::cout <<
"\t PCm = " <<
fPCm[i] <<
" [MeV/c]\t PLab = N/A" << std::endl;
485 std::cout <<
"\t GCm = " <<
fGCm[i] <<
" \t\t GLab = N/A" << std::endl;
486 std::cout <<
"\t\t ThetaLab_max = " <<
fThetaMax[i] *
R2D <<
" [deg]" << std::endl;
490 std::cout << std::endl
492 <<
" * * * * * * * * * * * * * * * * * * * * * * * * *" << std::endl
511 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