CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
magfieldparam::TkBfield Class Reference

#include <TkBfield.h>

Public Member Functions

void getBrfz (float const *__restrict__ x, float *__restrict__ Brfz) const
 B out in cylindrical. More...
 
void getBxyz (float const *__restrict__ x, float *__restrict__ Bxyz) const
 B out in cartesian. More...
 
 TkBfield (float fld=3.8)
 
 TkBfield (std::string T)
 

Private Attributes

BCycl< float > bcyl
 

Detailed Description

B-field in Tracker volume - based on the TOSCA computation version 1103l (tuned on MTCC measured field (fall 2006))

In: x[3]: coordinates (m) Out: B[3]: Bx,By,Bz (T) (getBxyz) Out: B[3]: Br,Bf,Bz (T) (getBrfz)

Valid for r<1.15m and |z|<2.80m

Author
V.Karimaki 080228, 080407 new float version V.I. October 2012

Definition at line 24 of file TkBfield.h.

Constructor & Destructor Documentation

◆ TkBfield() [1/2]

TkBfield::TkBfield ( std::string  T)

Definition at line 49 of file TkBfield.cc.

49 : bcyl(findPar(fld)) {}

◆ TkBfield() [2/2]

TkBfield::TkBfield ( float  fld = 3.8)

Definition at line 47 of file TkBfield.cc.

47 : bcyl(findPar(fld)) {}

Member Function Documentation

◆ getBrfz()

void TkBfield::getBrfz ( float const *__restrict__  x,
float *__restrict__  Brfz 
) const

B out in cylindrical.

Definition at line 51 of file TkBfield.cc.

51  {
52  float br;
53  float bz;
54  float r2 = x[0] * x[0] + x[1] * x[1];
55  bcyl(x[0] * x[0] + x[1] * x[1], x[2], br, bz);
56  Brfz[0] = std::sqrt(r2) * br;
57  Brfz[1] = 0;
58  Brfz[2] = bz;
59 }

References bcyl, beamvalidation::br, diffTwoXMLs::r2, and mathSSE::sqrt().

◆ getBxyz()

void TkBfield::getBxyz ( float const *__restrict__  x,
float *__restrict__  Bxyz 
) const

B out in cartesian.

Definition at line 61 of file TkBfield.cc.

61  {
62  float br;
63  float bz;
64  float r2 = x[0] * x[0] + x[1] * x[1];
65  bcyl(r2, x[2], br, bz);
66  Bxyz[0] = br * x[0];
67  Bxyz[1] = br * x[1];
68  Bxyz[2] = bz;
69 }

References bcyl, beamvalidation::br, and diffTwoXMLs::r2.

Referenced by OAEParametrizedMagneticField::inTeslaUnchecked().

Member Data Documentation

◆ bcyl

BCycl<float> magfieldparam::TkBfield::bcyl
private

Definition at line 38 of file TkBfield.h.

Referenced by getBrfz(), and getBxyz().

DDAxes::x
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
diffTwoXMLs.r2
r2
Definition: diffTwoXMLs.py:73
beamvalidation.br
br
Definition: beamvalidation.py:397
magfieldparam::TkBfield::bcyl
BCycl< float > bcyl
Definition: TkBfield.h:38