Comments to RP alignment-related issues in pAu UPCs

Let me explain everything by directly referring to Bill's slides. I will start with comments
to code changes that Bill applied in order to make afterburner usable for pAu runs:





Both parameters: beam tilt angle in X and DX bending angles were correctly changed.
(I added below 2 top-view sketches of the STAR IR with beamlines drawn for pAu runs.
In the second one I put additional information to help better understand the tilt angles,
bending angles etc. Click on the picture to enlarge.)



                   


However, the beam momentum should also be changed to true value which was in
good approximation 103.732 GeV/c (lack of this change lead to inconsistency of
observations vs. expectations mentioned in slide 5, but it has no influence on
the reconstruction of \phi angle and thus cannot explain proton-J/psi acoplanarity).

In this place I would like to explain how the beam momentum (energy) is used in
reconstruction. In fact, beam momentum is not used in the reconstruction of
momentum direction
vector. Quantities which are used determine the direction of
proton momentum at the vertex and the fractional momentum loss are:
- x and y positions reconstructed in Roman Pots,
- x, y, and z position of the vertex (user can change it), if not set then (0,0,0) is assumed,
- tilt angles of the beam w.r.t. the z-axis in x and y direction,
- bending angles of DX magnets.
From these the scattering angles
\theta_{x}, \theta_{y} and frac. momentum loss \xi are
calculated. Then, the nominal beam momentum p_{0} is used to set the norm
of the reconstructed proton track
:


                      
 
(the above formula is approximate, in the reconstruction (afterburner) code the unit vector is precisely rotated by \theta_{x} and \theta_{y})

So you can see that it is not essential to have super-accurate value of beam momentum
provided in the code at the reconstruction (or afterburner) level. If you want to use
a different, more precise value of the nominal momentum (than the one used in reconstruction)
it is enough to scale the momentum vector of a track by the ratio of your best-known
beam momentum value p_{0}^{
new} to the beam momentum value which was used
in the reconstruction p_{0}:
 
                                       
 
If you would like to learn more about momentum reconstruction of proton tracks in RPs you can
check out the note on momentum reconstruction or directly look to the pp2pp maker class
which reconstructs tracks from hits in RPs.

Now I will comment on expectations:



It is true that adjustments of detectors (SSD planes) position which are used in afterburner
are small and have very little impact on reconstruction.
Regarding the picture and consequent derivations - they are correct.

Observation made by Bill is the following:



