PlabToCM.C 697 B

1234567891011121314151617181920212223
  1. void PlabToCM(float pl)
  2. {
  3. float mp=0.938;
  4. float El=sqrt(pl*pl+mp*mp);
  5. float Ekin=El-mp;
  6. float pc=sqrt( ( mp*El-mp*mp )/2 );
  7. float e_cm=sqrt( pc*pc + mp*mp );
  8. float ss = sqrt( 4*(pc*pc + mp*mp) );
  9. float yBeam = 0.25 * log ((El + pl) / (El - pl));
  10. float beta = tanh(yBeam);
  11. float gamma = cosh(yBeam);
  12. float gammabeta = sinh(yBeam);
  13. cout << "Elab = " << El << endl;
  14. cout << "Ekin = " << Ekin << endl;
  15. cout << "P* = " << pc << endl;
  16. cout << "E* = " << e_cm << endl;
  17. cout << "sqrt(Snn) = " << ss << endl;
  18. cout << "yBeam = " << yBeam << endl;
  19. cout << "Beta = " << beta << endl;
  20. cout << "Gamma = " << gamma << endl;
  21. cout << "Gamma * Beta = " << gammabeta << endl;
  22. }