Finding the Beam spot using TIARA

The beam is likely to be off-centred with respect to the Barrel detector. Due to the barrel geometry, covering two π of the azimuthal angle φ, one can select all the particles corresponding to the a specific energy emitted at, roughly, all φ angles. In the case of the barrel we have 8 wedges, each with 4 strips, hence we have 32 measurements (with a fixed energy and angle of emission). Enough to pin down the beam spot on the target if it had a good focus. Fewer measurements should also work given that the strips are sampling most of the azimuthal angle parameter.

In order to use this method the data must be analysed for the elastic channel, i.e. if you're reaction of interest is (d,p) then it's the (d,d) kinematic line that you are interested in. Hence the data should be analysed taking into account the energy loss of the ejected Deuteron in the target and in the detector dead layer. In nptool this means that you need to make sure you are using the right energy loss files in the project analysis.cxx code.

Method

 * A specific energy of ejected deuteron correspond to a specific angle θ
 * If the beam is perfectly centred, emitted Deuterons will hit all the wedges roughly at the same position as illustrated in the figure below. The central black point is the beam-spot location. The small differences in the hit positions (see black points forming a rough circle) arise from the fact that the Barrel is an Octagon and the strips are not perfectly equidistant from the beam axis.
 * If the beam-spot position is off-centred the corresponding emitted Deuteron will hit every strip in a different position along its length, while the Deuteron emission angle is still the same (for a specific deuteron energy), this is illustrated in the figure below (cf bottom left panel).
 * Hence the position of a hit at a specific energy can be used to pin down the beam-spot by varying the position of the beam spot and comparing the calculated hit position on the strips with the measured ones (minimising x,y,z of the beam spot simultaneously). The following figure shows a case applied to the experimental data. Red points are the minimisation result, black points are the observed angles when a central beam-spot position is (wrongly) assumed.

Code
This code is used to minimise the position of the beam spot from the elastic channel in the barrel once the energy and position calibration is made.

Inputs: A sample file with experimental data can be found here.
 * 1) Angle of emission: calculated from the elastic kinematic line at the correct beam energy and at the correct deuteron energy
 * 2) A text file containing the measured angle, when a central position is assumed.

Format of the input file
This is a set of mock Data generated with an emission angle 70.0 deg. and a beam-spot offset of 0.0, 2.0, 5.0 mm in x,y,z directions respectively.

0 comments starts with '0' (zero) 0 (col-1 Barrel) (col-2 strip) (col-3 angle [deg]) (col-4 angle weights [deg]) 1 1 64.1149 1   1 2 64.1068 1    1 3 64.2856 1    1 4 64.6211 1    2 1 64.8621 1    2 2 64.8554 1    2 3 64.9891 1    2 4 65.2391 1    3 1 65.3432 1    3 2 65.2352 1    3 3 65.2352 1    3 4 65.3432 1    4 1 65.2391 1    4 2 64.9891 1    4 3 64.8554 1    4 4 64.8621 1    5 1 64.6211 1    5 2 64.2856 1    5 3 64.1068 1    5 4 64.1149 1    6 1 63.8871 1    6 2 63.5679 1    6 3 63.4478 1    6 4 63.5463 1    7 1 63.4554 1    7 2 63.2327 1    7 3 63.2327 1    7 4 63.4554 1    8 1 63.5463 1    8 2 63.4478 1    8 3 63.5679 1    8 4 63.8871 1

How to execute
The code is executed under ROOT, it uses NPGlobalSystemOfUnits.h and NPPhysicalConstants.h, so NPTOOL should be installed, or at least these files should be in a path where the code can find them. > root[0] .x MinimizeBeamPosition(70, "sample.txt").C++

Output
Output should look like this for the sample file given above: Angle provided: 70 File provided: sample.txt BeamSpot:   -3.5242e-14 2.00244 5.00006 BeamSpotErr: 2.77922 2.78162 0.715639 Minimizing Result 1

In Addition three figures will give more details about the input and result (as the figures provided above).

Producing the input file for experimental data

 * Make sure you are using the correct energy loss files
 * Analyse the data assuming that the beam-spot position is at (0,0,0)
 * Draw the 2D kinematic line plot: light charged particle Energy vs Angle
 * The elastic (d,d) line, visible in the forward angles [0°,90°], increases in energy with more forward angles.
 * Project a thin cut in energy on the x-axis (angle-axis)
 * In the case of (d,p) the deuteron line should protrude above the protons background, hence the best cut would be between the proton punch-through and the deuteron one. The cut should be as thin as possible (if statistics allow it)
 * Do the same procedure for all working Barrel strips, separately.
 * The observed angle of emission will correspond to the centroid of the observed pic.
 * All these angles should go in the input file