fix operator: fixing a critical error in the mue-weighting

This commit is contained in:
Thorsten Liebig 2010-08-23 22:15:52 +02:00
parent 42e1968348
commit 6fa9fef29f
2 changed files with 4 additions and 4 deletions

View File

@ -762,7 +762,7 @@ bool Operator::Calc_ECPos(int n, const unsigned int* pos, double* inEC) const
if (prop) if (prop)
{ {
CSPropMaterial* mat = prop->ToMaterial(); CSPropMaterial* mat = prop->ToMaterial();
inEC[2] += mat->GetMue(n)*fabs(delta); inEC[2] += fabs(delta)/mat->GetMueWeighted(n,shiftCoord);
if (mat->GetSigmaWeighted(n,shiftCoord)) if (mat->GetSigmaWeighted(n,shiftCoord))
inEC[3] += fabs(delta)/mat->GetSigmaWeighted(n,shiftCoord); inEC[3] += fabs(delta)/mat->GetSigmaWeighted(n,shiftCoord);
else else
@ -770,7 +770,7 @@ bool Operator::Calc_ECPos(int n, const unsigned int* pos, double* inEC) const
} }
else else
{ {
inEC[2] += 1*fabs(delta); inEC[2] += fabs(delta);
inEC[3] = 0; inEC[3] = 0;
} }

View File

@ -364,7 +364,7 @@ bool Operator_Cylinder::Calc_ECPos(int n, const unsigned int* pos, double* inEC)
if (prop) if (prop)
{ {
CSPropMaterial* mat = prop->ToMaterial(); CSPropMaterial* mat = prop->ToMaterial();
inEC[2] += mat->GetMue(n)*delta_n; inEC[2] += delta_n / mat->GetMueWeighted(n,shiftCoord);
if (mat->GetSigmaWeighted(n,shiftCoord)) if (mat->GetSigmaWeighted(n,shiftCoord))
inEC[3] += delta_n/mat->GetSigmaWeighted(n,shiftCoord); inEC[3] += delta_n/mat->GetSigmaWeighted(n,shiftCoord);
else else
@ -372,7 +372,7 @@ bool Operator_Cylinder::Calc_ECPos(int n, const unsigned int* pos, double* inEC)
} }
else else
{ {
inEC[2] += 1*delta_n; inEC[2] += delta_n;
inEC[3] = 0; inEC[3] = 0;
} }