@@ -1955,27 +1955,8 @@ int FSSW::sample_momemtum_from_a_fluid_cell(
19551955 // assigned to the return variables
19561956 pT = sqrt (pLab[1 ]*pLab[1 ] + pLab[2 ]*pLab[2 ]);
19571957 phi = atan2 (pLab[2 ], pLab[1 ]);
1958- double y = 0.5 *log ((pLab[0 ] + pLab[3 ])/(pLab[0 ] - pLab[3 ]));
1959- if (std::isnan (y) || std::isinf (y)) {
1960- // pLab[0] and pLab[3] are too close
1961- // recompute pLab[3] with E, pT, and mass
1962- pLab[3 ] = sqrt (pLab[0 ]*pLab[0 ] - pT*pT - mass*mass);
1963- y = 0.5 *log ((pLab[0 ] + pLab[3 ])/(pLab[0 ] - pLab[3 ]));
1964- if (std::isnan (y) || std::isinf (y)) {
1965- std::cout << " [Error]: sampled y is " << y << " !"
1966- << std::endl;
1967- std::cout << " umu = "
1968- << umu[0 ] << " , " << umu[1 ] << " , " << umu[2 ]
1969- << " , " << umu[3 ] << std::endl;
1970- std::cout << " pLRF = "
1971- << pLRF[0 ] << " , " << pLRF[1 ] << " , "
1972- << pLRF[2 ] << " , " << pLRF[3 ] << std::endl;
1973- std::cout << " pLab = "
1974- << pLab[0 ] << " , " << pLab[1 ] << " , "
1975- << pLab[2 ] << " , " << pLab[3 ] << std::endl;
1976- exit (1 );
1977- }
1978- }
1958+ double mT = sqrt (pT*pT + mass*mass);
1959+ double y = asinh (pLab[3 ]/mT );
19791960 y_minus_eta_s = y - surf->eta ;
19801961 return (1 );
19811962 }
0 commit comments