Difference between revisions of "LB Summer 2017 JLab Vertex Work"

From New IAC Wiki
Jump to navigation Jump to search
 
(52 intermediate revisions by 2 users not shown)
Line 3: Line 3:
 
To Run GEMC 4a.0.0 on LDS3  
 
To Run GEMC 4a.0.0 on LDS3  
  
~/src/CLAS/GEMC/clas12Tags/4a.0.0/source/gemc -USE_GUI=0 -INPUT_GEN_FILE="LUND,test.LUND" -N=10 eg12_sol_XRaster.gcard
+
nohup ~/src/CLAS/GEMC/clas12Tags/4a.0.0/source/gemc -USE_GUI=0 -INPUT_GEN_FILE="LUND,test.LUND" -N=10 eg12_sol_XRaster.gcard >>/dev/null
  
 
To Convert the GEMC .ev output file to a hipo file
 
To Convert the GEMC .ev output file to a hipo file
Line 17: Line 17:
  
 
=Simulation Setup=
 
=Simulation Setup=
The following simulations were done using GEMC 4a.0.0.It is useful to note that the LUND file vertices are in units of cm, while the reconstructed events are in mm.Below is a sample gcard that was used for many of my simulations
+
The following simulations were done using GEMC 4a.0.0.It is useful to note that the LUND file vertices are in units of cm, while the reconstructed events are in cm as well. It should be noted that the generated position of the particle in the GenPart Bank is in mm, so it must be divided by 10 to get the right units.Below is a sample gcard that was used for many of my simulations
  
 
<gcard>
 
<gcard>
Line 67: Line 67:
 
phi= 30 Degrees
 
phi= 30 Degrees
  
This has been investigated for GEMC 2.5. There seems to be a problem with the gui such that the detector will not appear. Assuming the entire coordinate system hasn't changed, then the results should be the same as seen here [[
+
This has been investigated for GEMC 2.5. There seems to be a problem with the gui such that the detector will not appear. Assuming the entire coordinate system hasn't changed, then the results should be the same as seen here [[Phi angle gcard vs. LUND]]
 +
 
 +
 
 +
=Point Target=
 +
 
 +
Below are the histograms for a target with generated Vx,Vy, and Vz all equal to zero. There are 75k generated events. Note that these differences are not cuts, but the reconstructed vertices for the entire target. A sample command line is
 +
 
 +
CLAS12->Draw("GenPart.z[0]/10 - Event.z[0]>>(200,-2,2)","Event.PID[0]==11");
 +
 
 +
 
 +
{|border="5"
 +
! ||  X Vertex Info  || Y Vertex Info|| Z Vertex Info||
 +
|-
 +
|| Generated Particles ||[[File:GenPartX.png|200px]] || [[File:GenPartY.png|200px]] || [[File:GenPartZ.png|200px]]
 +
|-
 +
||Reconstructed Particles ||[[File:EventX.png|200px]] || [[File:EventY.png|200px]] || [[File:EventZ.png|200px]]
 +
|-
 +
||Vertex Differences ||[[File:XVert Diff.png|200px]] || [[File:YVert_Diff.png|200px]] || [[File:ZVert Diff.png|200px]]
 +
|-
 +
||Resolution (cm) ||0.1612 +/- 0.0006 || 0.09327 +/- 0.00033 || 0.1716 +/- 0.0006
 +
|-
 +
|}<br>
 +
 
 +
