From 67c2b293420288941636ac3113ffe3400a3eab17 Mon Sep 17 00:00:00 2001
From: zhang <zhang@9a6e40ed-f3a0-4838-9b4a-bf418f78e88d>
Date: Fri, 8 Apr 2011 17:05:53 +0000
Subject: [PATCH] 08/04/2011

Add the component 'Status' for Mpoletype, this is for correctors which are used for orbit correction.
---
 tracy/tracy/inc/tracy_global.h | 50 ++++++++++++++++++++--------------
 1 file changed, 29 insertions(+), 21 deletions(-)

diff --git a/tracy/tracy/inc/tracy_global.h b/tracy/tracy/inc/tracy_global.h
index 095dc5a..889a867 100644
--- a/tracy/tracy/inc/tracy_global.h
+++ b/tracy/tracy/inc/tracy_global.h
@@ -16,13 +16,17 @@ typedef struct globvalrec {
                 CODimax;        /* maximum number of cod search before
 				   failing */
   double        CODeps;         // precision for closed orbit finder
-  Vector        CODvect;        // closed orbit
-  long int         bpm;          // family index of bpm
-  long int       hcorr;          // family index of horizontal corrector for orbit correction
-  long int       vcorr;          // family index of vertical corrector for orbit correction
-  long int         qt;           // family index of skew quadrupole
-  int           gs;             // girder start marker 
-  int           ge;             // girder end marker 
+  Vector        CODvect;        // closed orbit; beam position at the first element of lattice 
+  
+  // family index for special elements 
+  long int       bpm;          // family index of bpm
+  long int       hcorr;          // family index of horizontal corrector which are used for orbit correction
+  long int       vcorr;          // family index of vertical corrector which are used for orbit correction
+  long int       qt;           // family index of skew quadrupole
+  int            gs;             // family number of start girder  
+  int            ge;             // family number of end girder 
+  
+  // matrix
   Matrix        OneTurnMat,     // oneturn matrix 
                 Ascr,
                 Ascrinv,
@@ -73,20 +77,24 @@ struct DriftType {
 struct MpoleType {
   int         Pmethod;   // Integration Method
   int         PN;        // Number of integration steps
-  long quadFF1;         /* Entrance quadrupole Fringe field flag */
-  long quadFF2;         /* Exit quadrupole Fringe field flag */
-  double quadFFscaling;         /* quadrupole Fringe field scaling factor flag */
-  long sextFF1;         /* Entrance sextupole Fringe field flag */
-  long sextFF2;         /* Exit sextupole Fringe field flag */
+  long        quadFF1;         /* Entrance quadrupole Fringe field flag */
+  long        quadFF2;         /* Exit quadrupole Fringe field flag */
+  double      quadFFscaling;         /* quadrupole Fringe field scaling factor flag */
+  long        sextFF1;         /* Entrance sextupole Fringe field flag */
+  long        sextFF2;         /* Exit sextupole Fringe field flag */
+  
+  bool         Status;         /* specific for correctors used for orbit correction. If true, use the corrector 
+                                  to correct orbit, if false, not use. */
+  
   // Displacement Errors
-  Vector2     PdSsys;    // systematic [m] 
-  Vector2     PdSrms;    // rms [m]
-  Vector2     PdSrnd;    // random error? [m]
+  Vector2     PdSsys;    // systematic displacement error[m] 
+  Vector2     PdSrms;    // rms value of the displacement error[m]
+  Vector2     PdSrnd;    // (normal)random scale factor to displacement error PdSrms
   // Roll angle
-  double      PdTpar;    // design [deg], if not equal zero, then skew multipole
+  double      PdTpar;    // design rotation angle, if not equal zero, then skew multipole[deg]
   double      PdTsys;    // systematic [deg]
-  double      PdTrms;    // rms [deg]
-  double      PdTrnd;    // random error??? [deg]
+  double      PdTrms;    // rms rotation error of the element[deg]
+  double      PdTrnd;    // (normal)random scale factor to rotation error PdTrms
   // Multipole strengths
   mpolArray   PBpar;     // design field strength
   mpolArray   PBsys;     // systematic multipole errors
@@ -257,14 +265,14 @@ struct CellType {
   long int              Knum;        // Element Kid #
   double           S;           // Position in the ring [m]
   CellType*        next_ptr;    // pointer to next cell (for tracking)
-  Vector2          dS,          // Transverse displacement
-                   dT;          // dT = (cos(dT), sin(dT))
+  Vector2          dS,          // displacement error of the element[m]
+                   dT;          // rotation error of the element[degree], dT = (cos(dT), sin(dT))
   elemtype         Elem;        // Structure (name, type)
   Vector2          Nu,          // Phase advances 
                    Alpha,       // Alpha functions (redundant)
                    Beta,        // beta fonctions (redundant)
                    Eta, Etap;   // dispersion and its derivative (redundant)
-  Vector           BeamPos;     // Last position of the beam this cell
+  Vector           BeamPos;     // position of the beam at the cell; 
   Matrix           A,           // Floquet space to phase space transformation
                    sigma;       // sigma matrix (redundant)
   Vector2          maxampl[PLANES]; /* Horizontal and vertical physical
-- 
GitLab