#include "ROIConUncer.h" #include "ProcessAlgorithmGlobalVar.h" #include double CRoiConUncer::CalcCorrect(SPara& _input,double _Xe) { double rData; rData = (1-qExp(-_Xe*_input.s_coll_interval_time))* \ qExp(-_Xe*_input.s_pre_time)* \ (1-qExp(-_Xe*_input.s_acquisition_real_time)); return rData; } bool CRoiConUncer::CalcConc(SPara& _input,double _Xe,double& _output) { double rData=0.0; if(CalcCorrect(_input,_Xe)==0.0||global::cst_d_xe_air==0.0||_input.s_volume_of_Xe/global::cst_d_xe_air==0.0) { return false; } else { rData = 1000*_Xe*_Xe/CalcCorrect(_input,_Xe)*(_input.s_coll_interval_time/(_input.s_volume_of_Xe/global::cst_d_xe_air)); } _output = rData; return true; } bool CRoiConUncer::CalcRoiConUncer(ConUncerI& _input,ConUncerO& _output) { bool bRet = false; Factor factor; //系数处理 double dData; bRet = CalcConc(_input.SPara, global::cst_d_decay_135xeg_lam,dData); if(!bRet) { return false; } factor.calcFactor.append(dData); bRet = CalcConc(_input.SPara, global::cst_d_decay_133xeg_lam,dData); if(!bRet) { return false; } factor.calcFactor.append(dData); factor.calcFactor.append(dData); bRet = CalcConc(_input.SPara, global::cst_d_decay_131xem_lam,dData); if(!bRet) { return false; } factor.calcFactor.append(dData); bRet = CalcConc(_input.SPara, global::cst_d_decay_133xem_lam,dData); if(!bRet) { return false; } factor.calcFactor.append(dData); bRet = CalcConc(_input.SPara, global::cst_d_decay_133xeg_lam,dData); if(!bRet) { return false; } factor.calcFactor.append(dData); factor.bgbrFactor.append(global::cst_d_br_135xeg); factor.bgbrFactor.append(global::cst_d_br_133xe_80); factor.bgbrFactor.append(global::cst_d_br_133xe_30); factor.bgbrFactor.append(global::cst_d_br_131xem_30); factor.bgbrFactor.append(global::cst_d_br_133xem_30); factor.bgbrFactor.append(global::cst_d_br_133xe_30); //通过系数和输入值计算输出值 bRet = CalcRoiConUncerByFactor(_input._netCts,_input.s_bg_efficiency,factor,_output); if(!bRet) { return false; } return true; } bool CRoiConUncer::CalcRoiConUncerByFactor(QVector& _netCts,QVector& _s_ROI_number_eff,Factor& _factor,ConUncerO& _output) { QVector con_uncer(4,0); //浓度和不确定度 前两组置零 QVector con_counts(2,0); //不确定度系数 double dCalcFactor=0.0; double dbgbrFactor=0.0; const int netCtsGroupNmber = 3; //净计数一组三个数据 QVector::size_type qdNetctsPos=6; QVector::size_type qdBgeffsPos=0; const int con_uncer_grpnm = 10; const int pos_net_cts_vari = 1; //提取数据 for(int pos=0;pos