alcap-org / g4sim

Simulation toolkit based on Geant4 and ROOT
http://wuchen1106.github.io/g4sim/
2 stars 2 forks source link

Ae add turtle mode #44

Closed AndrewEdmonds11 closed 9 years ago

AndrewEdmonds11 commented 9 years ago

So I've finally (after some tricky trigonometry) managed to get the Turtle data into g4sim.

The data was given to us was in the form of a text file with histograms of x, y, x' and y', where x and y are the positions in the x,y plane and x' and y' are the angles between the z axis and the x(y) projection of the direction vector. Note that x' and y' are very small since we are firing along the z-axis.

To use:

Here are some plots showing that it works:

The fits: gausfit_xangle gausfit_xposition gausfit_yposition

NB the y' fit is just a uniform distribution between -150 and 150 mrad.

Here is the McTruth data from g4sim: g4sim_output_xangle I realise now that this looks like it's mirrored so I will try and fix this before merging.

g4sim_output_xposition g4sim_output_yangle g4sim_output_yposition

Once I fix that x' value then I'll merge this in and close issue #43.