=Line Targets=
 +
 
 +
{|border="5"
 +
! || 2cm X Raster, Y=0,Z=0  || 2 cm Y Raster, X=0,Z=0|| 2 cm Z Raster ,X=0,Y=0
 +
|-
 +
||GenPart.x || [[File:2cm XRaster GenPartX.png|200px]] || [[File:YRaster GenPartX.png|200px]] || [[ File:ZRaster GenPartX.png|200px]]
 +
|-
 +
||GenPart.y || [[File:2cm XRaster GenPartY.png|200px]] || [[File:YRaster GenPartY.png|200px]] || [[File:ZRaster GenPartY.png |200px]]
 +
|-
 +
||GenPart.z || [[File:2cm XRaster GenPartZ.png|200px]] || [[File:YRaster GenPartZ.png|200px]] || [[File:ZRaster GenPartZ.png|200px]]
 +
|-
 +
||Event.x || [[File:2cm XRaster EventX.png|200px]] || [[File:YRaster EventX.png|200px]] ||[[File:ZRaster EventX.png|200px]]
 +
|-
 +
||Event.y|| [[File:2cm XRaster EventY.png|200px]] || [[File:YRaster EventY.png|200px]]||[[File:ZRaster EventY.png|200px]]
 +
|-
 +
||Event.z || [[File:2cm XRaster EventZ.png|200px]] || [[File:YRaster EventZ.png|200px]] || [[File:ZRaster EventZ.png|200px]]
 +
|-
 +
|| Vx Difference || [[File:XRaster XVertDiff.png|200px]] || [[File:YRaster XVertDiff.png|200px]] || [[File:ZRaster VxDiff.png|200px]]
 +
|-
 +
|| Vy Difference || [[File:XRaster YVertDiff.png|200px]] || [[File:YRaster YVertDiff.png|200px]] || [[File:ZRaster VyDiff.png|200px]]
 +
|-
 +
|| Vz Difference || [[File:XRaster ZVertDiff.png|200px]] || [[File:YRaster ZVertDiff.png|200px]] || [[File:ZRaster VzDiff.png|200px]]
 +
|-
 +
|| X Resolution (cm) || 0.2182 +/- 0.0007 || 0.3291 +/- 0.0009 || 0.1714 +/- 0.0007
 +
|-
 +
||Y Resolution(cm) ||0.2866 +/- 0.0007 || 0.4405 +/- 0.0010 || 0.09921 +/- 0.00040
 +
|-
 +
||Z Resolution (cm) || 0.5816 +/- 0.0012 || 1.372 +/- 0.008 || 0.1813 +/- 0.0006
 +
|}<br>
 +
 
 +
 
 +
Noting that some of the reconstructed events have valleys where generated events may not be getting reconstructed, I will attempt to find those events in the ascii2root.C program and create a LUND file to simulate and run the reconstruction again to see if it is reproducible. To do this I will insert an if statement into the ascii2root program that will look in a region of the generated events and ask if the difference between the generated values and the reconstructed values is greater than some number (probably 0.3 to start) i.e. if GenPart.z/10 - Event.z > 0.3. Using the created LUND file and running GEMC, it would seem that the events in the region of interest are not reproducible.
 +
 
 +
Consider the reconstruction of the 2cm Z-Raster target. It is noticeable that there is a dip in the reconstructed events from 0.6cm < Event.x < 0.8cm. Using a few events in the LUND file with all generated vertex points at zero, and some within the above region of interest it can be seen that the vertices in th
 +
 
 +
 
 +
{|border="5"
 +
! LUND file vertex (cm)  ||1st Reconstruction Event.z (cm) || 2nd Reconstruction Event.z (cm)
 +
|-
 +
||0.000 || 0.000||0.262
 +
|-
 +
||0.000 || 0.070||0.127
 +
|-
 +
||0.000 ||0.016 ||0.337
 +
|-
 +
||0.000 || 0.151||0.463
 +
|-
 +
||0.000 ||0.173 ||0.267
 +
|-
 +
||0.393 ||0.792 ||0.684
 +
|-
 +
||0.793 ||1.010 ||0.502
 +
|-
 +
||0.508 ||0.822 ||0.724
 +
|-
 +
|}<br>
 +
 
 +
=2D Targets=
 +
 
 +
