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