Changeset 32 in TRACY3 for trunk/tracy/tracy/src/soleilcommon.cc


Ignore:
Timestamp:
Apr 9, 2014, 3:50:11 PM (10 years ago)
Author:
zhangj
Message:

active the transport of the twiss functions and orbits of the transfer line.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tracy/tracy/src/soleilcommon.cc

    r11 r32  
    153153    /*check whether the RF cavity hormonic number is defined or not*/
    154154    if(Cell[Elem_GetPos(globval.cav, 1)].Elem.C->Ph == 0){
    155       printf("soleilcommon():    Error!!! Please define RF harmonic number in the lattice! \n"
    156               "Because this parameter will be used to calculate stable phase for positive / negative momentum compaction factor\n");
     155      printf("soleilcommon():    Error!!! Please define the RF harmonic number in the lattice! \n"
     156              "Because this parameter will be used to calculate the stable phase for the lattice with the "
     157              "positive / negative momentum compaction factor\n");
    157158      exit_(1);
    158159    }
     
    169170    globval.emittance  = false; /* emittance  on/off */
    170171    globval.pathlength = false; /* Path lengthening computation */
    171     globval.CODimax    = 40L;   /* maximum number of iterations for COD algo */
     172    globval.CODimax    = 40L;   /* maximum number of iterations for COD algorithm */
    172173    globval.dPcommon   = 1e-10; /* Common energy step for energy differentiation */
    173174    globval.delta_RF  = RFacceptance;/* energy acceptance for SOLEIL */
    174175
    175    /* define x/y physical aperture, use the default values: +- 1 meter  */
     176   /* define x/y physical aperture (vacuum chamber), use the default values: +- 1 meter  */
    176177    globval.Aperture_on = false;
    177178   
     
    183184  else
    184185  { // for transfer lines 
    185     /* Initial settings : */
    186     beta[0]  = 8.1;
    187     alpha[0] = 0.0;
    188     beta[1]  = 8.1;
    189     alpha[1] = 0.0;
    190     eta[0]   = 0.0;
    191     etap[0]  = 0.0;
    192     eta[1]   = 0.0;
    193     etap[1]  = 0.0;
    194 
     186    /* Initial optical parameters of the transfer line: */
     187    beta[0]  = 34.46;   // beta_x
     188    beta[1]  = 33.94;   // beta_y
     189    alpha[0] = -4.24;   // alpha_x
     190    alpha[1] = -4.34;   // alpha_y
     191    eta[0]   = 0.0;   // eta_x
     192    etap[0]  = 0.0;   // etap_x
     193    eta[1]   = 0.0;   // eta_y
     194    etap[1]  = 0.0;   // etap_y
     195
     196    // set the initial orbit of the transfer line is zero
    195197     for (i = 0; i < ss_dim; i++) {
    196198    {
     
    200202    dP = codvect[4];
    201203
     204    codvect[0]=1e-4;
     205   
    202206    /* Defines global variables for Tracy code */
    203207    globval.MatMeth = false;  /* matrix method */
     
    214218    globval.Aperture_on = false;
    215219   
    216    
     220    // transfer the optical functions and the orbit
    217221    TransTwiss(alpha, beta, eta, etap, codvect);
     222 
     223    // print location, twiss parameters and close orbit/orbit at all elements position to a file
     224      prt_cod("cod.out", globval.bpm, true);
    218225    }
    219226  }//finish read the transfer line
Note: See TracChangeset for help on using the changeset viewer.