#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 ROI_B_Boundary_start; QVector ROI_B_Boundary_stop; QVector ROI_G_Boundary_start; QVector 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 MDC; QVector 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 LC; QVector 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 ROI_net_coutns; //感兴趣区净计数 QVector ROI_net_err; QVector ROI_con_uncer; //感兴趣区浓度和不确定度 [n..0]浓度 [n..1]不确定度 QVector 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 b_fitting_para; QVector 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 b_fitting_e_c; QVector g_fitting_e_c; QVector b_fitting_c_e; QVector g_fitting_c_e; tagBgFittingPara() { b_fitting_type=poly2; g_fitting_type=poly2; } }*pBgFittingPara,BgFittingPara; //样品谱生成数据 typedef struct tagBgSmapleGenerate { BgBoundary s_boungdary; QVector s_roi_cts; //样品普感兴趣区计数 QVector s_deduct_d_cts; //样品谱扣除探测器本底谱数据 BgFittingPara s_fittingPara; // 拟合后值 QString s_collection_time; //采集时间 }*pBgSampleGenerate,BgSampleGenerate; //气体本地谱生成数据 typedef struct tagBgGasGenerate { BgBoundary g_boungdary; QVector g_roi_cts; //气体本底谱感兴趣区计数 QVector g_deduct_d_cts; //气体本底谱扣除探测器本底谱数据 BgFittingPara g_fittingPara; // 拟合后值 }*pBgGasGenerate,BgGasGenerate; //探测器本地谱生成数据 typedef struct tagBgDetbgrGenerate { BgBoundary d_boungdary; QVector 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 b_e_cal; //b 能刻度系数 QVector 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 energy; // g_Energy:g_energy or b_Energy:electron_energy kev 能量 QVector channel; // g_Energy:centroid_channel or b_Energy channel 道 QVector uncertainty; //不确定度 未使用 QVector 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 ROI_B_start_x1;// ROI B-rang start,x1(keV) QVector ROI_B_stop_x2; // ROI B_rang stop,x2(kev) QVector ROI_G_start_y1;// ROI G-rang start,y1(keV) QVector ROI_G_stop_y2; // ROI G_rang stop,y2(kev) }*pBgROILimit,BgROILimit; typedef struct tagBgHistogram { long b_channels; // β-channels long g_channels; // γ-channels QVector counts; // counts at channels }*pBgHistorgram,BgHistogram; //样品符合谱所需数据 typedef struct tagBgROIRatios { QVector ratio_id; QVector ROI_num_highter_G_energy_ROI; QVector ROI_num_lower_G_energy_ROI; QVector count_ratio; QVector count_ratio_uncertainty; }*pBgRoiRatios,BgRoiRatios; typedef struct tagBgEfficiencies { QVector nuclide_name; // nuclide name QVector ROI_number; // ROI number QVector bg_efficiency; // β-γ coincidence efficiency (counts in ROI/β-γ pair emitted) QVector uncertainty; }*pBgBgEfficiencies,BgBgEfficiencies; typedef struct tagBgSample { BgROILimit s_limit; //样品谱限值 QString s_data_type; //样品数据类型 QVector s_count_ratio; //样品谱比率计数 QVector 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 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 s_ROI_B_start_x1;// ROI B-rang start,x1(keV) QVector s_ROI_B_stop_x2; // ROI B_rang stop,x2(kev) QVector s_ROI_G_start_y1;// ROI G-rang start,y1(keV) QVector s_ROI_G_stop_y2; // ROI G_rang stop,y2(kev) QString s_data_type; //样品数据类型 QVector s_count_ratio; //样品谱比率计数 QVector 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 s_counts; // counts at channels //BgEC s_e_c; //能道 //BgEnergyChannel b_e_c;//b_Energy block QVector s_b_energy; // g_Energy:g_energy or b_Energy:electron_energy kev 能量 QVector s_b_channel; // g_Energy:centroid_channel or b_Energy channel 道 QVector s_b_uncertainty; //不确定度 未使用 QVector s_b_mode; //类型 未使用 int s_b_record_count; //记录条数 未使用 //BgEnergyChannel g_e_c;//g_Energy block QVector s_g_energy; // g_Energy:g_energy or b_Energy:electron_energy kev 能量 QVector s_g_channel; // g_Energy:centroid_channel or b_Energy channel 道 QVector s_g_uncertainty; //不确定度 未使用 QVector s_g_mode; //类型 未使用 int s_g_record_count; //记录条数 未使用 //BgRoiRatios s_roi_ratio; QVector ratio_id; QVector ROI_num_highter_G_energy_ROI; QVector ROI_num_lower_G_energy_ROI; QVector count_ratio; QVector count_ratio_uncertainty; //BgBgEfficiencies s_bg_efficiency_show; QVector nuclide_name; // nuclide name QVector ROI_number; // ROI number QVector bg_efficiency; // β-γ coincidence efficiency (counts in ROI/β-γ pair emitted) QVector uncertainty; //gas //BgROILimit g_limit; //气体本底谱限值 QVector g_ROI_B_start_x1;// ROI B-rang start,x1(keV) QVector g_ROI_B_stop_x2; // ROI B_rang stop,x2(kev) QVector g_ROI_G_start_y1;// ROI G-rang start,y1(keV) QVector g_ROI_G_stop_y2; // ROI G_rang stop,y2(kev) QString g_data_type; //气体本底谱数据类型 QVector 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 g_counts; // counts at channels //BgEC g_e_c; //能道 //BgEnergyChannel b_e_c;//b_Energy block QVector g_b_energy; // g_Energy:g_energy or b_Energy:electron_energy kev 能量 QVector g_b_channel; // g_Energy:centroid_channel or b_Energy channel 道 QVector g_b_uncertainty; //不确定度 未使用 QVector g_b_mode; //类型 未使用 int g_b_record_count; //记录条数 未使用 //BgEnergyChannel g_e_c;//g_Energy block QVector g_g_energy; // g_Energy:g_energy or b_Energy:electron_energy kev 能量 QVector g_g_channel; // g_Energy:centroid_channel or b_Energy channel 道 QVector g_g_uncertainty; //不确定度 未使用 QVector g_g_mode; //类型 未使用 int g_g_record_count = 0; //记录条数 未使用 //Detbgr //BgROILimit d_limit; //探测器本底谱限值 QVector d_ROI_B_start_x1;// ROI B-rang start,x1(keV) QVector d_ROI_B_stop_x2; // ROI B_rang stop,x2(kev) QVector d_ROI_G_start_y1;// ROI G-rang start,y1(keV) QVector 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 d_counts; // counts at channels //BgEC d_e_c; //能道 //BgEnergyChannel b_e_c;//b_Energy block QVector d_b_energy; // g_Energy:g_energy or b_Energy:electron_energy kev 能量 QVector d_b_channel; // g_Energy:centroid_channel or b_Energy channel 道 QVector d_b_uncertainty; //不确定度 未使用 QVector d_b_mode; //类型 未使用 int d_b_record_count; //记录条数 未使用 //BgEnergyChannel g_e_c;//g_Energy block QVector d_g_energy; // g_Energy:g_energy or b_Energy:electron_energy kev 能量 QVector d_g_channel; // g_Energy:centroid_channel or b_Energy channel 道 QVector d_g_uncertainty; //不确定度 未使用 QVector d_g_mode; //类型 未使用 int d_g_record_count; //记录条数 未使用 }*pBgSGD,BgSGD; #endif