improved checking to avoid assert
This commit is contained in:
parent
80e624b8fe
commit
bcb9bf8ebd
15
src/external/libFitPofB/classes/TBofZCalc.cpp
vendored
15
src/external/libFitPofB/classes/TBofZCalc.cpp
vendored
@ -360,7 +360,10 @@ double TLondon1D_2L::GetBmin() const
|
|||||||
void TLondon1D_2L::SetBmin()
|
void TLondon1D_2L::SetBmin()
|
||||||
{
|
{
|
||||||
double b_a(fCoeff[1]/fCoeff[0]);
|
double b_a(fCoeff[1]/fCoeff[0]);
|
||||||
assert (b_a>0.);
|
// assert (b_a>0.);
|
||||||
|
if (b_a<10E-7) {
|
||||||
|
b_a = 10E-7;
|
||||||
|
}
|
||||||
|
|
||||||
double minZ;
|
double minZ;
|
||||||
// check if the minimum is in the first layer
|
// check if the minimum is in the first layer
|
||||||
@ -637,7 +640,10 @@ double TLondon1D_3L::GetBmin() const
|
|||||||
void TLondon1D_3L::SetBmin()
|
void TLondon1D_3L::SetBmin()
|
||||||
{
|
{
|
||||||
double b_a(fCoeff[1]/fCoeff[0]);
|
double b_a(fCoeff[1]/fCoeff[0]);
|
||||||
assert (b_a>0.);
|
// assert (b_a>0.);
|
||||||
|
if (b_a<10E-7) {
|
||||||
|
b_a = 10E-7;
|
||||||
|
}
|
||||||
|
|
||||||
double minZ;
|
double minZ;
|
||||||
// check if the minimum is in the first layer
|
// check if the minimum is in the first layer
|
||||||
@ -868,7 +874,10 @@ double TLondon1D_3LS::GetBmin() const
|
|||||||
void TLondon1D_3LS::SetBmin()
|
void TLondon1D_3LS::SetBmin()
|
||||||
{
|
{
|
||||||
double b_a(fCoeff[1]/fCoeff[0]);
|
double b_a(fCoeff[1]/fCoeff[0]);
|
||||||
assert (b_a>0.);
|
// assert (b_a>0.);
|
||||||
|
if (b_a<10E-7) {
|
||||||
|
b_a = 10E-7;
|
||||||
|
}
|
||||||
|
|
||||||
double minZ;
|
double minZ;
|
||||||
// check if the minimum is in the first layer
|
// check if the minimum is in the first layer
|
||||||
|
Loading…
x
Reference in New Issue
Block a user