I have contacted with Bill to clarify what is understood under phrase 'pp alignment' and 'pAu
alignment'. Here are his definitions that I will also use further:
pp alignment = Roman Pot data collection is taken straight from the muDST tree 'as is',
pAu alignment =
Roman Pot data collection is taken from the afterburner (re-processed muDST).
At this point I need to emphasize that during pAu_2015 raw data processing
(DAQ->DST->muDST) the parameters needed for correct reconstruction, such
as beam energy, DX bending angles and beam tilt angles were present in the database
(exactly the same numbers as in Bill's first slide, except beam momentum which Bill did not change).
Hence the differences between reconstructed RP tracks in 'pp alignment' (which, in fact, has nothing
to do with pp!) and 'pAu alignment' arise from the following:
- 'pp alignment' has less precise relative SSD positioning inside RP than 'pAu alignment' (but
  the differences are of the order of microns so they almost do not influence tracks properties),
- different beam momentum was used: in 
'pp alignment' the beam momentum was taken from the
  StRunInfo class, so the correct value of 103.7 GeV was used in reconstruction, whereas the
  afterburner (as written in slide 1) still used value from pp collisions (100.1 GeV).
Two above points explain all three observations from slide 5. Simply the \theta_{x} and \theta_{y}
angles were reconstructed with the same parameters/constants, leading to the same ratio
\theta_{x} / \theta_{y} -> the same ratio p_{x}/ p_{y} (the same \phi's) and ratio of momentum
components in 'different alignments' (in Bill's nomenclature) equal to the ratio of beam momenta used
in reconstruction.

Another part of Bill's observations:





First of all, I'm glad that Bill see events with good proton tracks in RPs and J/psi
reconstructed from the barrel EEMC.
As Bill
correctly marked in slide 4, the 0-degree point (beamspot) during pAu was shifted
at the RP location towards negative x-es, comparing to pp. The amount of this shift can be
easily calculated, as the beam tilt 
(-3.64 mrad) and z-position of RPs (15.8 m and 17.6 m)
are known. This gives the offset in x eual -3.64 mrad * 15.8 m = -57 mm. It is significant
offset! Thus, expectation of the \phi angle of proton tracks in RPs being 
±pi/2 is not
correct - I tried to visualize it in the picture below (try to focus on the LHS part of the picture,
I'll discuss DX-D0 chamber shift further below). The green spot at (0,0) marks beam position
in pp. If you look at the hit map you can find that indeed hits are more or less placed at angle
phi = ±pi/2. However, the shift of beamspot in pAu runs (blue dot at x -50mm) changes the
phi angle, so the hits are expected to be gathered around some angle smaller than pi/2, and
basically it is consistent with observation from slide 6.



Unfortunately, in slide 7 it is clearly shown that proton and J/psi are not back-to-back, offset
in azimuth amounts roughly 0.7 rad. When I tried to find the reason for this I remembered that
DX magnets were shifted after pp run to allow collisions of non-symmetric system. I searched
for more information and found the following document (click) where in pages 3-4 it is explained
that west DX magnet was shifted by 25 mm towards RHIC center, and the same lateral shift was introduced
to the DX-D0 chamber (in which Roman Pots are installed). It is very large correction which has to be
added to the nominal alignment. I visualized this shift in RHS picture above and estimated that it should
change reconstructed \phi angle by 0.2-0.3 rad, so still not enough to solve the mystery.

I have temporarily modified afterburner code to account for discuseed -25 mm X detector displacement and run
jobs creating updated Bill's trees (I also corrected beam momentum in his code). All processed files from st_rp
stream can be found in
 /gpfs01/star/pwg/rafal_s/pAu_alignmentIssue/root . I checked that the \phi angle of proton tracks has
shifted by angle 0.2-0.3 rad as expected, but I think Bill will confirm/say more once he looks into these files. Conclusion is that
by accounting the DX-D0 chamber 
shift (which is a must, of course) the problem remains, although it's smaller.
Unfortunately there was no RP alignment survey done after this shift, but I believe it is not a major problem at
this point.

Since I believe (I am almost sure) that problem remains, I decided to perform validation of the afterburner to
check if the problem originates from the glitch in the code, as suggested by Bill. I did validation in the past when
I worked on implementation of proton momentum reconstruction, but unfortunately I haven't documented it.

I generated with Geant4 simulation of pp2pp 2 samples. The first one with beam-momentum protons, the second 
one with protons of 90% beam momentum (\xi=0.1). In both cases I placed the vertex at (x,y,z) = (2mm, 2mm, 0)
and introduced the beam tilt in X equal -2 mrad. I switched off the vertex smearing and the momentum smearing
(angular divergence of the beam) - therefore the widths of distributions below arise only from intrinsic resolution of
detectors and proton interactions with dead material.

For track reconstruction I used afterburner with 4 different sets of parameters in reconstruction. I will not elaborate
on the results (you can open plots below by clicking them or find a list of these plots in PDF a the very bottom of this
page). I will only summarize that if in the reconstruction I use the same parameters which were set at generator level
then the reconstructed track momentum is equal to the true-level momentum (modulo resolution). I conclude that
there is no bug/glitch in afterburner.

\xi = 0 (beam-momentum protons):
  
 

\xi = 0.1 (90 GeV/c protons):
  
 


It is worth to notice that the p_{x} (and also \phi) reconstruction is strongly dependent on the correct tilt angle
used in the reconstruction (
vertex position also plays a role but it's much less important). Using in reconstruction
tilt angle which is off from the true value by 2 mrad results in reconstructed \phi being 0.7 rad off from the true \phi!

Bill has not
set any vertex position in afterburner which means nominal vector (0,0,0) was used in reconstruction. We
already know from proton-proton analysis that in RP coordinate system vertex is not at 0. From alignment
analysis using elastic pp scattering events (click)
we know that in pp vertex was at x=0.4 mm. We
cannot use elastic scattering in pAu to determine vertex position directly, but there is a workaround. We can
compare beamline position in 
pp and pA which was(is) used in TPC to reconstruct central tracks (we assume
the TPC coordinate system has not changed). One can simply compare <x> and <y> in the muDST from
pp and pAu in run 15. Then we can add this difference to 0.4 mm that we get from elastic pp scattering
to have the mean vertex position in pAu in RP coordinate system. But as I wrote in paragraph above, transverse
vertex position is less important than the tilt angle, so the 0.4 mm of vertex offset is probably not the 'final cure'.

Luckily, the same thing can be done for the tilt angle. We know from pp that the tilt was consistent with 0, so if we find
that the TPC beamline orientation (angles w.r.t. z-axis) in pp and pA differ, we can add this difference to known (or
maybe it is better to say 'expected') tilt angle in X equal -3.64 mrad. Any deviation from 0 of the order of 0.1 mrad can
be significant.

I am convinced that above points: vertex position and tilt angle adjustments are the only missing parts. I think
Bill knows what to do (need to look at muDSTs or contact TPC people like GvB). Once theses numbers are found
another pass through muDST with afterburner enriched with corrected vertex position and tilt angles needs to be made.
I will accordingly update the afterburner and will help in case of problems.




To sum up:
  1. Afterburner has been validated and proven to reconstruct proton tracks correctly for
    various beam conditions/protons momenta,
  2. The DX-D0 chamber offset of -25 mm (resulting from RHIC adoption to unequal species
    collisions) needed to be additionally accounted in global RP positioning,
  3. The missing part is comparison of the TPC beamline in pp vs. pAu runs,
  4. I am aware that afterburner should not require any tunes done by analyzers - after
    the collaboration meeting I will appropriately update the code to user .