Software » History » Version 3
Alexandre Camsonne, 07/12/2018 04:08 PM
1 | 1 | Joshua Hoskins | h1. Software |
---|---|---|---|
2 | |||
3 | h1. EIC Compton Electron Detector Simulation Analysis Software |
||
4 | |||
5 | 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. |
||
6 | A great reference to get you started using git can be found here: http://rogerdudler.github.io/git-guide/ |
||
7 | <pre> |
||
8 | Cloning a repository |
||
9 | git clone <repository address> |
||
10 | </pre> |
||
11 | **Compton Generator** |
||
12 | 3 | Alexandre Camsonne | Required libraries: ROOT (https://root.cern.ch/) tested with ROOT 5.34 and gcc 4.8.3 |
13 | 1 | Joshua Hoskins | Repository: |
14 | https://github.com/jrhosk/EIC-Compton-Generator.git |
||
15 | |||
16 | <pre> |
||
17 | ./generator <options> |
||
18 | |||
19 | --filename <string> Sets the name of the output file. |
||
20 | --polarization <double> Sets the polarization of the events to be generated. Values range from -1 to 1. |
||
21 | --energy <double> Sets the energy of the incoming electrons. |
||
22 | --sigmax <double> Sets the beam size in the x-direction (cm). |
||
23 | --sigmay <double> Sets the beam size in the y-direction (cm). |
||
24 | --events <int> The number of events to be generated. |
||
25 | </pre> |
||
26 | |||
27 | The only required option is __--events__ The default energy is 5 GeV. The generator is built using Make |
||
28 | <pre> |
||
29 | make generator |
||
30 | </pre> |
||
31 | |||
32 | **Compton Asymmetry Fit** |
||
33 | Required libraries: BOOST C++ libraries (http://www.boost.org/doc/libs/1_48_0/index.html), ROOT (https://root.cern.ch/) |
||
34 | Repository: |
||
35 | https://github.com/jrhosk/comptonfit.git |
||
36 | <pre> |
||
37 | Configuration Files |
||
38 | |||
39 | The fitting runs using parameters from external configuration files found in config/. You will need to provide at least four config files |
||
40 | all of which must end in '.config'. Two magnet files are required for the EIC chicane setup. The files needed and an explanation of |
||
41 | what each parameter is can be found below. |
||
42 | |||
43 | parameter.config |
||
44 | beam : beam is the beam energy given in GeV |
||
45 | laser: laser energy given in GeV |
||
46 | |||
47 | detector |
||
48 | width : strip width in meters |
||
49 | spacing: strip spacing in meters |
||
50 | theta : detector tilts in radians |
||
51 | x : detector x position in meters |
||
52 | y : detector y position in meters |
||
53 | z : detector z position in meters |
||
54 | |||
55 | magnet |
||
56 | theta : dipole angular tilt in radians |
||
57 | length: dipole length (full) in meters |
||
58 | dipole: dipole strength in T |
||
59 | x : magnet x position in meters |
||
60 | y : magnet y position in meters |
||
61 | z : magnet z position in meters |
||
62 | </pre> |
||
63 | |||
64 | +Installation+ |
||
65 | Simply unzip the code in your favorite directory and make sure the ROOT and BOOST environment variables are set properly. The current |
||
66 | default is /usr/lib64/ and /usr/include/. If your libraries are in a different place you will need to either make a symbolic link |
||
67 | or change the directories in the Makefile. |
||
68 | |||
69 | make clean && make |
||
70 | |||
71 | Running the code |
||
72 | <pre> |
||
73 | ./comptonfit <options> |
||
74 | |||
75 | --graphics Enables graphical output. |
||
76 | --residuals Calculate and plot residuals of asymmetry fit. |
||
77 | --fit_range <first strip:last strip> Define the range of strips over which the fit will be done. |
||
78 | --pol_range <minimum:max> Define the range of polarization over which the fit will be done. |
||
79 | --compton_range <minimum:max> Define the range of compton edge over which the fit will be done. |
||
80 | </pre> |
||
81 | |||
82 | **Compton Analysis** |
||
83 | Required libraries: BOOST C++ libraries (http://www.boost.org/doc/libs/1_48_0/index.html), ROOT (https://root.cern.ch/) |
||
84 | Repository: |
||
85 | https://github.com/jrhosk/eic_compton_analysis.git |
||
86 | |||
87 | +Installation+ |
||
88 | Simply unzip the code in your favorite directory and make sure the ROOT and BOOST environment variables are set properly. The current |
||
89 | default is /usr/lib64/ and /usr/include/. If your libraries are in a different place you will need to either make a symbolic link |
||
90 | or change the directories in the Makefile. |
||
91 | |||
92 | make analysis |
||
93 | |||
94 | Running the code |
||
95 | <pre> |
||
96 | ./analysis <options> |
||
97 | |||
98 | --graphics Graphical output flag. |
||
99 | --file <file name> Defines input root file. |
||
100 | --output-file <file name> Defines output root file. |
||
101 | --compton-weight Weighting flag. |
||
102 | --halo-weight Weighting flag. |
||
103 | --background-weight Weighting flag. |
||
104 | --polarization <polarization> Beam polarization. |
||
105 | --energy <energy GeV> Beam energy. |
||
106 | --aperture-size <size cm> Beam energy. |
||
107 | </pre> |