Back to home page

sPhenix code displayed by LXR

 
 

    


Warning, /analysis/Prototype3/EMCal/ShowerCalib/Fit/DrawDataSet.m is written in an unsupported language. File is not indexed.

0001 function DrawDataSet(DataSet, calibconst, name)
0002 
0003     N_Runs = size(DataSet , 2);
0004 
0005     figure('name',['DrawDataSet_' name],'PaperPositionMode','auto', ...
0006         'position',[100,0,1800,1000]) ;
0007     
0008     for i = 1:N_Runs
0009         subplot(1,1,i);
0010 
0011         total_E = sum( DataSet(i).data* calibconst', 2) ;
0012 
0013     %     hist(total_E, 0:.1:25);
0014         histfit(total_E, 50,'normal');
0015         [mu1, sigma1] = normfit(total_E);
0016         
0017         [mu2, sigma2] = normfit(total_E((total_E >(mu1 - 2*sigma1)) & (total_E <(mu1 + 2*sigma1))));
0018         
0019         title(sprintf('%s, E = %.1f GeV, dE/E = %.1f%%', DataSet(i).FileID, DataSet(i).E, sigma2/mu2*100 ));
0020         xlabel('Measrued Energy (GeV)');
0021         set(gca,'XLim',[DataSet(i).E/2 DataSet(i).E*1.5])
0022     end
0023 
0024 end