The following targets are squares with side lengths of 2cm centered at x=y=z=0cm. These simulations were run on GEMC 4a.0.0 with 75k events
 +
 
 +
 
 +
{|border="5"
 +
! || 2cm XY Raster, Z=0  || 2 cm YZ Raster, X=0|| 2 cm XZ Raster ,Y=0
 +
|-
 +
||GenPart.x || [[File:LB Summer2017 XYRaster GenPartx.png|200px]] ||[[File:LB Summer2017 YZRaster GenPartx.png|200px]] || [[File:LB Summer2017 XZRaster GenPartx.png|200px]]
 +
|-
 +
||GenPart.y || [[File:LB Summer2017 XYRaster GenParty.png|200px]] || [[File:LB Summer2017 YZRaster GenParty.png|200px]] || [[File:LB Summer2017 XZRaster GenParty.png|200px]]
 +
|-
 +
||GenPart.z || [[File:LB Summer2017 XYRaster GenPartz.png|200px]] || [[File:LB Summer2017 YZRaster GenPartz.png|200px]] || [[File:LB Summer2017 XZRaster GenPartz.png|200px]]
 +
|-
 +
||Event.x || [[File:LB Summer2017 XYRaster Eventx.png|200px]] || [[File:LB Summer2017 YZRaster Eventx.png|200px]]|| [[File:LB Summer2017 XZRaster Eventx.png|200px]]
 +
|-
 +
||Event.y|| [[File:LB Summer2017 XYRaster Eventy.png|200px]] || [[File:LB Summer2017 YZRaster Eventy.png|200px]]||[[File:LB Summer2017 XZRaster Eventy.png|200px]]
 +
|-
 +
||Event.z || [[File:LB Summer2017 XYRaster Eventz.png|200px]]||[[File:LB Summer2017 YZRaster Eventz.png|200px]] || [[File:LB Summer2017 XZRaster Eventz.png|200px]]
 +
|-
 +
|| Vx Difference ||[[File:LB Summer2017 XYRaster VXDiff.png|200px]] || [[File:LB Summer2017 YZRaster VXDiff.png|200px]] || [[File:LB Summer2017 XZRaster VxDiff.png|200px]]
 +
|-
 +
|| Vy Difference || [[File:LB Summer2017 XYRaster VYDiff.png|200px]] || [[File:LB Summer2017 YZRaster VYDiff.png|200px]] || [[File:LB Summer2017 XZRaster VyDiff.png|200px]]
 +
|-
 +
|| Vz Difference || [[File:LB Summer2017 XYRaster VZDiff.png|200px]] || [[File:LB Summer2017 YZRaster VZDiff.png|200px]] || [[File:LB Summer2017 XZRaster VzDiff.png|200px]]
 +
|-
 +
|| X Resolution (cm) ||0.3683 +/- 0.0011 || 0.3283 +/- 0.0009 || 0.2428 +/- 0.0008
 +
|-
 +
||Y Resolution(cm) ||0.5211 +/- 0.0012 || 0.4331 +/- 0.0010 || 0.2871 +/- 0.0007
 +
|-
 +
||Z Resolution (cm) || 1.213 +/- 0.003 || 0.9908 +/- 0.0030 || 0.6271 +/- 0.0013
 +
|}<br>
 +
 
 +
=GEMC 4a.2.0=
 +
 
 +
I ran similar simulations to the ones above with GEMC 4a.2.0 using 75k events for each simulation. I used the gcard that can be found in /home/lds/src/CLAS/GEMC/experiments/eg12/LB_Vertex/Summer_2017/Solenoid_On/GEMC_4a.2.0/30DegRot/No_Rast.
 +
 
 +
The GEMC command line I used is
 +
 
 +
nohup ~/src/CLAS/GEMC/clas12Tags/4a.2.0/source/gemc* -USE_GUI=0 -N=75000 -INPUT_GEN_FILE="LUND,2cm_XYZRaster_75k.LUND" clas12.gcard >> /dev/null
 +
 
 +
I then converted the ev file from the GEMC output into a hipo file as seen above (the 4a.7.1 coatjava converter was having trouble).
 +
 
 +
The reconstruction was done using the program notsouseful-util with the command line
 +
 
 +
 
 +
