GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » R3BRoot » General Discussions » Problems with GLAD magnetic field (GLAD map field)
Problems with GLAD magnetic field Tue, 28 May 2019 13:32
 Hector Alvarez Pol Messages: 21Registered: July 2015 Location: Univ. Santiago de Compost... occasional visitor From: *usc.es
Hi everyone,

I was working these days on the GLAD magnet map and R3BRoot and I have found a few problems. Could you please (all) discuss and confirm them?
After confirmation that I do not miss something, I can commit the solutions...

I assume that the transformation between R3B and GLAD map field coordinates is:
X_R3B = X_MAP * cos(14) - Z_MAP * sin(14)
Z_R3B = X_MAP * sin(14) + Z_MAP * cos(14) + 163.4 cm
which is a passive transformation (alias) where the X axis is opposite to the usual convention ( X running positive to the left and Z running positive
to the top of the screen). I have tested that corresponds to the values in the map field (R3BRoot/field/magField/R3B/R3BGladMap.dat) when
I ask for the magnetic field in R3BRoot.

The first two problems correspond to the code in field/R3BGladFieldMap.cxx where the map is read and interpreted.
the lines 511 to 521 contains a wrong symmetry operation... in particular line 517 is:
`TVector3 B3(-bx, by, -bz);`

and should be:
`TVector3 B3(bx, by, -bz);`

I have checked that this correction produces the same symmetry that is already present in the original field map. This is possible as the map is
slightly larger than a "quadrant" to create the symmetry, so one can test the pseudovectorial character of the field and in which quadrant
the Bx and Bz components should be negative or positive.

2) After the symmetry operation, a -14 degrees rotation is introduced to transform the field components to the R3B coordinate system, as
it is stated in lines 512, 515, 518 and 521. The problem is that the variable fYAngle has not been correctly initialised.
In void R3BGladFieldMap::Init() line 110, the function ReadAsciiFile is called before the fYAngle variable takes the correct value,
and therefore is never set to -14 degrees. That means that all the field components are not rotated, but used in the (wrong) map coordinate system.

Both modifications affect to the sign and value of the Bx and Bz components, which are wrong in R3BRoot. The strong By component is not modified by the corrections.

The third problem corresponds to the positioning of the GLAD volumes (coils, cases, ...) with respect to the map field. The map field should be
symmetrical w.r.t. the magnet coils and the central "trumpet-like" chamber. But the point (0,0,163.4)cm, which is the origin of the field map and
should be in the symmetry axis of the magnet is NOT, as it is shown in the included figure:

In the figure, the orange point at (0,0,163.4)cm in R3B coordinates is the center of the map field, which is clearly not in the symmetry axis of the magnet case.

So, if the map field should be transformed as stated before, the GLAD volumes should be displaced around 23.4cm along the beam line, in the
direction of the beam, to locate the point (0,0,163.4)cm symmetric. This corresponds to a transformation with a rotation of -14 degrees and
a translation of approx. (-36.34, 0, 330.7)cm instead of the present value of (-42, 0, 308)cm in macros/r3b/geo/create_glad_geo.C.
My estimate is not very precise, it was based on the observation that the point will be symmetric moving it 23.4 cm along the beam line.

So, many things to check and correct...

NOTE: the code corresponds to current dev version. The macros to obtain the images and results use the following GLAD geometry:
`run->AddModule(new R3BGladMagnet("glad_v17_flange.geo.root")); `

and the following line to load the GLAD field map, with scale 1:
`R3BGladFieldMap* magField = new R3BGladFieldMap("R3BGladMap");`

 Problems with GLAD magnetic field By: Hector Alvarez Pol on Tue, 28 May 2019 13:32 Re: Problems with GLAD magnetic field By: Dmytro Kresan on Tue, 28 May 2019 14:06 Re: Problems with GLAD magnetic field By: Dmytro Kresan on Tue, 28 May 2019 14:57 Re: Problems with GLAD magnetic field By: Hector Alvarez Pol on Tue, 28 May 2019 18:29 Re: Problems with GLAD magnetic field By: Hector Alvarez Pol on Fri, 31 May 2019 13:27
 Previous Topic: Problem with loading TVector3 in R3BRoot Next Topic: My analysis is slow
Goto Forum:

Current Time: Sat Dec 02 08:44:38 CET 2023

Total time taken to generate the page: 0.01113 seconds