AnalysisSystemForRadionucli.../BgWorkDef.h

408 lines
17 KiB
C
Raw Normal View History

2024-06-04 15:27:02 +08:00
#ifndef B_G_WORK_DEFINE_H
#define B_G_WORK_DEFINE_H
#include "ProcessAlgorithmGlobalVar.h"
#include "RadionuclideMessage.h"
//错误类型结构
enum BgErrorType{
E_NONE //默认没有错误
,E_FILE_CONTEXT_SAMPLE_Acquisition //文件读取错误
,E_FILE_CONTEXT_SAMPLE_Collection //
,E_FILE_CONTEXT_SAMPLE_Ratios //
,E_FILE_CONTEXT_SAMPLE_g_Energy //
,E_FILE_CONTEXT_SAMPLE_b_Energy //
,E_FILE_CONTEXT_SAMPLE_ROI_Limits //
,E_FILE_CONTEXT_SAMPLE_bgEfficiency //
,E_FILE_CONTEXT_SAMPLE_Processing //
,E_FILE_CONTEXT_SAMPLE_Histogram //
,E_FILE_CONTEXT_GAS_Acquisition //
,E_FILE_CONTEXT_GAS_g_Energy //
,E_FILE_CONTEXT_GAS_b_Energy //
,E_FILE_CONTEXT_GAS_ROI_Limits //
,E_FILE_CONTEXT_GAS_Histogram //
,E_FILE_CONTEXT_GAS_Ratios //
,E_FILE_CONTEXT_DETA_Histogram //
,E_FILE_CONTEXT_DETA_Acquisition //
,E_FILE_CONTEXT_DETA_g_Energy //
,E_FILE_CONTEXT_DETA_b_Energy //
,E_FILE_CONTEXT_DETA_ROI_Limits //
,E_SAMPLE_ROI_CTS //样品谱感兴趣区计数错误
,E_GAS_ROI_CTS //气体本底谱感兴趣区计数错误
,E_DETA_ROI_CTS //探测器本体谱感兴趣区计数错误
,E_S_DETUCT_D_CTS //样品普扣除探测器本底谱计数错误
,E_G_DETUCT_D_CTS //气体本底谱扣除探测器本底谱计数错误
,E_NET_COUNTS //获取净计数错误
,E_ROI_CON_UNCER //获取感兴趣浓度和不平衡度错误
,E_XE_CON_UNCER //获取同位素浓度和不确定度错误
,E_MDC //MDC计算错误
};
//处理后数据结构
//文件传入参数
typedef struct tagBgFileI
{
RadionuclideMessage sample;
RadionuclideMessage gas;
RadionuclideMessage Detbgr;
}*pBgFileI,BgFileI;
//边界值
typedef struct tagBgBoundary
{
QVector<int> ROI_B_Boundary_start;
QVector<int> ROI_B_Boundary_stop;
QVector<int> ROI_G_Boundary_start;
QVector<int> ROI_G_Boundary_stop;
}*pBgBoundary,BgBoundary;
//MDC参数结构
typedef struct tagBgMDCPara
{
double MDC_Xe135; //MDC XE135
double MDC_Xe131m; //MDC XE131m
double MDC_Xe133m; //MDC XE133m
double MDC_Xe133; //MDC XE133
QVector<double> MDC;
QVector<double> MDC_CTS;
}*pBgMDCPara,BgMDCPara;
//LC参数结构
typedef struct tagBgLCPara
{
double LC_Xe135; //LC XE135
double LC_Xe131m; //LC XE131m
double LC_Xe133m; //LC XE133m
double LC_Xe133; //LC XE133
QVector<double> LC;
QVector<double> LC_CTS;
}*pBgLCPara,BgLCPara;
typedef struct tagBgXeConUncer
{
double Xe135_con; //135不浓度
double Xe135_uncer; //135不确定度
double Xe131m_con;
double Xe131m_uncer;
double Xe133m_con;
double Xe133m_uncer;
double Xe133_con;
double Xe133_uncer;
}*pBgXeConUncer,BgXeConUncer;
//其他数据
typedef struct tagBgOtherGenerate
{
QVector<double> ROI_net_coutns; //感兴趣区净计数
QVector<double> ROI_net_err;
QVector<double> ROI_con_uncer; //感兴趣区浓度和不确定度 [n..0]浓度 [n..1]不确定度
QVector<double> ROI_con_counts_factor; //感兴趣区浓度计数系数 [n..0]系数
global::XeType XeType;
BgLCPara LCPara;
BgMDCPara MDCPara;
BgXeConUncer XeConUncer;
}*pBgOtherGenerate,BgOtherGenerate;
//能道拟合处理后的数据
//交互处理参数
enum FitType{_default,liner,poly2,poly3,gauss};
typedef struct tagBgFittingHandleData
{
int b_fitting_type;
int g_fitting_type;
QVector<double> b_fitting_para;
QVector<double> g_fitting_para;
tagBgFittingHandleData()
{
b_fitting_type=poly2;
g_fitting_type=poly2;
}
}*pBgFittingHandleData,BgFittingHandleData;
typedef struct tagBgFittingPara
{
int b_fitting_type;
int g_fitting_type;
QVector<double> b_fitting_e_c;
QVector<double> g_fitting_e_c;
QVector<double> b_fitting_c_e;
QVector<double> g_fitting_c_e;
tagBgFittingPara()
{
b_fitting_type=poly2;
g_fitting_type=poly2;
}
}*pBgFittingPara,BgFittingPara;
//样品谱生成数据
typedef struct tagBgSmapleGenerate
{
BgBoundary s_boungdary;
QVector<double> s_roi_cts; //样品普感兴趣区计数
QVector<double> s_deduct_d_cts; //样品谱扣除探测器本底谱数据
BgFittingPara s_fittingPara; // 拟合后值
QString s_collection_time; //采集时间
}*pBgSampleGenerate,BgSampleGenerate;
//气体本地谱生成数据
typedef struct tagBgGasGenerate
{
BgBoundary g_boungdary;
QVector<double> g_roi_cts; //气体本底谱感兴趣区计数
QVector<double> g_deduct_d_cts; //气体本底谱扣除探测器本底谱数据
BgFittingPara g_fittingPara; // 拟合后值
}*pBgGasGenerate,BgGasGenerate;
//探测器本地谱生成数据
typedef struct tagBgDetbgrGenerate
{
BgBoundary d_boungdary;
QVector<double> d_roi_cts; //探测器本底谱感兴趣区计数
BgFittingPara d_fittingPara; // 拟合后值
}*pBgDetbgrGenerate,BgDetbgrGenerate;
//返回所有数据
typedef struct tagBgAllGenerate
{
BgGasGenerate BgGas;
BgSampleGenerate BgSample;
BgOtherGenerate BgOther;
BgDetbgrGenerate BgDetbgr;
bool bProcessed;
tagBgAllGenerate()
{
bProcessed = false;
}
}*pBgAllGenerate,BgAllGenerate;
//UI界面需要数据
typedef struct tagBgUINeed
{
BgMDCPara MDCPara;
BgXeConUncer XeConUncer;
// BgFittingHandleData fittingData;
}*pBgUINeed,BgUINeed;
//需处理数据结构
typedef struct tagBgCalibratePara
{
QVector<double> b_e_cal; //b 能刻度系数
QVector<double> g_e_cal; //g 能刻度系数
int b_e_cal_flag; //b 自计算刻度系数配置
int g_e_cal_flag; //g 自计算刻度系数配置
bool bApplyNewCalicSample; // 界面交互新刻度应用
bool bApplyNewCalicDetBg;
bool bApplyNewCalicGasBg;
bool bApplyNewCalicQc;
tagBgCalibratePara()
{
b_e_cal_flag = poly2;
g_e_cal_flag = poly2;
bApplyNewCalicSample = false;
bApplyNewCalicDetBg = false;
bApplyNewCalicGasBg = false;
bApplyNewCalicQc = false;
}
}*pBgCalibratePara, BgCalibratePara;
//能道数据
typedef struct tagBgEnergyChannel
{
QVector<double> energy; // g_Energy:g_energy or b_Energy:electron_energy kev 能量
QVector<double> channel; // g_Energy:centroid_channel or b_Energy channel 道
QVector<double> uncertainty; //不确定度 未使用
QVector<QString> mode; //类型 未使用
int record_count; //记录条数 未使用
tagBgEnergyChannel()
{
record_count=0;
}
}*pBgEnergyChannel,BgEnergyChannel;
//b g 能 道
typedef struct tagBgEC
{
BgEnergyChannel b_e_c;//b_Energy block
BgEnergyChannel g_e_c;//g_Energy block
}*pBgEC,BgEC;
//感应区限值结构
typedef struct tagBgROILimit
{
QVector<double> ROI_B_start_x1;// ROI B-rang start,x1(keV)
QVector<double> ROI_B_stop_x2; // ROI B_rang stop,x2(kev)
QVector<double> ROI_G_start_y1;// ROI G-rang start,y1(keV)
QVector<double> ROI_G_stop_y2; // ROI G_rang stop,y2(kev)
}*pBgROILimit,BgROILimit;
typedef struct tagBgHistogram
{
long b_channels; // β-channels
long g_channels; // γ-channels
QVector<long long> counts; // counts at channels
}*pBgHistorgram,BgHistogram;
//样品符合谱所需数据
typedef struct tagBgROIRatios
{
QVector<QString> ratio_id;
QVector<QString> ROI_num_highter_G_energy_ROI;
QVector<QString> ROI_num_lower_G_energy_ROI;
QVector<double> count_ratio;
QVector<double> count_ratio_uncertainty;
}*pBgRoiRatios,BgRoiRatios;
typedef struct tagBgEfficiencies
{
QVector<QString> nuclide_name; // nuclide name
QVector<QString> ROI_number; // ROI number
QVector<double> bg_efficiency; // β-γ coincidence efficiency (counts in ROI/β-γ pair emitted)
QVector<double> uncertainty;
}*pBgBgEfficiencies,BgBgEfficiencies;
typedef struct tagBgSample
{
BgROILimit s_limit; //样品谱限值
QString s_data_type; //样品数据类型
QVector<double> s_count_ratio; //样品谱比率计数
QVector<double> s_bg_efficiency; //样品谱能效感应区个数
QString s_collection_start_date; //样品谱采集开始日期 格式yyyy/MM/dd
QString s_collection_start_time; //样品普采集结束时间 格式hh:mm:ss.z
QString s_collection_stop_time; //样品谱采集结束日期 格式yyyy/MM/dd
QString s_collection_stop_date; //样品普采集结束时间 格式hh:mm:ss.z
QString s_acquisition_start_date; //acquisition start date (yyyy/MM/dd)
QString s_acquisition_start_time; //acquisition start time (hh:mm:ss.z)
double s_acquisition_real_time; //acquisition real time (s)
double s_acquisition_live_time; //acquisition live time (s)
double s_volume_of_Xe; //sample volume of Xe (cm 3 )
double s_xe_stable_volume; //total air volume sampled (standard cubic meters [scm])
double s_uncertainty; //uncertainty (cm 3 )
BgHistogram s_histogram; //Histogram Block
BgEC s_e_c; //能道
BgRoiRatios s_roi_ratio;
BgBgEfficiencies s_bg_efficiency_show;
}*pBgSample,BgSample;
//气体本底谱所需数据
typedef struct tagBgGas
{
BgROILimit g_limit; //气体本底谱限值
QString g_data_type; //气体本底谱数据类型
QVector<double> g_count_ratio; //气体本底谱比率计数
QString g_acquisition_start_date; //acquisition start date (yyyy/MM/dd)
QString g_acquisition_start_time; //acquisition start time (hh:mm:ss.z)
double g_acquisition_real_time; //acquisition real time (s)
double g_acquisition_live_time; //acquisition live time (s)
BgHistogram g_histogram; //Histogram Block
BgEC g_e_c; //能道
}*pBgGas,BgGas;
//探测器本底谱所需数据
typedef struct tagBgDetbgr
{
BgROILimit d_limit; //探测器本底谱限值
QString d_data_type; //探测体本底谱数据类型
double s_acquisition_live_time; //acquisition live time (s)
double d_acquisition_real_time; //acquisition live time (s)
BgHistogram d_histogram; //Histogram Block
BgEC d_e_c; //能道
}*pBgDetbgr,BgDetbgr;
//整合结构java调用所需
typedef struct tagBgSGD
{
//sample
//样品谱限值
QVector<double> s_ROI_B_start_x1;// ROI B-rang start,x1(keV)
QVector<double> s_ROI_B_stop_x2; // ROI B_rang stop,x2(kev)
QVector<double> s_ROI_G_start_y1;// ROI G-rang start,y1(keV)
QVector<double> s_ROI_G_stop_y2; // ROI G_rang stop,y2(kev)
QString s_data_type; //样品数据类型
QVector<double> s_count_ratio; //样品谱比率计数
QVector<double> s_bg_efficiency; //样品谱能效感应区个数
QString s_collection_start_date; //样品谱采集开始日期 格式yyyy/MM/dd
QString s_collection_start_time; //样品普采集结束时间 格式hh:mm:ss.z
QString s_collection_stop_time; //样品谱采集结束日期 格式yyyy/MM/dd
QString s_collection_stop_date; //样品普采集结束时间 格式hh:mm:ss.z
QString s_acquisition_start_date; //acquisition start date (yyyy/MM/dd)
QString s_acquisition_start_time; //acquisition start time (hh:mm:ss.z)
double s_acquisition_real_time; //acquisition real time (s)
double s_acquisition_live_time; //acquisition live time (s)
double s_volume_of_Xe; //sample volume of Xe (cm 3 )
double s_xe_stable_volume; //total air volume sampled (standard cubic meters [scm])
double s_uncertainty; //uncertainty (cm 3 )
//Histogram Block
long s_b_channels; // β-channels
long s_g_channels; // γ-channels
QVector<long> s_counts; // counts at channels
//BgEC s_e_c; //能道
//BgEnergyChannel b_e_c;//b_Energy block
QVector<double> s_b_energy; // g_Energy:g_energy or b_Energy:electron_energy kev 能量
QVector<double> s_b_channel; // g_Energy:centroid_channel or b_Energy channel 道
QVector<double> s_b_uncertainty; //不确定度 未使用
QVector<QString> s_b_mode; //类型 未使用
int s_b_record_count; //记录条数 未使用
//BgEnergyChannel g_e_c;//g_Energy block
QVector<double> s_g_energy; // g_Energy:g_energy or b_Energy:electron_energy kev 能量
QVector<double> s_g_channel; // g_Energy:centroid_channel or b_Energy channel 道
QVector<double> s_g_uncertainty; //不确定度 未使用
QVector<QString> s_g_mode; //类型 未使用
int s_g_record_count; //记录条数 未使用
//BgRoiRatios s_roi_ratio;
QVector<QString> ratio_id;
QVector<QString> ROI_num_highter_G_energy_ROI;
QVector<QString> ROI_num_lower_G_energy_ROI;
QVector<double> count_ratio;
QVector<double> count_ratio_uncertainty;
//BgBgEfficiencies s_bg_efficiency_show;
QVector<QString> nuclide_name; // nuclide name
QVector<QString> ROI_number; // ROI number
QVector<double> bg_efficiency; // β-γ coincidence efficiency (counts in ROI/β-γ pair emitted)
QVector<double> uncertainty;
//gas
//BgROILimit g_limit; //气体本底谱限值
QVector<double> g_ROI_B_start_x1;// ROI B-rang start,x1(keV)
QVector<double> g_ROI_B_stop_x2; // ROI B_rang stop,x2(kev)
QVector<double> g_ROI_G_start_y1;// ROI G-rang start,y1(keV)
QVector<double> g_ROI_G_stop_y2; // ROI G_rang stop,y2(kev)
QString g_data_type; //气体本底谱数据类型
QVector<double> g_count_ratio; //气体本底谱比率计数
QString g_acquisition_start_date; //acquisition start date (yyyy/MM/dd)
QString g_acquisition_start_time; //acquisition start time (hh:mm:ss.z)
double g_acquisition_real_time; //acquisition real time (s)
double g_acquisition_live_time; //acquisition live time (s)
//BgHistogram g_histogram; //Histogram Block
long g_b_channels; // β-channels
long g_g_channels; // γ-channels
QVector<long> g_counts; // counts at channels
//BgEC g_e_c; //能道
//BgEnergyChannel b_e_c;//b_Energy block
QVector<double> g_b_energy; // g_Energy:g_energy or b_Energy:electron_energy kev 能量
QVector<double> g_b_channel; // g_Energy:centroid_channel or b_Energy channel 道
QVector<double> g_b_uncertainty; //不确定度 未使用
QVector<QString> g_b_mode; //类型 未使用
int g_b_record_count; //记录条数 未使用
//BgEnergyChannel g_e_c;//g_Energy block
QVector<double> g_g_energy; // g_Energy:g_energy or b_Energy:electron_energy kev 能量
QVector<double> g_g_channel; // g_Energy:centroid_channel or b_Energy channel 道
QVector<double> g_g_uncertainty; //不确定度 未使用
QVector<QString> g_g_mode; //类型 未使用
int g_g_record_count = 0; //记录条数 未使用
//Detbgr
//BgROILimit d_limit; //探测器本底谱限值
QVector<double> d_ROI_B_start_x1;// ROI B-rang start,x1(keV)
QVector<double> d_ROI_B_stop_x2; // ROI B_rang stop,x2(kev)
QVector<double> d_ROI_G_start_y1;// ROI G-rang start,y1(keV)
QVector<double> d_ROI_G_stop_y2; // ROI G_rang stop,y2(kev)
QString d_data_type; //探测体本底谱数据类型
double d_acquisition_live_time; //acquisition live time (s)
double d_acquisition_real_time; //acquisition live time (s)
//BgHistogram d_histogram; //Histogram Block
long d_b_channels; // β-channels
long d_g_channels; // γ-channels
QVector<long> d_counts; // counts at channels
//BgEC d_e_c; //能道
//BgEnergyChannel b_e_c;//b_Energy block
QVector<double> d_b_energy; // g_Energy:g_energy or b_Energy:electron_energy kev 能量
QVector<double> d_b_channel; // g_Energy:centroid_channel or b_Energy channel 道
QVector<double> d_b_uncertainty; //不确定度 未使用
QVector<QString> d_b_mode; //类型 未使用
int d_b_record_count; //记录条数 未使用
//BgEnergyChannel g_e_c;//g_Energy block
QVector<double> d_g_energy; // g_Energy:g_energy or b_Energy:electron_energy kev 能量
QVector<double> d_g_channel; // g_Energy:centroid_channel or b_Energy channel 道
QVector<double> d_g_uncertainty; //不确定度 未使用
QVector<QString> d_g_mode; //类型 未使用
int d_g_record_count; //记录条数 未使用
}*pBgSGD,BgSGD;
#endif