40MeV 電子ライナックの例

ソース

main

// ================================= //
// ===     e-linac for TAT       === //
// ================================= //

//  -- [1] beginning             --  //
title, "e-linac for tat"
option,-echo;

//  -- [2] call sequence file    --  //
call, file="e-linac.seq";

//  -- [3] define beam           --  //
Beam, particle=electron, sequence=hebt, energy=0.035;

//  -- [4] sequence to be used   --  //
use, sequence=hebt;

//  -- [5] matching              --  //
// match, orbit;
//   constraint, range=bpmv5, y=0.0, py=0.0;     // global
//   vary, name=kcv9, step=0.0001;               // knob
//   lmdif,calls=1000,tolerance=1.0E-10;
// endmatch;

//  -- [6] twiss parameter       --  //
select, flag=twiss, column=name,s,x,y,px,py,alfx,alfy,betx,bety,emitx,emity,dx,dy;
survey, file="out/survey.tfs";
twiss , betx=3.0, bety=3.0, save, centre, file="out/twiss.tfs";
stop;

シーケンス ( e-linac.seq )

// ============================================== //
// ===         35MeV e-linac sequence         === //
// ============================================== //

//  -------------------------------  //
//  --   part1   ( before  BM )  --  //
//  -------------------------------  //
L_bpm2  = 0.000;
L_st2   = 0.050;
L_qm5   = 0.100;
L_qm6   = 0.100;
D_bpm2  = 0.380;
D_st2   = 0.300;
D_qm5   = 0.100;
D_qm6   = 0.100;

//  -------------------------------  //
//  --   part2   ( between BM )  --  //
//  -------------------------------  //
L_bm1   = 0.2965;      // r=755 (mm), th=22.5 (deg) => l= 296.4878066825367 (mm)
D_bm1   = 0.2253;
L_qa1   = 0.1500;
D_qa1   = 0.4353;
L_bpm3  = 0.0;
D_bpm3  = 0.1750;
L_qa2   = 0.1500;
D_qa2   = 0.1750;
L_bm2   = 0.2965;      // r=755 (mm), th=22.5 (deg) => l= 296.4878066825367 (mm)
D_bm2   = 0.4353;

//  -------------------------------  //
//  --   part3   ( after   BM )  --  //
//  -------------------------------  //
L_qm7   = 0.1000;
D_qm7   = 0.2253;
L_qm8   = 0.1000;
D_qm8   = 0.1000;
L_st4   = 0.0500;
D_st4   = 0.1000;
L_bpm4  = 0.0;
D_bpm4  = 0.2300;
L_qm9   = 0.1000;
D_qm9   = 0.6200;
L_qm10  = 0.1000;
D_qm10  = 0.1000;
L_st5   = 0.0500;
D_st5   = 0.1000;
L_bpm5  = 0.0;
D_bpm5  = 1.3;
L_wnd   = 0.0;
D_wnd   = 0.1500;
L_tgt   = 0.0;
D_tgt   = 0.1500;

//  -------------------------------  //
//  --   part3   ( after   BM )  --  //
//  -------------------------------  //
// Q1L	.04	4.0654682628528915	7.285817219852516	1.2493921639033436
// Q2L	.04	-3.4964834083706653	7.285817219852516	-1.074532794057735
// Q3L	.1	1.7821230561294619	40.8393122674977	1.23932588121041
// Q4L	.1	-1.8104708128710665	40.8393122674977	-1.2590395078779364
// Q5L	.1	2.3237965765149093	78.00162114811437	3.0872065639121247
// Q6L	.1	-2.71806823381098	78.00162114811437	-3.611003724416777
// QA.1	.15	1.6090044563327268	78.00162114811437	1.4250613756114447
// QA.2	.15	1.6090044563327268	78.00162114811437	1.4250613756114447
// Q7L	.1	-1.57954507734945	78.00162114811437	-2.0984547356987724
// Q8L	.1	.7817037093213575	78.00162114811437	1.0385077793989368
// Q9L	.1	1.2781688696774305	78.00162114811437	1.6980708914608331
// Q10L	.1	-.9298862812942948	78.00162114811437	-1.2353710562776383
K_qm5   = -3.87425;
K_qm6   =  3.88555;
K_qm7   =  2.46096;
K_qm8   = -2.60920;
K_qm9   =  2.03122;
K_qm10  = -1.98339;
K_qa1   = -1.40965;
K_qa2   = -1.40965;

