Fixed double subtraction of electron masses in FP_kinematics

This commit is contained in:
Gordon McCann 2022-01-28 14:09:07 -05:00 committed by GitHub
parent c044eed7cb
commit edf25adcab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -61,10 +61,10 @@ double Delta_Z(int ZT, int AT, int ZP, int AP, int ZE, int AE,
B /= 10000; //convert to tesla B /= 10000; //convert to tesla
angle *= DEGTORAD; angle *= DEGTORAD;
MT = MASS.FindMass(ZT, AT) - ZT*RESTMASS_ELECTRON*UTOMEV; MT = MASS.FindMass(ZT, AT);
MP = MASS.FindMass(ZP, AP) - ZP*RESTMASS_ELECTRON*UTOMEV; MP = MASS.FindMass(ZP, AP);
ME = MASS.FindMass(ZE, AE) - ZE*RESTMASS_ELECTRON*UTOMEV; ME = MASS.FindMass(ZE, AE);
MR = MASS.FindMass(ZR, AR) - ZR*RESTMASS_ELECTRON*UTOMEV; MR = MASS.FindMass(ZR, AR);
if (MT*MP*ME*MR == 0) { if (MT*MP*ME*MR == 0) {
std::cerr << "***WARNING: error loading one or more masses; returning 0\n"; std::cerr << "***WARNING: error loading one or more masses; returning 0\n";