Analysis Software
Documentation for sPHENIX simulation software
|
Go to the source code of this file.
Functions | |
DataSet (i).E | |
fprintf ('processing%s\n', filename) | |
end | DrawDataSet (DataSet, ones(1, Ndata), 'Inputs') |
SaveCanvas (['EnergyCalibFIt'], gcf) | |
disp (object_function(ones(1, Ndata+N_Runs-1), DataSet, 10)) | |
disp (object_function(ones(1, Ndata+N_Runs-1), DataSet, 2)) | |
disp (object_function(ones(1, Ndata+N_Runs-1), DataSet, 1)) | |
DrawDataSet (DataSet, calib_const,'Optimized') | |
dlmwrite (filename,[total_E calib_total_E]) | |
end | save ('fit.mat') |
save ('goodfit.mat') | |
Variables | |
clear all close all const double | Es [] |
const double | runs [] |
RunList | |
N_Runs = size(RunList, 2) | |
sim_const = 2.409/100 | |
sim_stat = 11.77/100 | |
Ndata = 20 | |
Readin global DataSet | DataSet =struct('run',{},'E',{},'DE',{},'data',{}) |
for | i |
filename = sprintf('beam_0000%d-0000_DSTReader.root_DrawPrototype2EMCalTower_Prototype2_DSTReader.dat', DataSet(i).run ) | |
data = textread(filename) | |
total_E = sum(data, 2) | |
options = optimset('Display','iter','TolFun',10000, 'MaxFunEvals', 100000,'MaxIter',100000,'PlotFcns',@optimplotfval ) | |
x | |
calib_const = abs(x(1:Ndata)) | |
calib_total_E = sum( DataSet(i).data* calib_const', 2) | |
DataSet | ( | i | ) |
dlmwrite | ( | filename | ) |
DrawDataSet | ( | DataSet | , |
calib_const | , | ||
'Optimized' | |||
) |
end save | ( | 'fit.mat' | ) |
save | ( | 'goodfit.mat' | ) |
SaveCanvas | ( | gcf | ) |
Definition at line 77 of file EnergyCalibFit.m.
View newest version in sPHENIX GitHub at line 77 of file EnergyCalibFit.m
calib_total_E = sum( DataSet(i).data* calib_const', 2) |
Definition at line 89 of file EnergyCalibFit.m.
View newest version in sPHENIX GitHub at line 89 of file EnergyCalibFit.m
data = textread(filename) |
Definition at line 36 of file EnergyCalibFit.m.
View newest version in sPHENIX GitHub at line 36 of file EnergyCalibFit.m
Definition at line 24 of file EnergyCalibFit.m.
View newest version in sPHENIX GitHub at line 24 of file EnergyCalibFit.m
clear all close all const double Es[] |
Definition at line 7 of file EnergyCalibFit.m.
View newest version in sPHENIX GitHub at line 7 of file EnergyCalibFit.m
filename = sprintf('beam_0000%d-0000_DSTReader.root_DrawPrototype2EMCalTower_Prototype2_DSTReader.dat', DataSet(i).run ) |
Definition at line 32 of file EnergyCalibFit.m.
View newest version in sPHENIX GitHub at line 32 of file EnergyCalibFit.m
Definition at line 26 of file EnergyCalibFit.m.
View newest version in sPHENIX GitHub at line 26 of file EnergyCalibFit.m
Definition at line 16 of file EnergyCalibFit.m.
View newest version in sPHENIX GitHub at line 16 of file EnergyCalibFit.m
Ndata = 20 |
Definition at line 20 of file EnergyCalibFit.m.
View newest version in sPHENIX GitHub at line 20 of file EnergyCalibFit.m
options = optimset('Display','iter','TolFun',10000, 'MaxFunEvals', 100000,'MaxIter',100000,'PlotFcns',@optimplotfval ) |
Definition at line 58 of file EnergyCalibFit.m.
View newest version in sPHENIX GitHub at line 58 of file EnergyCalibFit.m
RunList |
Definition at line 12 of file EnergyCalibFit.m.
View newest version in sPHENIX GitHub at line 12 of file EnergyCalibFit.m
const double runs[] |
Definition at line 9 of file EnergyCalibFit.m.
View newest version in sPHENIX GitHub at line 9 of file EnergyCalibFit.m
sim_const = 2.409/100 |
Definition at line 18 of file EnergyCalibFit.m.
View newest version in sPHENIX GitHub at line 18 of file EnergyCalibFit.m
sim_stat = 11.77/100 |
Definition at line 19 of file EnergyCalibFit.m.
View newest version in sPHENIX GitHub at line 19 of file EnergyCalibFit.m
Definition at line 39 of file EnergyCalibFit.m.
View newest version in sPHENIX GitHub at line 39 of file EnergyCalibFit.m
x |
Definition at line 60 of file EnergyCalibFit.m.
View newest version in sPHENIX GitHub at line 60 of file EnergyCalibFit.m