/*! @page  lemusetup LEMuSR Installation

<BR>
<B> Previous:</B> @ref ssg4setup2
<B> Up:</B> @ref setup
<B> Next:</B>  @ref Mandatory
<BR>

<HR>
 
<UL>
<LI><A HREF="#getlemcode">Getting the code</A>
<LI><A HREF="#modify">Modification of Geant code</A>
</UL>

\anchor getlemcode
@section slemusetup Getting the code
To install the \lemu simulation one should download the code from the SVN server and compile it.
The main directories of the simulation are the following:
<ul>
<li>The Base directory LEMuSR.
<li>The include sub-directory for the header files.
<li>The src sub-directory for the source files.
<li>The FieldMaps sub-directory for the field maps.
<li>The MACROS directory which contains useful macro files.
</ul>

\anchor modify
@section slemusetupb Modifications of Geant4 code

The source code of Geant4 had to be optimized for the LEMuSR simulation. The following list reports all modifictations of Geant4 which are required by the simulation. It's important to copy those files frome the directory <I>G4MODIFIED</I> to their respective Geant4 directories.
<DL>
<DT></DT>
<DD><B><I>G4ParticleDefinition</I></B>: this library collects all the parameters needed to define a particle, like the mass, the charge, the spin etc. We modified the original version because it did not include the definition of the gyromagnetic ratio of the particles. Those one are needed when we want to compare the asymmetry spectra of muon and muonium for example. 

<P>
Directory: particle/management
</DD>
<DT></DT>
<DD><B><I>G4Muonium</I></B>: is the class for muonium particle, which do not come directly with the original code.

<P>
Directory: particle/leptons
</DD>
<DT></DT>
<DD><B><I>G4FieldManager</I></B>: when a new field is created, we have to assign it to a given volume. This is done via the field manager, which stores the pointer to the field. For example, the electric field of the third lense will be assigned to the vacuum surounding the third lense. Each volume containing a field has a field manager. 

<P>
During the transport of a particle, the field manager will be in charge of returning the pointer to the field and other parameter which the user can specify, like the minimal step size in the volume. We modified this class to be able to handle pointers for different types of field and added a boolean variable to set whereas the considered field has a magnetic component or not (mainly for spin precession). 

<P>
Directory: geometry/magneticfield
</DD>
<DT></DT>
<DD><B><I>G4El_UsualEqRhs</I></B> and <B><I>G4El_MagEqRhs</I></B>: thoses classes define the motion equations in electric field and electromagnetic field.

<P>
Directory: geometry/magneticfield
</DD>
<DT></DT>
<DD><B><I>G4MultipleScattering52</I></B>: contains the parameters for the multiple scattering process. It was modified to be linked to the low energy muons scattering class implemented according to Meyer's algorithm.

<P>
Directory: processes/electromagnetic/standard/
</DD>
</DL>
After copying those classes in the indicated directories, it is recommanded to recompile the whole geant4 code.




*/