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:
run the script scripts/MakeTURTLEInput.C which will generate a ROOT file called TURTLE_fits.root that contain the fits to the TURTLE data
set DirectionMode and PositionMode`` toturtleand make sure thatThetaModeandPhiMode``` are disabled.
run g4sim
Here are some plots showing that it works:
The fits:
NB the y' fit is just a uniform distribution between -150 and 150 mrad.
Here is the McTruth data from g4sim:
I realise now that this looks like it's mirrored so I will try and fix this before merging.
Once I fix that x' value then I'll merge this in and close issue #43.
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:
scripts/MakeTURTLEInput.C
which will generate a ROOT file called TURTLE_fits.root that contain the fits to the TURTLE dataDirectionMode
andPositionMode`` to
turtleand make sure that
ThetaModeand
PhiMode``` are disabled.Here are some plots showing that it works:
The fits:
NB the y' fit is just a uniform distribution between -150 and 150 mrad.
Here is the McTruth data from g4sim: I realise now that this looks like it's mirrored so I will try and fix this before merging.
Once I fix that x' value then I'll merge this in and close issue #43.