Difference between revisions of "Beam Simulations 2008"

From GlueXWiki
Jump to: navigation, search
(Geant simulations of the Hall D Tagger Hall)
(Geant simulations of the Hall D Tagger Hall)
Line 10: Line 10:
  
 
# configuration controls - The application expects to find this information in a file called "control.in" located in your working directory. A standard version of this file is included in the distribution you checked out from subversion, but you will probably want to modify it before running your own simulations. Most of the commands in control.in are explained in comments within the file itself. If you are not familiar with Geant3 control commands, you should consult the Geant3 documentation. One line in control.in that you should be aware of it the SCAP line. The line starting with SCAP is intended to allow the user to scan a particle source over a region and selectively illuminate parts of the detector. In gxtwist, this line is used to tell the simulation where to inject the electron beam in x,y,z, cm units. The diamond radiator is centered at 0,0,0 and the electron beam is pointing along the direction 0,0,1 when it enters the simulation. The default "SCAP 0. 0. -1." line (decimals tell the system that the numbers are real, don't drop them!) enjects the beam just upstream of the diamond radiator so it passes through a 20 micron diamond before reaching the tagging spectrometer. If you want to simulate the tagger without anything at the diamond radiator, change this line to "SCAP 0. 0., 1.". Just downstream of the goniometer in the simulation is the amorphous radiator target which is a 1micron thick piece of aluminum located at 0,0,61 cm. If you want to simulate the tagger with neither the diamond nor the amorphous radiator, change the SCAP line to "SCAP 0. 0. 65.". The rest of the control lines should be self explanatory. The KINE line defines the beam particle type (electron=103), energy, energy spread, direction, direction spread, etc. The TRIG line defines how many beam particles to simulate. The defaults for most of the remaining lines should be fine.
 
# configuration controls - The application expects to find this information in a file called "control.in" located in your working directory. A standard version of this file is included in the distribution you checked out from subversion, but you will probably want to modify it before running your own simulations. Most of the commands in control.in are explained in comments within the file itself. If you are not familiar with Geant3 control commands, you should consult the Geant3 documentation. One line in control.in that you should be aware of it the SCAP line. The line starting with SCAP is intended to allow the user to scan a particle source over a region and selectively illuminate parts of the detector. In gxtwist, this line is used to tell the simulation where to inject the electron beam in x,y,z, cm units. The diamond radiator is centered at 0,0,0 and the electron beam is pointing along the direction 0,0,1 when it enters the simulation. The default "SCAP 0. 0. -1." line (decimals tell the system that the numbers are real, don't drop them!) enjects the beam just upstream of the diamond radiator so it passes through a 20 micron diamond before reaching the tagging spectrometer. If you want to simulate the tagger without anything at the diamond radiator, change this line to "SCAP 0. 0., 1.". Just downstream of the goniometer in the simulation is the amorphous radiator target which is a 1micron thick piece of aluminum located at 0,0,61 cm. If you want to simulate the tagger with neither the diamond nor the amorphous radiator, change the SCAP line to "SCAP 0. 0. 65.". The rest of the control lines should be self explanatory. The KINE line defines the beam particle type (electron=103), energy, energy spread, direction, direction spread, etc. The TRIG line defines how many beam particles to simulate. The defaults for most of the remaining lines should be fine.
 
 
# magnetic field maps - Field map files are needed for the tagger dipole and quadrupole magnets. The names of these map files are hard-wired in the hdds geometry for the tagger hall. These files are not a part of the software distribution, but are set up for downloading from a web server at UConn. The gxtwist application checks for these map files in your working directory when it starts up, and if not it tries to download them for you from the proper location, so you should not have to do this yourself. In case for some reason this is not working, you can download them manually from the following urls.
 
# magnetic field maps - Field map files are needed for the tagger dipole and quadrupole magnets. The names of these map files are hard-wired in the hdds geometry for the tagger hall. These files are not a part of the software distribution, but are set up for downloading from a web server at UConn. The gxtwist application checks for these map files in your working directory when it starts up, and if not it tries to download them for you from the proper location, so you should not have to do this yourself. In case for some reason this is not working, you can download them manually from the following urls.
 
#* http://zeus.phys.uconn.edu/halld/tagger/simulation/TOSCA_tagger_dipole-15000G.map.gz
 
#* http://zeus.phys.uconn.edu/halld/tagger/simulation/TOSCA_tagger_dipole-15000G.map.gz
 
#* http://zeus.phys.uconn.edu/halld/tagger/simulation/TOSCA_tagger_quadrupole-nominal.map.gz
 
#* http://zeus.phys.uconn.edu/halld/tagger/simulation/TOSCA_tagger_quadrupole-nominal.map.gz

Revision as of 13:03, 19 August 2014

Geant simulations of the Hall D Tagger Hall

A Geant3 simulation exists for the Hall D tagger area. It is maintained in the GlueX software repository, which is currently managed using subversion. Before doing this you should make sure your shell environment is properly configured for running GlueX software. For more information regarding on this, see HOWTO set up the GlueX environment. Once your environment is set up, the following commands will check out, build, and run your own working copy of the simulation.

$ svn co https://halldsvn.jlab.org/repos/trunk/sim-recon/src/programs/Simulation/gxtwist
$ make
$ gxtwist

As you can see, the simulation is performed by an batch-style application called gxtwist. There is also an interactive version called gxtwist++, if you are used to the interactive interface to Geant3. See below for a getting-started guide to interactive plotting of simulated events with gxtwist++. Most of the information used by the Geant3 library to run the simulation is contained in the compiled application, but there are two inputs that it expects to find in disk files located in your working directory.

  1. configuration controls - The application expects to find this information in a file called "control.in" located in your working directory. A standard version of this file is included in the distribution you checked out from subversion, but you will probably want to modify it before running your own simulations. Most of the commands in control.in are explained in comments within the file itself. If you are not familiar with Geant3 control commands, you should consult the Geant3 documentation. One line in control.in that you should be aware of it the SCAP line. The line starting with SCAP is intended to allow the user to scan a particle source over a region and selectively illuminate parts of the detector. In gxtwist, this line is used to tell the simulation where to inject the electron beam in x,y,z, cm units. The diamond radiator is centered at 0,0,0 and the electron beam is pointing along the direction 0,0,1 when it enters the simulation. The default "SCAP 0. 0. -1." line (decimals tell the system that the numbers are real, don't drop them!) enjects the beam just upstream of the diamond radiator so it passes through a 20 micron diamond before reaching the tagging spectrometer. If you want to simulate the tagger without anything at the diamond radiator, change this line to "SCAP 0. 0., 1.". Just downstream of the goniometer in the simulation is the amorphous radiator target which is a 1micron thick piece of aluminum located at 0,0,61 cm. If you want to simulate the tagger with neither the diamond nor the amorphous radiator, change the SCAP line to "SCAP 0. 0. 65.". The rest of the control lines should be self explanatory. The KINE line defines the beam particle type (electron=103), energy, energy spread, direction, direction spread, etc. The TRIG line defines how many beam particles to simulate. The defaults for most of the remaining lines should be fine.
  2. magnetic field maps - Field map files are needed for the tagger dipole and quadrupole magnets. The names of these map files are hard-wired in the hdds geometry for the tagger hall. These files are not a part of the software distribution, but are set up for downloading from a web server at UConn. The gxtwist application checks for these map files in your working directory when it starts up, and if not it tries to download them for you from the proper location, so you should not have to do this yourself. In case for some reason this is not working, you can download them manually from the following urls.