Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Userguide: Additional info about bv flag #1088

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 42 additions & 16 deletions doc/latexuguide/beams.tex
Original file line number Diff line number Diff line change
Expand Up @@ -252,29 +252,55 @@ \section{Referring to BEAM data attributes}
\section{BV FLAG}
\label{sec:bvflag}
When reversing the direction ($\vec V$) of a particle in a magnetic field
($\vec B$) while keeping its charge constant, the resulting force $\vec
V \times \vec B$ changes sign. This is equivalent to flipping the field,
but not the direction.

For practical reasons the properties of all elements of the LHC are
defined in the \madx input as if they apply to a clockwise proton beam
("LHC beam 1"). This allows a single definition for elements traversed
by both beams. Their effects on a beam with identical particle charge
but running in the opposite direction ("LHC beam 2") must then be
reversed inside the program.

In \madx this may be taken into account by setting the value of
the BV attribute in the \texttt{BEAM} commands. In the case of LHC
beam~1 (clockwise) and beam 2 (counter-clockwise), that are both treated
in \madx as clockwise proton beams, the \texttt{BEAM} commands must look
as follows:
($\vec B$) while keeping its charge constant,
the resulting force $\vec V \times \vec B$ changes sign.
This is equivalent to flipping the field, but not the direction.
Depending on the symmetry of the magnetic field upon $180^{\circ}$ rotation around the vertical axis,
this can result in a sign change of the field's gradient and hence the sign of its field strength.
E.g. Normal Quadrupoles, Skew Sextupoles, Normal Octupoles etc. change sign, while
Skew Quadrupoles, Normal Sextupoles, Skew Octupoles etc. are invariant.

\textbf{Please note:} In the current implementation, this sign change is visible in the TWISS tables, yet not in the ERROR tables!

\textbf{\underline{Usage of the BV-Flag in the LHC:}}\\
For practical reasons the properties of all elements of the default LHC sequence file are
defined in the \madx input as if they apply to a clockwise proton beam.
This allows a single definition for elements traversed by both beams.
For particles travelling in this direction (``LHC Beam 1''), the BV-flag needs to be positive.
Effects on a beam with identical particle charge but running in the opposite direction (``LHC Beam 2'')
must be reversed by a negative BV-flag, which is then taken into account in calculations.


The \texttt{BEAM} commands look therefore as follows:

\madxmp{
BEAM, SEQUENCE=lhcb1, PARTICLE=proton, PC=450, BV = +1;\\
\\
BEAM, SEQUENCE=lhcb2, PARTICLE=proton, PC=450, BV = -1;}

For ``LHC Beam 4'', which mirrors ``LHC Beam 2'' and can be found in a separate sequence file,
the lattice itself is defined in counter-clockwise direction and the BV-flag is therefore positive:

\madxmp{
BEAM, SEQUENCE=lhcb2, PARTICLE=proton, PC=450, BV = +1;
}

\textbf{Please note:}
With these definitions and the difference between TWISS and ERROR tables mentioned above, the following relations need to be taken into consideration for the LHC implementation.

Always:
\begin{itemize}
\item LHCB2 and LHCB4 have opposite (D)X-Orbit in TWISS and ERROR.
\end{itemize}

For upon mirroring on the vertical axis anti-symmetric common-aperture magnets (K0SL, K1L, K2SL, K3L, K4SL, K5L ...):
\begin{itemize}
\item LHCB4 circuits are implemented with "-" in the sequence, so that the value of the circuit itself can be identical for all beams.
\item LHCB2 and LHCB4 have the \textbf{same} sign KNL/KNSL-Values in TWISS, but the \textbf{opposite} in ERROR.
\item LHCB1 and LHCB2 have the \textbf{opposite} sign KNL/KNSL-Values in TWISS, but the \textbf{same} in ERROR.
\end{itemize}

For the other common magnets all beams have the same signs.
%% EOF


4 changes: 3 additions & 1 deletion doc/latexuguide/error.tex
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ \chapter{Error Definitions}
\hyperref[sec:esave]{\texttt{ESAVE}} option to save and reload errors.

WARNING: if errors are to be applied to a thin sequence produced by \hyperref[chap:makethin]{\texttt{MAKETHIN}}, it is advisable to save the sequence on a file and then reload it, in order for \madx to reinitialize its data structures in a suitable way.

%\href{http://consult.cern.ch/xwho/people/1808}{Werner Herr} 18.6.2002


Expand All @@ -38,6 +37,9 @@ \chapter{Error Definitions}
% Changed by: Werner Herr, 02-Sep-2002
% Changed by: Hans Grote, 25-Sep-2002

WARNING: The \hyperref[sec:bvflag]{BV-flag} is not considered in the magnetic field strenghts of the ERROR tables!


\section{EALIGN: Alignment Errors and permanent misalignments} %EALIGN: Define Misalignments}
\label{sec:ealign}

Expand Down
3 changes: 3 additions & 0 deletions doc/latexuguide/twiss.tex
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,9 @@ \chapter{Twiss Module}
These summary parameters can later be accessed via the
\hyperref[chap:tables]{table access functions} using the "SUMM" table.

The direction of the beam, as set via \hyperref[sec:bvflag]{BV-flag}, is considered in the sign
of the magnetic field strengths in the table.

\section{Twiss Parameters for a Period}
\label{sec:twissperiod}

Expand Down