Commit 20829fd5 authored by Christian Brabetz's avatar Christian Brabetz
Browse files

Initial commit.

parents
*.mexw64
/data/*
% Copyright 2009 The MathWorks, Inc.
classdef ParforProgMon < handle
properties ( GetAccess = private, SetAccess = private )
Port
HostName
end
properties (Transient, GetAccess = private, SetAccess = private)
JavaBit
end
methods ( Static )
function o = loadobj( X )
% Once we've been loaded, we need to reconstruct ourselves correctly as a
% worker-side object.
o = ParforProgMon( {X.HostName, X.Port} );
end
end
methods
function o = ParforProgMon( s, N, progressStepSize, width, height )
% ParforProgMon Build a Parfor Progress Monitor
% Use the syntax: ParforProgMon( 'Window Title', N, progressStepSize, width, height )
% where N is the number of iterations in the PARFOR loop
% progressStepSize indicates after how many iterations progress is shown
% width indicates the width of the progress window
% height indicates the width of the progress window
if nargin == 1 && iscell( s )
% "Private" constructor used on the workers
o.JavaBit = ParforProgressMonitor.createWorker( s{1}, s{2} );
o.Port = [];
elseif nargin == 5
% Normal construction
o.JavaBit = ParforProgressMonitor.createServer( s, N, progressStepSize, width, height );
o.Port = double( o.JavaBit.getPort() );
% Get the client host name from pctconfig
cfg = pctconfig;
o.HostName = cfg.hostname;
else
error( 'Public constructor is: ParforProgressMonitor( ''Text'', N, progressStepSize, width, height )' );
end
end
function X = saveobj( o )
% Only keep the Port and HostName
X.Port = o.Port;
X.HostName = o.HostName;
end
function increment( o )
% Update the UI
o.JavaBit.increment();
end
function delete( o )
% Close the UI
o.JavaBit.done();
end
end
end
This diff is collapsed.
This diff is collapsed.
*
!.gitignore
This diff is collapsed.
function [E_new, E_stop_front, E_stop_back] = elo_CR39(E_new, H_in_CR39, projmass)
% Routine to calculate the energyloss and energydeposition in 1.1 mm CR-39
thickness_front = 100; % um
thickness_middle = 900; % um
thickness_back = 100; % um
tmp = elo(E_new, thickness_front, H_in_CR39.x, H_in_CR39.c, H_in_CR39.crange, H_in_CR39.xrangeinv, H_in_CR39.crangeinv, H_in_CR39.k, H_in_CR39.Nele, H_in_CR39.Zeff, H_in_CR39.Ieff, projmass, 0);
E_new = tmp(:,1);
E_stop_front = mean(tmp(:,2));
tmp = elo(E_new, thickness_middle, H_in_CR39.x, H_in_CR39.c, H_in_CR39.crange, H_in_CR39.xrangeinv, H_in_CR39.crangeinv, H_in_CR39.k, H_in_CR39.Nele, H_in_CR39.Zeff, H_in_CR39.Ieff, projmass, 0);
E_new = tmp(:,1);
tmp = elo(E_new, thickness_back, H_in_CR39.x, H_in_CR39.c, H_in_CR39.crange, H_in_CR39.xrangeinv, H_in_CR39.crangeinv, H_in_CR39.k, H_in_CR39.Nele, H_in_CR39.Zeff, H_in_CR39.Ieff, projmass, 0);
E_new = tmp(:,1);
E_stop_back = mean(tmp(:,2));
end
\ No newline at end of file
function [E_new, E_stop, E_stop_corr] = elo_EBT3(E_new, H_in_Poly, H_in_ActiveEBT3, projmass)
% Routine to calculate the energyloss and energydeposition in EBT3
thickness_poly_ebt3 = 125; % microns
thickness_active_ebt3 = 28; % microns
tmp = elo(E_new, thickness_poly_ebt3, H_in_Poly.x, H_in_Poly.c, H_in_Poly.crange, H_in_Poly.xrangeinv, H_in_Poly.crangeinv, H_in_Poly.k, H_in_Poly.Nele, H_in_Poly.Zeff, H_in_Poly.Ieff, projmass, 0);
E_new = tmp(:,1);
%assume same correction like active layer in HD => needs to be checked
%experimentaly
tmp = elo(E_new, thickness_active_ebt3, H_in_ActiveEBT3.x, H_in_ActiveEBT3.c, H_in_ActiveEBT3.crange, H_in_ActiveEBT3.xrangeinv, H_in_ActiveEBT3.crangeinv, H_in_ActiveEBT3.k, H_in_ActiveEBT3.Nele, H_in_ActiveEBT3.Zeff, H_in_ActiveEBT3.Ieff, projmass, 1, H_in_ActiveEBT3.ccorr);
E_new = tmp(:,1);
E_stop = mean(tmp(:,2));
E_stop_corr = mean(tmp(:,3));
tmp = elo(E_new, thickness_poly_ebt3, H_in_Poly.x, H_in_Poly.c, H_in_Poly.crange, H_in_Poly.xrangeinv, H_in_Poly.crangeinv, H_in_Poly.k, H_in_Poly.Nele, H_in_Poly.Zeff, H_in_Poly.Ieff, projmass, 0);
E_new = tmp(:,1);
end
function [E_new, E_stop, E_stop_corr] = elo_HD810(E_new, H_in_Gel, H_in_Active, H_in_Poly, projmass)
% Routine to calculate the energyloss and energydeposition in HD810
thickness_poly_hd = 96.52; %microns
thickness_gel_hd = 0.75; %microns
thickness_active_hd = 6.50; %microns
tmp = elo(E_new, thickness_gel_hd, H_in_Gel.x, H_in_Gel.c, H_in_Gel.crange, H_in_Gel.xrangeinv, H_in_Gel.crangeinv, H_in_Gel.k, H_in_Gel.Nele, H_in_Gel.Zeff, H_in_Gel.Ieff, projmass, 0);
E_new = tmp(:,1);
tmp = elo(E_new, thickness_active_hd, H_in_Active.x, H_in_Active.c, H_in_Active.crange, H_in_Active.xrangeinv, H_in_Active.crangeinv, H_in_Active.k, H_in_Active.Nele, H_in_Active.Zeff, H_in_Active.Ieff, projmass, 1, H_in_Active.ccorr);
E_new = tmp(:,1);
E_stop = mean(tmp(:,2));
E_stop_corr = mean(tmp(:,3));
tmp = elo(E_new, thickness_poly_hd, H_in_Poly.x, H_in_Poly.c, H_in_Poly.crange, H_in_Poly.xrangeinv, H_in_Poly.crangeinv, H_in_Poly.k, H_in_Poly.Nele, H_in_Poly.Zeff, H_in_Poly.Ieff, projmass, 0);
E_new = tmp(:,1);
end
\ No newline at end of file
function [E_new, E_stop, E_stop_corr] = elo_HD810v2(E_new, H_in_Active, H_in_Poly, projmass)
% Routine to calculate the energyloss and energydeposition in HD810V2
thickness_poly_hdv2 = 96; %microns
thickness_active_hdv2 = 8; %microns
tmp = elo(E_new, thickness_active_hdv2, H_in_Active.x, H_in_Active.c, H_in_Active.crange, H_in_Active.xrangeinv, H_in_Active.crangeinv, H_in_Active.k, H_in_Active.Nele, H_in_Active.Zeff, H_in_Active.Ieff, projmass, 1, H_in_Active.ccorr);
E_new = tmp(:,1);
E_stop = mean(tmp(:,2));
E_stop_corr = mean(tmp(:,3));
tmp = elo(E_new, thickness_poly_hdv2, H_in_Poly.x, H_in_Poly.c, H_in_Poly.crange, H_in_Poly.xrangeinv, H_in_Poly.crangeinv, H_in_Poly.k, H_in_Poly.Nele, H_in_Poly.Zeff, H_in_Poly.Ieff, projmass, 0);
E_new = tmp(:,1);
end
\ No newline at end of file
function [E_new, E_stop, E_stop_corr] = elo_HS(E_new, H_in_Poly, H_in_Active, projmass)
% Routine to calculate the energyloss and energydeposition in HS
thickness_poly_hs = 96.53;
thickness_active_hs = 40;
tmp = elo(E_new, thickness_poly_hs, H_in_Poly.x, H_in_Poly.c, H_in_Poly.crange, H_in_Poly.xrangeinv, H_in_Poly.crangeinv, H_in_Poly.k, H_in_Poly.Nele, H_in_Poly.Zeff, H_in_Poly.Ieff, projmass, 0);
E_new = tmp(:,1);
tmp = elo(E_new, thickness_active_hs, H_in_Active.x, H_in_Active.c, H_in_Active.crange, H_in_Active.xrangeinv, H_in_Active.crangeinv, H_in_Active.k, H_in_Active.Nele, H_in_Active.Zeff, H_in_Active.Ieff, projmass, 1, H_in_Active.ccorr);
E_new = tmp(:,1);
E_stop = mean(tmp(:,2));
E_stop_corr = mean(tmp(:,3));
tmp = elo(E_new, thickness_poly_hs, H_in_Poly.x, H_in_Poly.c, H_in_Poly.crange, H_in_Poly.xrangeinv, H_in_Poly.crangeinv, H_in_Poly.k, H_in_Poly.Nele, H_in_Poly.Zeff, H_in_Poly.Ieff, projmass, 0);
E_new = tmp(:,1);
end
\ No newline at end of file
function [E_new, E_stop] = elo_LANEX(E_new, H_in_LANEX, projmass)
% Routine to calculate the energyloss and energydeposition in LANEX Regular
% calculates stopping in total LANEX regular equivalent SiN
%LANEX 12 mils thick .3048 mm(measured with caliper)
%LANEX fine @ effect density of ~3.1 g/cm^3
%544nm light peak, Gd2O2S:Tb, 7.3 g/cm^3 effective thickness= 33.7 mg/cm^2 Chapter3 and 4 of University
%of Grongingen NL, http://dissertations.ub.rug.nl/FILES/faculties/science/1998/s.n.boon/
thickness_LANEX = 324.8;% active Gd_2 O_2 S:Tb layer is measured to be 324.8 um thick with polystyrene backing 44.8 um (plastic side was away from stack)
tmp = elo(E_new, thickness_LANEX, H_in_LANEX.x, H_in_LANEX.c, H_in_LANEX.crange, H_in_LANEX.xrangeinv, H_in_LANEX.crangeinv, H_in_LANEX.k, H_in_LANEX.Nele, H_in_LANEX.Zeff, H_in_LANEX.Ieff, projmass, 0);
E_new = tmp(:,1);
E_stop = mean(tmp(:,2));
end
\ No newline at end of file
function [E_new, E_stop, E_stop_corr] = elo_MD55(E_new, H_in_Poly, H_in_Active, H_in_Adhesive, projmass)
% Routine to calculate the energyloss and energydeposition in MD55
thickness_poly_md = 67.31;
thickness_active_md = 16;
thickness_adhesive_md = 20;
thickness_polymiddle_md = 25;
tmp = elo(E_new, thickness_poly_md, H_in_Poly.x, H_in_Poly.c, H_in_Poly.crange, H_in_Poly.xrangeinv, H_in_Poly.crangeinv, H_in_Poly.k, H_in_Poly.Nele, H_in_Poly.Zeff, H_in_Poly.Ieff, projmass, 0);
E_new = tmp(:,1);
tmp = elo(E_new, thickness_active_md, H_in_Active.x, H_in_Active.c, H_in_Active.crange, H_in_Active.xrangeinv, H_in_Active.crangeinv, H_in_Active.k, H_in_Active.Nele, H_in_Active.Zeff, H_in_Active.Ieff, projmass, 1, H_in_Active.ccorr);
E_new = tmp(:,1);
Estop1 = mean(tmp(:,2));
E_stop1_corr = mean(tmp(:,3));
tmp = elo(E_new, thickness_adhesive_md, H_in_Adhesive.x, H_in_Adhesive.c, H_in_Adhesive.crange, H_in_Adhesive.xrangeinv, H_in_Adhesive.crangeinv, H_in_Adhesive.k, H_in_Adhesive.Nele, H_in_Adhesive.Zeff, H_in_Adhesive.Ieff, projmass, 0);
E_new = tmp(:,1);
tmp = elo(E_new, thickness_polymiddle_md, H_in_Poly.x, H_in_Poly.c, H_in_Poly.crange, H_in_Poly.xrangeinv, H_in_Poly.crangeinv, H_in_Poly.k, H_in_Poly.Nele, H_in_Poly.Zeff, H_in_Poly.Ieff, projmass, 0);
E_new = tmp(:,1);
tmp = elo(E_new, thickness_adhesive_md, H_in_Adhesive.x, H_in_Adhesive.c, H_in_Adhesive.crange, H_in_Adhesive.xrangeinv, H_in_Adhesive.crangeinv, H_in_Adhesive.k, H_in_Adhesive.Nele, H_in_Adhesive.Zeff, H_in_Adhesive.Ieff, projmass, 0);
E_new = tmp(:,1);
tmp = elo(E_new, thickness_active_md, H_in_Active.x, H_in_Active.c, H_in_Active.crange, H_in_Active.xrangeinv, H_in_Active.crangeinv, H_in_Active.k, H_in_Active.Nele, H_in_Active.Zeff, H_in_Active.Ieff, projmass, 1, H_in_Active.ccorr);
E_new = tmp(:,1);
Estop2 = mean(tmp(:,2));
E_stop2_corr = mean(tmp(:,3));
tmp = elo(E_new, thickness_poly_md, H_in_Poly.x, H_in_Poly.c, H_in_Poly.crange, H_in_Poly.xrangeinv, H_in_Poly.crangeinv, H_in_Poly.k, H_in_Poly.Nele, H_in_Poly.Zeff, H_in_Poly.Ieff, projmass, 0);
E_new = tmp(:,1);
E_stop = Estop1+Estop2;
E_stop_corr = E_stop1_corr+E_stop2_corr;
end
\ No newline at end of file
function [E_new, E_stop, E_stop_corr] = elo_MD55V2(E_new, H_in_Poly, H_in_Active, H_in_Adhesive, projmass)
% Routine to calculate the energyloss and energydeposition in MD-V2-55
thickness_poly_md = 96;
thickness_active_md = 17.5;
thickness_adhesive_md = 20;
thickness_polymiddle_md = 25;
tmp = elo(E_new, thickness_poly_md, H_in_Poly.x, H_in_Poly.c, H_in_Poly.crange, H_in_Poly.xrangeinv, H_in_Poly.crangeinv, H_in_Poly.k, H_in_Poly.Nele, H_in_Poly.Zeff, H_in_Poly.Ieff, projmass, 0);
E_new = tmp(:,1);
tmp = elo(E_new, thickness_active_md, H_in_Active.x, H_in_Active.c, H_in_Active.crange, H_in_Active.xrangeinv, H_in_Active.crangeinv, H_in_Active.k, H_in_Active.Nele, H_in_Active.Zeff, H_in_Active.Ieff, projmass, 1, H_in_Active.ccorr);
E_new = tmp(:,1);
Estop1 = mean(tmp(:,2));
E_stop1_corr = mean(tmp(:,3));
tmp = elo(E_new, thickness_adhesive_md, H_in_Adhesive.x, H_in_Adhesive.c, H_in_Adhesive.crange, H_in_Adhesive.xrangeinv, H_in_Adhesive.crangeinv, H_in_Adhesive.k, H_in_Adhesive.Nele, H_in_Adhesive.Zeff, H_in_Adhesive.Ieff, projmass, 0);
E_new = tmp(:,1);
tmp = elo(E_new, thickness_polymiddle_md, H_in_Poly.x, H_in_Poly.c, H_in_Poly.crange, H_in_Poly.xrangeinv, H_in_Poly.crangeinv, H_in_Poly.k, H_in_Poly.Nele, H_in_Poly.Zeff, H_in_Poly.Ieff, projmass, 0);
E_new = tmp(:,1);
tmp = elo(E_new, thickness_adhesive_md, H_in_Adhesive.x, H_in_Adhesive.c, H_in_Adhesive.crange, H_in_Adhesive.xrangeinv, H_in_Adhesive.crangeinv, H_in_Adhesive.k, H_in_Adhesive.Nele, H_in_Adhesive.Zeff, H_in_Adhesive.Ieff, projmass, 0);
E_new = tmp(:,1);
tmp = elo(E_new, thickness_active_md, H_in_Active.x, H_in_Active.c, H_in_Active.crange, H_in_Active.xrangeinv, H_in_Active.crangeinv, H_in_Active.k, H_in_Active.Nele, H_in_Active.Zeff, H_in_Active.Ieff, projmass, 1, H_in_Active.ccorr);
E_new = tmp(:,1);
Estop2 = mean(tmp(:,2));
E_stop2_corr = mean(tmp(:,3));
tmp = elo(E_new, thickness_poly_md, H_in_Poly.x, H_in_Poly.c, H_in_Poly.crange, H_in_Poly.xrangeinv, H_in_Poly.crangeinv, H_in_Poly.k, H_in_Poly.Nele, H_in_Poly.Zeff, H_in_Poly.Ieff, projmass, 0);
E_new = tmp(:,1);
E_stop = Estop1+Estop2;
E_stop_corr = E_stop1_corr+E_stop2_corr;
end
\ No newline at end of file
File added
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment