From bcb9bf8ebdf5aceb5e56587d9095641d1b9a1cae Mon Sep 17 00:00:00 2001 From: Andreas Suter Date: Wed, 21 Nov 2012 09:47:59 +0000 Subject: [PATCH] improved checking to avoid assert --- src/external/libFitPofB/classes/TBofZCalc.cpp | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/external/libFitPofB/classes/TBofZCalc.cpp b/src/external/libFitPofB/classes/TBofZCalc.cpp index 593218d2..e256ed56 100644 --- a/src/external/libFitPofB/classes/TBofZCalc.cpp +++ b/src/external/libFitPofB/classes/TBofZCalc.cpp @@ -232,7 +232,7 @@ void TLondon1D_1L::SetBmin() { double b_a(fCoeff[1]/fCoeff[0]); // assert(b_a>0.); - if(b_a<10E-7){ + if (b_a<10E-7) { b_a = 10E-7; } @@ -360,7 +360,10 @@ double TLondon1D_2L::GetBmin() const void TLondon1D_2L::SetBmin() { 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; // check if the minimum is in the first layer @@ -637,7 +640,10 @@ double TLondon1D_3L::GetBmin() const void TLondon1D_3L::SetBmin() { 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; // check if the minimum is in the first layer @@ -868,7 +874,10 @@ double TLondon1D_3LS::GetBmin() const void TLondon1D_3LS::SetBmin() { 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; // check if the minimum is in the first layer