//  -------------------------------  //
//  --   position (at)           --  //
//  -------------------------------  //
// --  part 1  -- //
at_bpm2 =                    D_bpm2;
at_st2  = at_bpm2 + L_bpm2 + D_st2;
at_qm5  = at_st2  + L_st2  + D_qm5;
at_qm6  = at_qm5  + L_qm5  + D_qm6;

// --  part 2  -- //
at_bm1  = at_qm6  + L_qm6  + D_bm1;
at_qa1  = at_bm1  + L_bm1  + D_qa1;
at_bpm3 = at_qa1  + L_qa1  + D_bpm3;
at_qa2  = at_bpm3 + L_bmp3 + D_qa2;
at_bm2  = at_qa2  + L_qa2  + D_bm2;

// -- part 3 -- //
at_qm7  = at_bm2  + L_bm2  + D_qm7;
at_qm8  = at_qm7  + L_qm7  + D_qm8;
at_st4  = at_qm8  + L_qm8  + D_st4;
at_bpm4 = at_st4  + L_st4  + D_bpm4;
at_qm9  = at_bpm4 + L_bpm4 + D_qm9;
at_qm10 = at_qm9  + L_qm9  + D_qm10;
at_st5  = at_qm10 + L_qm10 + D_st5;
at_bpm5 = at_st5  + L_st5  + D_bpm5;
at_wnd  = at_bpm5 + L_bpm5 + D_wnd;
at_tgt  = at_wnd  + L_wnd  + D_tgt;

L_tot   = at_tgt;


//  -------------------------------------  //
//  --  HEBT sequence after acc.tube   --  //
//  -------------------------------------  //
hebt: sequence, L=L_tot, refer=entry;

  //  -------------------------------  //
  //  --   part1   ( before  BM )  --  //
  //  -------------------------------  //
  bpm2  : monitor   , L=L_bpm2, at=at_bpm2;
  st2   : kicker    , L=L_st2 , at=at_st2;
  qm5   : quadrupole, L=L_qm5 , at=at_qm5, K1=K_qm5;
  qm6   : quadrupole, L=L_qm6 , at=at_qm6, K1=K_qm6;
  
  //  -------------------------------  //
  //  --   part2   ( between BM )  --  //
  //  -------------------------------  //
  bm1   : SBEND     , L=L_bm1 , at=at_bm1, angle=PI/8;
  qa1   : quadrupole, L=L_qa1 , at=at_qa1, K1=K_qa1;
  bpm3  : monitor   , L=L_bpm3, at=at_bpm3;
  qa2   : quadrupole, L=L_qa2 , at=at_qa2, K1=K_qa2;
  bm2   : SBEND     , L=L_bm2 , at=at_bm2, angle=PI/8;

  //  -------------------------------  //
  //  --   part3   ( after   BM )  --  //
  //  -------------------------------  //
  qm7   : quadrupole, L=L_qm7 , at=at_qm7, K1=K_qm7;
  qm8   : quadrupole, L=L_qm8 , at=at_qm8, K1=K_qm8;
  st4   : kicker    , L=L_st4 , at=at_st4;
  bpm4  : monitor   , L=L_bpm4, at=at_bpm4;
  qm9   : quadrupole, L=L_qm9 , at=at_qm9, K1=K_qm9;
  qm10  : quadrupole, L=L_qm10, at=at_qm10, K1=K_qm10;
  st5   : kicker    , L=L_st5 , at=at_st5;
  bpm5  : monitor   , L=L_bpm5, at=at_bpm5;
  wnd   : monitor   , L=L_wnd , at=at_wnd;
  tgt   : monitor   , L=L_tgt , at=at_tgt;
  
endsequence;