Changes

Jump to navigation Jump to search
3,111 bytes added ,  10:59, 14 July 2016
Line 112: Line 112:     
== Alternate Magnet Lattice Import ==
 
== Alternate Magnet Lattice Import ==
 +
In addition to the importing of a full map, a simpler method of import has been developed and added to the code package.  In this scheme, rather than supplying a full field map, one only needs to specify the location of the magnets in coordinate space, the rotational angle of the magnet (about the vertical or y-axis), the bore aperture radius, along with the field strength and field gradient across the magnet.  An example of the input file format is shown below:
 +
 +
## protons, Draft linac-ring lattice V3.00,  E_e = n/a, E_p=249.358GeV
 +
##  Source: 21-Apr-2016 from Brett Parker
 +
##
 +
## Notes: this is still a draft version with only the first few forward side magnets
 +
##
 +
##  magnet_name1 center_z[m] center_x[m] center_y[m] aperture_radius[m] length[m] angle[mrad]  B[T]  gradient[T/m]
 +
 +
      Q0HF        5.70        0.00500      0.00        0.041          1.600      -14.0      0.000    129.00
 +
      Q1HF        8.55        0.00900      0.00        0.060          3.000      -14.0      0.000      -86.00
 +
      B0HF        11.40      0.00500      0.00        0.066          1.600      -14.0    -4.055      0.00
 +
      Q2HF        13.65      0.00955      0.00        0.077          1.800      7.8      0.000      59.50
 +
      B1HF        16.35      0.02261      0.00        0.092          2.500      -4.0    -4.059      0.00
 +
 +
Note that there is space reserved for six header lines (this requirement is hard coded for now so the first six lines really need to be reserved for the comments), where comments associated with the lattice design can be denoted (such as version, beam energy for which the field are tuned, the author and date, etc).  The last header line denotes the format for the importing of each magnet in the lattice.  Each magnet element is denoted by its own line with the following information required (in this specific order):
 +
 +
magnet_name, magnet center in z (in meters), magnet center in x (m), magnet center in y (m), aperture radius (m), magnet length (m), rotational angle around the vertical (mrad), the magnetic field strength (Tesla) and the magnetic field gradient (T/m).
 +
 +
Note that an input gradient of 0 indicates a bending dipole magnet, where as if a gradient is given a non-zero value, a quadrupole field is assumed.
 +
 +
The field at each step in the particle's path is then calculated from the field strengths and gradients based on the relative location within the magnet volume of the particle.  Note that this then represents the ideal field and no fringe field effects will be taken into account.
 +
 +
An example of the code used in the simulation.C macro referenced above is also shown below:
 +
EicRunSim *fRun = new EicRunSim("TGeant4");
 +
EicMagneticFieldFromGradients *fField = new EicMagneticFieldFromGradients();
 +
fField->AddBeamLineElementGrads("IR/HADRON/v3.01", 1.0, kBlue)
 +
fField->CreateYokeVolumes(kTRUE);
 +
fRun->SetField(fField);
 +
 +
The above code will read all files denoted with the extension *.dat.  With this in mind, the idea is to have the entire hadron beam (or electron beam) lattice in a single file with the .dat extension.
    
== Some General Directory Structure For Detector Subsystems ==
 
== Some General Directory Structure For Detector Subsystems ==
 
This may be of some help.  All of the existing subsystems that have been developed and simulated thus far are implemented through their own detector class.  The source code for each of these subsystems can be found in their own subdirectories in [http://svn.racf.bnl.gov/svn/eic/eicroot/trunk/eic/ eicroot/eic/detectors].  Each subsystem also has their own set up script to create the root binary file containing the geometry information.  These can also be found for each subsystem in their respective subdirectories in [http://svn.racf.bnl.gov/svn/eic/eicroot/trunk/geometry/ eicroot/geometry].
 
This may be of some help.  All of the existing subsystems that have been developed and simulated thus far are implemented through their own detector class.  The source code for each of these subsystems can be found in their own subdirectories in [http://svn.racf.bnl.gov/svn/eic/eicroot/trunk/eic/ eicroot/eic/detectors].  Each subsystem also has their own set up script to create the root binary file containing the geometry information.  These can also be found for each subsystem in their respective subdirectories in [http://svn.racf.bnl.gov/svn/eic/eicroot/trunk/geometry/ eicroot/geometry].
154

edits

Navigation menu