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");`

Re: Problems with GLAD magnetic field [message #23994 is a reply to message #23987] Tue, 28 May 2019 14:06
 Dmytro Kresan Messages: 166Registered: June 2004 first-grade participant From: *gsi.de
Hi Héctor,

To point 1) Was probably mistyped. Your correction is valid.

2) Concerning fYAngle being not properly set - also true.

3) Here I will not agree immediately. When calculating the shift of GLAD in cave, I was overlaying the complete picture of the field map on top of glad geometry. In particular the coils are nicely visible when one plots By component for Y=0 plane. Could you please cross-check this?

Best regards,
Dima
Re: Problems with GLAD magnetic field [message #23997 is a reply to message #23994] Tue, 28 May 2019 14:57
 Dmytro Kresan Messages: 166Registered: June 2004 first-grade participant From: *gsi.de
Attached is the script I have used to match the field map and GLAD geometry. Sorry, can not post results currently, please re-run the script on your R3BRoot.

Best regards,
Dima
• Attachment: field.C
Re: Problems with GLAD magnetic field [message #24001 is a reply to message #23997] Tue, 28 May 2019 18:29
 Hector Alvarez Pol Messages: 21Registered: July 2015 Location: Univ. Santiago de Compost... occasional visitor From: *usc.es
Hi Dmytro,

thank you very much for the macro. I have used it to produce the 2D ZCOL histogram with the By field map and the (black) lines reproducing the beam line
and the entrance point at GLAD. I superposed the GLAD case with the proper scale (orange point on top is at 500mm, red cross its the origina of field map).
It is clear to me that there is a slight mismatch and the geometry volumes are displace to the right (in the picture) and probably closer to the target than they should be.

I will try to get more information and suggest a symmetric point compatible with the cave situation.

Best regards,
Re: Problems with GLAD magnetic field [message #24012 is a reply to message #23987] Fri, 31 May 2019 13:27
 Hector Alvarez Pol Messages: 21Registered: July 2015 Location: Univ. Santiago de Compost... occasional visitor From: *usc.es
Hi everyone,

regarding the displacement of the geometry of the GLAD volumes:
- as the GLAD entrance tube seems to be perfectly centred with the beam line, the only freedom is to move it along the beam line.
- as the point (0,0,163.4)cm, center of the map field, should be in the symmetry axis of the GLAD volume

Double_t glad_angle = 14.0; // deg
Double_t distanceToTarget = 331.8528; // cm
Double_t zeroLineOffset = -42.0; // cm

Double_t glad_angle = 14.0; // deg
Double_t distanceToTarget = 308.8; // cm
Double_t zeroLineOffset = -42.0; // cm

the calculation of the additional displacement of 23.0528cm is explained in the attached figure.

Please, check and complain if there is any problem with the new position or it could be incompatible for any reason.

Regards,
 Previous Topic: Problem with loading TVector3 in R3BRoot Next Topic: My analysis is slow
Goto Forum:

Current Time: Mon Aug 02 14:01:18 CEST 2021

Total time taken to generate the page: 0.02321 seconds