0001
0002
0003
0004 close all
0005
0006 global GLOBVAL
0007 GLOBVAL.E0=0.51e9;
0008 E0=0.51e9;
0009
0010 load('dba.mat','RING');
0011
0012
0013 rf.('HarmNumber')=4;
0014 rf.('Length')=0;
0015 rf.('Energy')=E0;
0016 rf.('PassMethod')='IdentityPass';
0017 rf.('Class')='Cavity';
0018 cl=299792458;
0019 larc=findspos(RING,length(RING)+1);
0020 rf.('Frequency')=cl/larc*rf.('HarmNumber');
0021 rf.('Voltage')=0.5e6;
0022 RING=[{rf};RING];
0023
0024
0025
0026
0027
0028 positions=findcells(RING,'Length');
0029 L=getcellstruct(RING,'Length',positions);
0030 positions=positions(L>0);
0031
0032
0033 RING=atradon(RING);
0034 [l,a]=atx(RING,0,1);
0035
0036
0037
0038 nturns=5;
0039
0040
0041 [dppM,dppP]=MomAperture_allRing(RING,positions,nturns);
0042
0043
0044
0045 Ib=0.2;
0046
0047
0048
0049
0050 TL=TouschekPiwinskiLifeTime(RING,0.03,Ib)/3600;
0051 disp(' basic mode, constant momentum aperture: ')
0052 disp(TL)
0053
0054 TL=TouschekPiwinskiLifeTime(RING,dppM,Ib)/3600;
0055 disp('one sided momentum aperture :')
0056 disp(TL)
0057
0058 TL=TouschekPiwinskiLifeTime(RING,[dppM dppP],Ib)/3600;
0059 disp('two sided momentum aperture: 1/Ttot=1/2(1/Tup+1/Tdown) :')
0060 disp(TL)
0061
0062 TL=TouschekPiwinskiLifeTime(RING,[dppM dppP],Ib,positions)/3600;
0063 disp('input positions :')
0064 disp(TL)
0065
0066 TL=TouschekPiwinskiLifeTime(RING,[dppM dppP],Ib,positions,10e-9,10e-12)/3600;
0067 disp('input positions and emittances :')
0068 disp(TL)
0069
0070 TL=TouschekPiwinskiLifeTime(RING,[dppM dppP],Ib,positions,10e-9,10e-12,'quad')/3600;
0071 disp('input positions and emittances and integration method :')
0072 disp(TL)
0073
0074
0075 TL=TouschekPiwinskiLifeTime(RING,[dppM dppP],Ib,positions,10e-9,10e-12,'quad',a.espread,a.blength)/3600;
0076 disp('input positions and emittances and integration method and bunch lenght and energy spread :')
0077 disp(TL)
0078