CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
OAEParametrizedMagneticField Class Reference

#include <OAEParametrizedMagneticField.h>

Inheritance diagram for OAEParametrizedMagneticField:
MagneticField

Public Member Functions

GlobalVector inTesla (const GlobalPoint &gp) const override
 Field value ad specified global point, in Tesla. More...
 
GlobalVector inTeslaUnchecked (const GlobalPoint &gp) const override
 
bool isDefined (const GlobalPoint &gp) const override
 True if the point is within the region where the concrete field. More...
 
 OAEParametrizedMagneticField (const edm::ParameterSet &parameters)
 Constructor. Parameters taken from a PSet [deprecated]. More...
 
 OAEParametrizedMagneticField (float B)
 Constructor, pass value for nominal field. More...
 
 OAEParametrizedMagneticField (std::string T="3_8T")
 Constructor, pass string for nominal field [deprecated]. More...
 
 ~OAEParametrizedMagneticField () override
 Destructor. More...
 
- Public Member Functions inherited from MagneticField
virtual MagneticFieldclone () const
 
GlobalVector inInverseGeV (const GlobalPoint &gp) const
 Field value ad specified global point, in 1/Gev. More...
 
GlobalVector inKGauss (const GlobalPoint &gp) const
 Field value ad specified global point, in KGauss. More...
 
 MagneticField ()
 
 MagneticField (const MagneticField &orig)
 
int nominalValue () const
 The nominal field value for this map in kGauss. More...
 
virtual ~MagneticField ()
 

Private Attributes

magfieldparam::TkBfield theParam
 

Detailed Description

Magnetic Field engine wrapper for V. Karimaki's "off-axis expansion" of the TOSCA field version 1103l_071212 (2, 3, 3.4, 3.8, 4 T) valid in the region r<1.15 m and |z|<2.8 m For details, cf TkBfield.h

Author
N. Amapane - Torino

Definition at line 25 of file OAEParametrizedMagneticField.h.

Constructor & Destructor Documentation

◆ OAEParametrizedMagneticField() [1/3]

OAEParametrizedMagneticField::OAEParametrizedMagneticField ( float  B)
explicit

Constructor, pass value for nominal field.

Definition at line 15 of file OAEParametrizedMagneticField.cc.

15 : theParam(B) {}

◆ OAEParametrizedMagneticField() [2/3]

OAEParametrizedMagneticField::OAEParametrizedMagneticField ( std::string  T = "3_8T")
explicit

Constructor, pass string for nominal field [deprecated].

◆ OAEParametrizedMagneticField() [3/3]

OAEParametrizedMagneticField::OAEParametrizedMagneticField ( const edm::ParameterSet parameters)
explicit

Constructor. Parameters taken from a PSet [deprecated].

Definition at line 19 of file OAEParametrizedMagneticField.cc.

20  : theParam(parameters.getParameter<string>("BValue")) {}

◆ ~OAEParametrizedMagneticField()

OAEParametrizedMagneticField::~OAEParametrizedMagneticField ( )
override

Destructor.

Definition at line 22 of file OAEParametrizedMagneticField.cc.

22 {}

Member Function Documentation

◆ inTesla()

GlobalVector OAEParametrizedMagneticField::inTesla ( const GlobalPoint gp) const
overridevirtual

Field value ad specified global point, in Tesla.

Implements MagneticField.

Definition at line 24 of file OAEParametrizedMagneticField.cc.

24  {
25  if (isDefined(gp)) {
26  return inTeslaUnchecked(gp);
27  } else {
28  edm::LogWarning("MagneticField") << " Point " << gp
29  << " is outside the validity region of OAEParametrizedMagneticField";
30  return GlobalVector();
31  }
32 }

References runTauDisplay::gp, inTeslaUnchecked(), and isDefined().

◆ inTeslaUnchecked()

GlobalVector OAEParametrizedMagneticField::inTeslaUnchecked ( const GlobalPoint gp) const
overridevirtual

Optional implementation that derived classes can implement to provide faster query by skipping the check to isDefined.

Reimplemented from MagneticField.

Definition at line 38 of file OAEParametrizedMagneticField.cc.

38  {
39  float x[3] = {gp.x() * ooh, gp.y() * ooh, gp.z() * ooh};
40  float B[3];
41  theParam.getBxyz(x, B);
42  return GlobalVector(B[0], B[1], B[2]);
43 }

References TtFullHadDaughter::B, magfieldparam::TkBfield::getBxyz(), runTauDisplay::gp, theParam, and x.

Referenced by inTesla().

◆ isDefined()

bool OAEParametrizedMagneticField::isDefined ( const GlobalPoint ) const
overridevirtual

True if the point is within the region where the concrete field.

Reimplemented from MagneticField.

Definition at line 45 of file OAEParametrizedMagneticField.cc.

45  {
46  return (gp.perp2() < (115.f * 115.f) && fabs(gp.z()) < 280.f);
47 }

References f, and runTauDisplay::gp.

Referenced by inTesla().

Member Data Documentation

◆ theParam

magfieldparam::TkBfield OAEParametrizedMagneticField::theParam
private

Definition at line 46 of file OAEParametrizedMagneticField.h.

Referenced by inTeslaUnchecked().

OAEParametrizedMagneticField::isDefined
bool isDefined(const GlobalPoint &gp) const override
True if the point is within the region where the concrete field.
Definition: OAEParametrizedMagneticField.cc:45
BeamSpotPI::parameters
parameters
Definition: BeamSpotPayloadInspectorHelper.h:30
OAEParametrizedMagneticField::inTeslaUnchecked
GlobalVector inTeslaUnchecked(const GlobalPoint &gp) const override
Definition: OAEParametrizedMagneticField.cc:38
f
double f[11][100]
Definition: MuScleFitUtils.cc:78
DDAxes::x
GlobalVector
Global3DVector GlobalVector
Definition: GlobalVector.h:10
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
OAEParametrizedMagneticField::theParam
magfieldparam::TkBfield theParam
Definition: OAEParametrizedMagneticField.h:46
runTauDisplay.gp
gp
Definition: runTauDisplay.py:431
TtFullHadDaughter::B
static const std::string B
Definition: TtFullHadronicEvent.h:9
magfieldparam::TkBfield::getBxyz
void getBxyz(float const *__restrict__ x, float *__restrict__ Bxyz) const
B out in cartesian.
Definition: TkBfield.cc:61