CMToLab.C 854 B

123456789101112131415161718192021222324252627282930
  1. constexpr double M_NUCL = 0.938;
  2. int CMToLab(double sNN = 4.5) {
  3. double sN = sNN/2.;
  4. double pN = TMath::Sqrt(sN*sN - M_NUCL*M_NUCL);
  5. TLorentzVector tMom4(0, 0, -pN, sN);
  6. TVector3 vBoost{tMom4.BoostVector()};
  7. TLorentzVector pMom4(0, 0, pN, sN);
  8. pMom4.Boost(-vBoost);
  9. float yBeam = 0.25 * log ((pMom4.E() + pMom4.Pz()) / (pMom4.E() - pMom4.Pz()));
  10. float beta = tanh(yBeam);
  11. float gamma = cosh(yBeam);
  12. float gammabeta = sinh(yBeam);
  13. cout << "E_lab = " << pMom4.E() << "A GeV" << endl;
  14. cout << "T_kin = " << pMom4.E() - pMom4.M() << "A GeV" << endl;
  15. cout << "p_lab = " << pMom4.Pz() << "A GeV/c" << endl;
  16. cout << "yBeam = " << yBeam << endl;
  17. cout << "Beta = " << beta << endl;
  18. cout << "Gamma = " << gamma << endl;
  19. cout << "Gamma * Beta = " << gammabeta << endl;
  20. return 0;
  21. }