~/src/CLAS/clas12-offline-software/coatjava/bin/notsouseful-util -o rec.hipo -i out.hipo -c 1
 +
 
 +
=Point Target=
 +
Below are the plots for a point target centered at (0cm,0cm,0cm)
 +
{|border="5"
 +
! ||
 +
|-
 +
|| Vx Difference ||
 +
|-
 +
|| Vy Difference ||
 +
|-
 +
|| Vz Difference ||
 +
|-
 +
|| X Resolution (cm) ||
 +
|-
 +
||Y Resolution(cm) ||
 +
|-
 +
||Z Resolution (cm) ||
 +
|}<br>
 +
 
 +
=2D Disk Target=

Latest revision as of 19:01, 14 August 2017

Useful Commands

To Run GEMC 4a.0.0 on LDS3

nohup ~/src/CLAS/GEMC/clas12Tags/4a.0.0/source/gemc -USE_GUI=0 -INPUT_GEN_FILE="LUND,test.LUND" -N=10 eg12_sol_XRaster.gcard >>/dev/null

To Convert the GEMC .ev output file to a hipo file

~/src/CLAS/coatjava-4a.0.0/bin/evio2hipo -r 11 -t -1.0 -s 1.0 -o out.hipo SIDIS.evio

To perform the reconstruction on the .hipo file that has been converted from a .ev file

~/src/CLAS/coatjava-4a.0.0/bin/notsouseful-util -o rec.hipo -i out.hipo -c 1


~/src/CLAS/coatjava-4a.0.0/bin/run-groovy ../../../SweetSpot/Hipo2Text.groovy SIDIS_Deut_5.hipo

Simulation Setup

The following simulations were done using GEMC 4a.0.0.It is useful to note that the LUND file vertices are in units of cm, while the reconstructed events are in cm as well. It should be noted that the generated position of the particle in the GenPart Bank is in mm, so it must be divided by 10 to get the right units.Below is a sample gcard that was used for many of my simulations

<gcard>

      <detector name="../../../../../../../clas12Tags/4a.0.0/experiments/clas12/fc/forwardCarriage" factory="TEXT" variation="original"/>
      
      <detector name="../../../../../../../clas12Tags/4a.0.0/experiments/clas12/dc/dc" factory="TEXT" variation="java"/>
      
      <detector name="../../../../../../../clas12Tags/4a.0.0/experiments/clas12/ec/ec" factory="TEXT" variation="java"/>
      
      <detector name="../../../../../../../clas12Tags/4a.0.0/experiments/clas12/ctof/ctof" factory="TEXT" variation="cad"/>
      <detector name="../../../../../../../clas12Tags/4a.0.0/experiments/clas12/ctof/cad/" factory="CAD"/>
      
      <detector name="../../../../../../../clas12Tags/4a.0.0/experiments/clas12/ftof/ftof" factory="TEXT" variation="java"/>
      
      <detector name="../../../../../../../clas12Tags/4a.0.0/experiments/clas12/htcc/htcc" factory="TEXT" variation="original"/>
      
      <detector name="../../../../../../../clas12Tags/4a.0.0/experiments/clas12/pcal/pcal"     factory="TEXT" variation="java"/>
      
      <detector name="../../../../../../../clas12Tags/4a.0.0/experiments/clas12/magnets/solenoid" factory="TEXT" variation="original"/>
      <detector name="../../../../../../../clas12Tags/4a.0.0/experiments/clas12/magnets/torus"   factory="TEXT" variation="original"/>
      <detector name ="../../../../../../../clas12Tags/4a.0.0/experiments/clas12/targets/target"  factory="TEXT" variation="lH2"/>
      <detector name="../../../../../../../clas12Tags/4a.0.0/experiments/clas12/bst/bst"          factory="TEXT" variation="java"/>
      <detector name="../../../../../../../clas12Tags/4a.0.0/experiments/clas12/cnd/cnd"          factory="TEXT" variation="original"/>
      <detector name="../../../../../../../clas12Tags/4a.0.0/experiments/clas12/micromegas/micromegas"           factory="TEXT" variation="original"/>
      <option name="SCALE_FIELD" value="clas12-torus-big, -1"/>
      
      <option name="HALL_FIELD"  value="clas12-solenoid"/>
      
      <option name="OUTPUT" value="evio,eg12_sol_75k_NoRaster_30DegRot.ev"/>
      

