Skip to content
Snippets Groups Projects
Commit 31ad25b1 authored by zhang's avatar zhang
Browse files

30/06/2011

Get the family index of RF cavity and check whether RF harmonic number is defined or not for the lattice of the ring.
parent 389db053
No related branches found
No related tags found
No related merge requests found
......@@ -73,7 +73,10 @@
02/06/08 energy RF acceptance set to 1 just to avoid overflow during tracking
22/06/10 add new globval. flag and modify new name of variables
from Tracy III Read_Lattice(), which is defined in physlib.cc
30/06/11 Get the family index of RF cavity for the lattice of ring; and check whether the RF harmonic number is defined. This is critical to get the
correct COD for the lattice with negative momentum compact factor.
****************************************************************************/
void Read_Lattice(char *fic)
{
......@@ -142,6 +145,16 @@ void Read_Lattice(char *fic)
// for a ring
if (globval.RingType == 1)
{
/* find the family index of RF cavity*/
for(i=0; i<=globval.Cell_nLoc; i++){
if(Cell[i].Elem.Pkind == Cavity)
globval.cav = ElemIndex(Cell[i].Elem.PName);
}
/*check whether the RF cavity hormonic number is defined or not*/
if(Cell[Elem_GetPos(globval.cav, 1)].Elem.C->Ph == 0){
printf("soleilcommon: Error!!! Define RF cavity harmonic number in the lattice!\n");
exit_(1);
}
/* Defines global variables for Tracy code */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment