-
Notifications
You must be signed in to change notification settings - Fork 2
Chicane Geometry & Dipole Field
The geometry for the chicane is done in GDML, so when changes are made there is no need to recompile. Most of the chicane's geometry is parameterized. The geometry is broken down into 5 separate files. ChicaneDefinitions.gdml is where the height and most of the positions of the chicane and dipoles are defined. ChicaneSolids.gdml is where the are defined, and using boolean operations the chicane is constructed. ChicaneVolumes.gdml and ChicaneDipole.gdml is where the chicane and dipole definitions are respectively. Everything is then called through ChicaneGeometryTemplate.gdml. Previous versions of the chicane geometry had the chicane world as shell, the newest update replace it with a box to eliminate problems with entering ComptonG4DipoleField.cc file.
In ComptonG4DipoleField.cc we want to select if we are using a TOSCA field map our not. To do this simply set:
G4bool TOSCAmap = true;
(Note:Currently it will only read in a file that has a format that list the (x,y,z,Bx,By,Bz) values in separate columns(i.e. see dipole_shim_short.txt)) This should read in the field map file that you specified, for example (form tst_magnetic.mac)
/Compton/geometry/initMagneticField DipoleField file_name=geometries/dipole_shim_short.txt
reads in the field map dipole_shim_short.txt into ComptonG4DipoleField. Since this field map in the x-z plane at y=0 we manually set the y minimum and maximum
fMinCoordinate[1] = -57*CLHEP::cm;
fMaxCoordinate[1] = +57*CLHEP::cm;
while to find the minimum and maximum for x and z we must run through the list and find them. This field map also includes the magnetic field values at certain points on the x-z plane. These magnetic field values are put into
fMagneticField[0]
fMagneticField[1]
fMagneticField[2]
for the (x,y,z) components of the magnetic field respectively. In the field map file we have the y component of the magnetic field is zero, however we need this to be the x component of the magnetic field. So we simply swap the y component from the file with the x component when we apply the field to the volumes.
A small tweak for fPrimaryVertexLocation in CompontG4PrimaryGenaratorAction.cc was need to set the initial position of the beam at the same height as the chicane opening.
Note: These modifications are only on the umanitoba_dev branch currently!