</gcard>

and here is a sample GEMC command line that was used for the simulations. Obviously the name of the LUND file, the number of events, and the output filename will change.

~/src/CLAS/GEMC/clas12Tags/4a.0.0/source/gemc -USE_GUI=0 -INPUT_GEN_FILE="LUND,test.LUND" -N=10 eg12_sol_XRaster.gcard

The LUND files were created using WriteLUND.C. The vertex positions are generated by a RNG whose output is between 2 numbers. This will determine if the target is 1D,2D,3D. To check the angles on the LUND files, run a GEMC simulation with only a few events to see where the particles hit within the detector. For angles

theta= 25 Degrees

phi= 30 Degrees

This has been investigated for GEMC 2.5. There seems to be a problem with the gui such that the detector will not appear. Assuming the entire coordinate system hasn't changed, then the results should be the same as seen here Phi angle gcard vs. LUND


Point Target

Below are the histograms for a target with generated Vx,Vy, and Vz all equal to zero. There are 75k generated events. Note that these differences are not cuts, but the reconstructed vertices for the entire target. A sample command line is

CLAS12->Draw("GenPart.z[0]/10 - Event.z[0]>>(200,-2,2)","Event.PID[0]==11");


X Vertex Info Y Vertex Info Z Vertex Info
Generated Particles GenPartX.png GenPartY.png GenPartZ.png
Reconstructed Particles EventX.png EventY.png EventZ.png
Vertex Differences XVert Diff.png YVert Diff.png ZVert Diff.png
Resolution (cm) 0.1612 +/- 0.0006 0.09327 +/- 0.00033 0.1716 +/- 0.0006


Line Targets

2cm X Raster, Y=0,Z=0 2 cm Y Raster, X=0,Z=0 2 cm Z Raster ,X=0,Y=0
GenPart.x 2cm XRaster GenPartX.png YRaster GenPartX.png ZRaster GenPartX.png
GenPart.y 2cm XRaster GenPartY.png YRaster GenPartY.png ZRaster GenPartY.png
GenPart.z 2cm XRaster GenPartZ.png YRaster GenPartZ.png ZRaster GenPartZ.png
Event.x 2cm XRaster EventX.png YRaster EventX.png ZRaster EventX.png
Event.y 2cm XRaster EventY.png YRaster EventY.png ZRaster EventY.png
Event.z 2cm XRaster EventZ.png YRaster EventZ.png ZRaster EventZ.png
Vx Difference XRaster XVertDiff.png YRaster XVertDiff.png ZRaster VxDiff.png
Vy Difference XRaster YVertDiff.png YRaster YVertDiff.png ZRaster VyDiff.png
Vz Difference XRaster ZVertDiff.png YRaster ZVertDiff.png ZRaster VzDiff.png
X Resolution (cm) 0.2182 +/- 0.0007 0.3291 +/- 0.0009 0.1714 +/- 0.0007
Y Resolution(cm) 0.2866 +/- 0.0007 0.4405 +/- 0.0010 0.09921 +/- 0.00040
Z Resolution (cm) 0.5816 +/- 0.0012 1.372 +/- 0.008 0.1813 +/- 0.0006



Noting that some of the reconstructed events have valleys where generated events may not be getting reconstructed, I will attempt to find those events in the ascii2root.C program and create a LUND file to simulate and run the reconstruction again to see if it is reproducible. To do this I will insert an if statement into the ascii2root program that will look in a region of the generated events and ask if the difference between the generated values and the reconstructed values is greater than some number (probably 0.3 to start) i.e. if GenPart.z/10 - Event.z > 0.3. Using the created LUND file and running GEMC, it would seem that the events in the region of interest are not reproducible.

