Wiki » History » Version 3

« Previous - Version 3/17 (diff) - Next » - Current version
Joshua Hoskins, 09/19/2017 11:30 AM


EIC Compton Electron detector talks

EIC Compton Electron Detector Simulation Analysis Software

All software is available from my github account (instructions below). Please forward all desired functionality and bug reports to me by filing an issue on github.
A great reference to get you started using git can be found here:

Cloning a repository
     git clone <repository address>

Compton Generator
Required libraries: ROOT (

./generator <options>

--filename <string>      Sets the name of the output file.
--polarization <double>  Sets the polarization of the events to be generated. Values range from -1 to 1.
--energy <double>        Sets the energy of the incoming electrons.
--sigmax <double>        Sets the beam size in the x-direction (cm). 
--sigmay <double>        Sets the beam size in the y-direction (cm).
--events <int>           The number of events to be generated. 

The only required option is --events The default energy is 5 GeV. The generator is built using Make

     make generator

Compton Asymmetry Fit
Required libraries: BOOST C++ libraries (, ROOT (

Configuration Files

The fitting runs using parameters from external configuration files found in config/. You will need to provide at least four config files
all of which must end in '.config'. Two magnet files are required for the EIC chicane setup. The files needed and an explanation of
what each parameter is can be found below.

   beam : beam is the beam energy given in GeV
   laser: laser energy given in GeV

   width  : strip width in meters
   spacing: strip spacing in meters
   theta  : detector tilts in radians
   x : detector x position in meters
   y : detector y position in meters
   z : detector z position in meters

   theta : dipole angular tilt in radians
   length: dipole length (full) in meters
   dipole: dipole strength in T
   x : magnet x position in meters
   y : magnet y position in meters
   z : magnet z position in meters

Simply unzip the code in your favorite directory and make sure the ROOT and BOOST environment variables are set properly. The current
default is /usr/lib64/ and /usr/include/. If your libraries are in a different place you will need to either make a symbolic link
or change the directories in the Makefile.

make clean && make

Running the code

   ./comptonfit <options>

   --graphics                                Enables graphical output.
   --residuals                               Calculate and plot residuals of asymmetry fit.
   --fit_range     <first strip:last strip>  Define the range of strips over which the fit will be done.
   --pol_range     <minimum:max>             Define the range of polarization over which the fit will be done.
   --compton_range <minimum:max>             Define the range of compton edge over which the fit will be done.