Vertex Reconstruction studies
Inclusive electron GEMC 2.4 & Coatjava 2.4
LB_GEMC2.4CJ2.4_Vertex
Summary
Set all histogram ranges to -6,6 cm  and bin sizes of 0.1 cm
Point target X,Y,Z=0 cm
|  | No Rastering | 
| Vx Difference |   | 
| Vy Difference |   | 
| Vz Difference |   | 
| X Resolution (cm) | 0.2362 +/- 0.0008 | 
| Y Resolution(cm) | 0.09809 +/- 0.00033 | 
| Z Resolution (cm) | 0.05435 +/- 0.00017 | 
These histograms raise some questions. To begin I created a LUND file with 6 GeV incident electrons at 25 degrees in theta and 0 degrees in phi. All of the vertex positions were set to 0. I then ran GEMC 2.4 using the command line
~/src/CLAS/GEMC/source/gemc -USE_GUI=0 -INPUT_GEN_FILE="LUND,No_Raster.LUND" -N=75000 eg12_sol_No_Raster.gcard
which created an output file called eg12_sol_75k_No_Raster.ev. After that the reconstruction command line used was
~/src/CLAS/coatjava-2.4/bin/clas12-reconstruction -i  eg12_sol_75k_No_Raster.ev-config GEOM::new=true -config MAG::torus=-1.0 -config MAG::solenoid=1.0 -o eg12_sol_75k_No_Raster_rec.evio  -s DCHB:DCTB:EC:FTOF:EB -config DATA::mc=true -config DCTB::useRaster=true
After the reconstruction a root file was created using 
~/src/CLAS/evio2root/bin/evio2root eg12_sol_75k_No_Raster_rec.evio  eg12_sol_75k_No_Raster_rec.root 75000
A plot was then created to show the X Vertex and Y Vertex Differences
 