Consider the reconstruction of the 2cm Z-Raster target. It is noticeable that there is a dip in the reconstructed events from 0.6cm < Event.x < 0.8cm. Using a few events in the LUND file with all generated vertex points at zero, and some within the above region of interest it can be seen that the vertices in th


LUND file vertex (cm) 1st Reconstruction Event.z (cm) 2nd Reconstruction Event.z (cm)
0.000 0.000 0.262
0.000 0.070 0.127
0.000 0.016 0.337
0.000 0.151 0.463
0.000 0.173 0.267
0.393 0.792 0.684
0.793 1.010 0.502
0.508 0.822 0.724


2D Targets

The following targets are squares with side lengths of 2cm centered at x=y=z=0cm. These simulations were run on GEMC 4a.0.0 with 75k events


2cm XY Raster, Z=0 2 cm YZ Raster, X=0 2 cm XZ Raster ,Y=0
GenPart.x LB Summer2017 XYRaster GenPartx.png LB Summer2017 YZRaster GenPartx.png LB Summer2017 XZRaster GenPartx.png
GenPart.y LB Summer2017 XYRaster GenParty.png LB Summer2017 YZRaster GenParty.png LB Summer2017 XZRaster GenParty.png
GenPart.z LB Summer2017 XYRaster GenPartz.png LB Summer2017 YZRaster GenPartz.png LB Summer2017 XZRaster GenPartz.png
Event.x LB Summer2017 XYRaster Eventx.png LB Summer2017 YZRaster Eventx.png LB Summer2017 XZRaster Eventx.png
Event.y LB Summer2017 XYRaster Eventy.png LB Summer2017 YZRaster Eventy.png LB Summer2017 XZRaster Eventy.png
Event.z LB Summer2017 XYRaster Eventz.png LB Summer2017 YZRaster Eventz.png LB Summer2017 XZRaster Eventz.png
Vx Difference LB Summer2017 XYRaster VXDiff.png LB Summer2017 YZRaster VXDiff.png LB Summer2017 XZRaster VxDiff.png
Vy Difference LB Summer2017 XYRaster VYDiff.png LB Summer2017 YZRaster VYDiff.png LB Summer2017 XZRaster VyDiff.png
Vz Difference LB Summer2017 XYRaster VZDiff.png LB Summer2017 YZRaster VZDiff.png LB Summer2017 XZRaster VzDiff.png
X Resolution (cm) 0.3683 +/- 0.0011 0.3283 +/- 0.0009 0.2428 +/- 0.0008
Y Resolution(cm) 0.5211 +/- 0.0012 0.4331 +/- 0.0010 0.2871 +/- 0.0007
Z Resolution (cm) 1.213 +/- 0.003 0.9908 +/- 0.0030 0.6271 +/- 0.0013


GEMC 4a.2.0

I ran similar simulations to the ones above with GEMC 4a.2.0 using 75k events for each simulation. I used the gcard that can be found in /home/lds/src/CLAS/GEMC/experiments/eg12/LB_Vertex/Summer_2017/Solenoid_On/GEMC_4a.2.0/30DegRot/No_Rast.

The GEMC command line I used is

nohup ~/src/CLAS/GEMC/clas12Tags/4a.2.0/source/gemc* -USE_GUI=0 -N=75000 -INPUT_GEN_FILE="LUND,2cm_XYZRaster_75k.LUND" clas12.gcard >> /dev/null

I then converted the ev file from the GEMC output into a hipo file as seen above (the 4a.7.1 coatjava converter was having trouble).

The reconstruction was done using the program notsouseful-util with the command line


~/src/CLAS/clas12-offline-software/coatjava/bin/notsouseful-util -o rec.hipo -i out.hipo -c 1

Point Target

Below are the plots for a point target centered at (0cm,0cm,0cm)

Vx Difference
Vy Difference
Vz Difference
X Resolution (cm)
Y Resolution(cm)
Z Resolution (cm)


2D Disk Target