The first question is why is there a shift in the Y Difference. What would make X more centered around 0? The next question is when rastering begins, why do the resolutions in the X Vertices remain unchanged while the resolutions in the Y Vertices change?
Point in 2-D but extended target in 1-D
Two vertex variables are fixed at zero and the third vertex variable is altered
|  | 2cm X Raster, Y=0,Z=0 | 2 cm Y Raster, X=0,Z=0 | 2 cm Z Raster ,X=0,Y=0 | 6 cm Z Raster ,X=0,Y=0 | 
| Vx Difference |  |  |  |   | 
| Vy Difference |  |  |  |   | 
| Vz Difference |  |  |  |   | 
| X Resolution (cm) | 0.2658 +/- 0.0010 | 0.2531 +/- 0.0009 | 0.2544 +/- 0.0009 | 0.2539 +/- 0.0009 | 
| Y Resolution(cm) | 0.1728 +/- 0.0007 | 0.2368 +/- 0.0007 | 0.2644 +/- 0.0007 | 0.6191 +/- 0.0013 | 
| Z Resolution (cm) | 0.1792 +/- 0.0006 | 0.1998 +/- 0.0004 | 0.4318 +/- 0.0009 | 1.105 +/- 0.002 | 
Extended target -3 < Z < 3 cm
|  | 1cm X Raster | 1 cm Y Raster | 1 cm X & Y Raster | 
| X Resolution (cm) | 0.2696 +/- 0.0009 | 0.2588 +/- 0.0009 | 0.2734 +/- 0.0009 | 
| Y Resolution (cm) | 0.6234 +/- 0.0014 | 0.6851 +/- 0.0014 | 0.6927 +/- 0.0013 | 
| Z Resolution (cm) | 1.136 +/- 0.002 | 1.361 +/- 0.002 | 1.381 +/- 0.003 | 
| Generated Vx (cm) |  |  |   | 
| Generated Vy (cm) |  |  |   | 
| Generated Vz (cm) |  |  |   | 
| Reconstructed Vx (cm) |  |  |   | 
| Reconstructed Vy (cm) |  |  |   | 
| Reconstructed Vz (cm) |  |  |   | 
| Vx Difference (cm) |  |  |   | 
| Vy Difference (cm) |  |  |   | 
| Vz Difference (cm) |  |  |   | 
Extended target in Z. Vy shift analysis
All Histograms below were created by simply making the target longer along the Z axis. Each case uses vertex points for X and Y ranging from -1cm to 1cm
|  | 0.5cm Z Target | 1cm Z Target | 2cm Z Target | 3cm Z Target | 4cm Z Target | 5cm Z Target | 
| X Resolution (cm) | 0.2705 +/- 0.0010 | 0.2726 +/- 0.0010 | 0.2716 +/- 0.0010 | 0.2731 +/- 0.0010 | 0.2702 +/- 0.0009 | 0.2736 +/- 0.0010 | 
| Y Resolution (cm) | 0.2041 +/- 0.0010 | 0.2282 +/- 0.0011 | 0.3152 +/- 0.0014 | 0.433 +/- 0.002 | 0.5584 +/- 0.0018 | 0.6454 +/- 0.0015 | 
| Z Resolution (cm) | 0.28 +/-0.00 | 0.3582 +/- 0.0013 | 0.5659 +/- 0.0018 | 0.7927 +/- 0.0023 | 1.034 +/- 0.003 | 1.253 +/-0.003 | 
| X Mean (cm) | 0.0139 +/- 0.001 | 0.0139 +/- 0.00107 | 0.01436 +/- 0.00104 | 0.01217 +/- 0.00107 | 0.00991 +/- 0.00104 | 0.009022 +/- 0.00105 | 
| Y Mean (cm) | -0.1893 +/- 0.0011 | -0.2004 +/- 0.0012 | -0.2379 +/- 0.0016 | -0.2936 +/- 0.0022 | -0.3648 +/- 0.0027 | -0.3871 +/- 0.0026 | 
| Z Mean (cm) | 0.0928 +/- 0.0014 | 0.06464 +/- 0.0013 | -0.0337 +/- 0.0028 | -0.1582 +/- 0.0040 | -0.3016 +/- 0.0053 | -0.486 +/- 0.006 | 
| Generated Vx (cm) |  |  |  |  |  |   | 
| Generated Vy (cm) |  |  |  |  |  |   | 
| Generated Vz (cm) |  |  |  |  |  |   | 
| Reconstructed Vx (cm) |  |  |  |  |  |   | 
| Reconstructed Vy (cm) |  |  |  |  |  |   | 
| Reconstructed Vz (cm) |  |  |  |  |  |   | 
| Vx Difference (cm) |  |  |  |  |  |   | 
| Vy Difference (cm) |  |  |  |  |  |   | 
| Vz Difference (cm) |  |  |  |  |  |   | 
It would seem that increasing the length of the target in the Z direction has an effect on the resolution of the Y vertex position along with how far the center of the Gaussian peak will shift for the Y vertex differences.
Localized Vertex Resolution Investigation of Line Targets
GEMC was ran to create electrons being produced in a line along certain axes. These include three separate 2cm targets centered at (0,0,0) in the X, Y , and Z directions. The final target is a line along the Z axis centered at (0,0,0) that is 6cm long. The generated electrons were shot at 25 degrees in theta and 0 degrees in phi at an energy of 6GeV.
Here is an example of how the cuts were made. Consider the case of a 2cm line target in the Z direction centered at (0,0,0). Closed intervals begin at the end of the target and are 0.1cm long. So the first interval would be [-1.0,-0.9], then the next would be [-0.9, -0.8] and so on until the entire target is covered. The events in the EVENTHB bank were cut so that in any given interval there would be a margin of +/- 1cm to remove any outliers that may cause the histograms to have long tails.  
Below are the histograms for the 2cm line target in Y,X=0,Z=0. The electrons were fired with an energy of 6 GeV at 25 degrees in theta at 0 degrees in phi.
| GenPart.x | GenPart.y | GenPart.z | Event.x | Event.y | Event.z | 
|  |  |  |  |  |   | 
| Interval | Resolution (cm) | Vy Difference | *** | Interval | Resolution (cm) | Vy Difference | 
| [-1.0,-0.9] | 0.09406 +/- 0.00128 |  | *** | [0.9,1.0] | 0.1001 +/- 0.0016 |   | 
| [-0.9,-0.8] | 0.0868 +/- 0.0013 |  | *** | [0.8,0.9] | 0.1221 +/- 0.0018 |   | 
| [-0.8,-0.7] | 0.08961 +/- 0.00128 |  | *** | [0.7,0.8] | 0.1144 +/- 0.0017 |   | 
| [-0.7,-0.6] | 0.09853 +/- 0.00148 |  | *** | [0.6,0.7] | 0.169 +/- 0.003 |   | 
| [-0.6,-0.5] | 0.1038 +/- 0.0016 |  | *** | [0.5,0.6] | 0.171 +/- 0.003 |   | 
| [-0.5,-0.4] | 0.1202 +/- 0.0018 |  | *** | [0.4,0.5] | 0.1105 +/- 0.0016 |   | 
| [-0.4,-0.3] | 0.1755 +/- 0.0026 |  | *** | [0.3,0.4] | 0.09508 +/- 0.00137 |   | 
| [-0.3,-0.2] | 0.1847 +/- 0.0028 |  | *** | [0.2,0.3] | 0.09065 +/- 0.0140 |   | 
| [-0.2,-0.1] | 0.1255 +/- 0.0019 |  | *** | [0.1,0.2] | 0.093002 +/- 0.0013 |   | 
| [-0.1,0.0] | 0.09663 +/- 0.00160 |  | *** | [0.0,0.1] | 0.09008 +/- 0.0012 |   | 
Below are the histograms for a 2cm target along the Y axis, X = 0 Z = 0. The electrons were fired with an energy of 6 GeV at 25 degrees in theta and 180 degrees in phi.
| GenPart.x | GenPart.y | GenPart.z | Event.x | Event.y | Event.z | 
|  |  |  |  |  |   | 
| Interval | Resolution (cm) | Vy Difference | *** | Interval | Resolution (cm) | Vy Difference | 
| [-1.0,-0.9] | 0.07741 +/- 0.00166 |  | *** | [0.9,1.0] | 0.2319 +/- 0.0189 |   | 
| [-0.9,-0.8] | 0.0976 +/- 0.0017 |  | *** | [0.8,0.9] | 0.2147 +/- 0.0185 |   | 
| [-0.8,-0.7] | 0.09924 +/- 0.00150 |  | *** | [0.7,0.8] | 0.2364 +/- 0.0188 |   | 
| [-0.7,-0.6] | 0.1386 +/- 0.0024 |  | *** | [0.6,0.7] | 0.2323 +/- 0.0189 |   | 
| [-0.6,-0.5] | 0.1278 +/- 0.0027 |  | *** | [0.5,0.6] | 0.06016 +/- 0.00299 |   | 
| [-0.5,-0.4] | 0.09882 +/- 0.00142 |  | *** | [0.4,0.5] | 0.3986 +/- 0.00104 |   | 
| [-0.4,-0.3] | 0.09322 +/- 0.0013 |  | *** | [0.3,0.4] | 0.3056 +/- 0.0047 |   | 
| [-0.3,-0.2] | 0.09399 +/- 0.00145 |  | *** | [0.2,0.3] | 0.1097 +/- 0.0029 |   | 
| [-0.2,-0.1] | 0.08935 +/- 0.00131 |  | *** | [0.1,0.2] | 0.1146 +/- 0.0025 |   | 
| [-0.1,0.0] | 0.08913 +/- 0.00130 |  | *** | [0.0,0.1] | 0.09557 +/- 0.0015 |   | 
Below are the Histograms for a 2cm long target in the X Direction with a 6GeV electron fired at 25 degrees in theta and 90 degrees in phi
| GenPart.x | GenPart.y | GenPart.z | Event.x | Event.y | Event.z | 
|  |  |  |  |  |   | 
| Interval | Resolution (cm) | Vx Difference | *** | Interval | Resolution (cm) | Vx Difference | 
| [-1.0,-0.9] | 0.1341 +/- 0.0140 |  | *** | [0.9,1.0] | 0.01572 +/- 0.0002 |   | 
| [-0.9,-0.8] | 0.1304 +/- 0.0051 |  | *** | [0.8,0.9] | 0.01844 +/- 0.00031 |   | 
| [-0.8,-0.7] | 0.1182 +/- 0.0036 |  | *** | [0.7,0.8] | 0.01722 +/- 0.0028 |   | 
| [-0.7,-0.6] | 0.09062 +/- 0.0031 |  | *** | [0.6,0.7] | 0.02386 +/- 0.00088 |   | 
| [-0.6,-0.5] | 0.06816 +/- 0.00191 |  | *** | [0.5,0.6] | 0.024 +/- 0.001 |   | 
| [-0.5,-0.4] | n/a |  | *** | [0.4,0.5] | 0.04406 +/- 0.00182 |   | 
| [-0.4,-0.3] | 0.0635 +/- 0.0013 |  | *** | [0.3,0.4] | 0.04517 +/- 0.00118 |   | 
| [-0.3,-0.2] | 0.0618 +/- 0.0012 |  | *** | [0.2,0.3] | 0.04722 +/- 0.00107 |   | 
| [-0.2,-0.1] | 0.07473 +/- 0.00178 |  | *** | [0.1,0.2] | 0.05667 +/- 0.00106 |   | 
| [-0.1,0.0] | 0.08787 +/- 0.00132 |  | *** | [0.0,0.1] | 0.08356 +/- 0.00159 |   | 
Below are the Vx Differences using a 2cm target in X with incident 6 GeV electrons at 25 degrees in theta and 270 degrees in phi
| GenPart.x | GenPart.y | GenPart.z | Event.x | Event.y | Event.z | 
|  |  |  |  |  |   | 
| Interval | Resolution (cm) | Vx Difference | *** | Interval | Resolution (cm) | Vx Difference | 
| [-1.0,-0.9] | 0.01571 +/- 0.0002 |  | *** | [0.9,1.0] | 0.1257 +/- 0.0100 |   | 
| [-0.9,-0.8] | 0.0163 +/- 0.0003 |  | *** | [0.8,0.9] | 0.112 +/- 0.004 |   | 
| [-0.8,-0.7] | 0.01821 +/- 0.0003 |  | *** | [0.7,0.8] | 0.1162 +/- 0.0034 |   | 
| [-0.7,-0.6] | 0.03065 +/- .000163 |  | *** | [0.6,0.7] | 0.08958 +/- 0.00316 |   | 
| [-0.6,-0.5] | 0.02109 +/- 0.00217 |  | *** | [0.5,0.6] | 0.07347 +/- 0.00210 |   | 
| [-0.5,-0.4] | 0.03772 +/- 0.00133 |  | *** | [0.4,0.5] | 0.07271 +/- 0.00159 |   | 
| [-0.4,-0.3] | 0.04817 +/- 0.00125 |  | *** | [0.3,0.4] | 0.06196 +/- 0.00146 |   | 
| [-0.3,-0.2] | 0.05154 +/- 0.00113 |  | *** | [0.2,0.3] | 0.06087 +/- 0.00114 |   | 
| [-0.2,-0.1] | 0.05677 +/- 0.00106 |  | *** | [0.1,0.2] | 0.07298 +/- 0.00149 |   | 
| [-0.1,0.0] | 0.08348 +/- 0.00144 |  | *** | [0.0,0.1] | 0.09017 +/- 0.00128 |   | 
Below are the histograms for a 6cm target in the Z direction using a 6 GeV electron fired at 25 degrees in theta and 90 degrees in phi.
| GenPart.x | GenPart.y | GenPart.z | Event.x | Event.y | Event.z | 
|  |  |  |  |  |  | 
| Interval | Resolution (cm) | Vx Difference | *** | Interval | Resolution (cm) | Vx Difference | 
| [-3.0,-2.5] |  |  | *** | [2.5,3.0] |  |  | 
| [-2.5,-2.0] |  |  | *** | [2.0,2.5] |  |  | 
| [-2.0,-1.5] |  |  | *** | [1.5,2.0] |  |  | 
| [-1.5,-1.0] |  |  | *** | [1.0,1.5] |  |  | 
| [-1.0,-0.5] |  |  | *** | [0.5,1.0] |  |  | 
| [-0.5,0.0] |  |  | *** | [0.0,0.5] |  |  | 
Elastic electron proton GEMC 2.4 & Coatjava 2.4
References
https://clasweb.jlab.org/wiki/index.php/TF_EG12_Vertex#Z_resolution_With_micro-megas
EG12#Vertex_Studies