![]() |
Project
|
#include <MagneticField.h>
Inherits FairField.
Public Types | |
enum | PolarityConvention_t { kConvLHC , kConvDCS2008 , kConvMap2005 } |
enum | { kOverrideGRP = BIT(14) } |
Public Member Functions | |
MagneticField () | |
Default constructor. | |
MagneticField (const char *name, const char *title, Double_t factorSol=1., Double_t factorDip=1., MagFieldParam::BMap_t maptype=MagFieldParam::k5kG, MagFieldParam::BeamType_t btype=MagFieldParam::kBeamTypepp, Double_t benergy=-1, Int_t integ=2, Double_t fmax=15, const std::string path="$(O2_ROOT)/share/Common/maps/mfchebKGI_sym.root") | |
MagneticField (const MagFieldParam ¶m) | |
MagneticField & | operator= (const MagneticField &src) |
~MagneticField () override=default | |
Default destructor. | |
void | CreateField () |
real field creation is here | |
void | AllowFastField (bool v=true) |
allow fast field param | |
bool | fastFieldExists () const |
void | rescaleField (float l3Cur, float diCur, bool uniform, int convention=0) |
Double_t | GetBx (Double_t x, Double_t y, Double_t z) override |
Virtual methods from FairField. | |
Double_t | GetBy (Double_t x, Double_t y, Double_t z) override |
Y component, avoid using since slow. | |
Double_t | GetBz (Double_t x, Double_t y, Double_t z) override |
Z component. | |
void | Field (const Double_t *__restrict__ point, Double_t *__restrict__ bField) override |
void | field (const math_utils::Point3D< float > xyz, float bxyz[3]) |
void | field (const math_utils::Point3D< double > xyz, double bxyz[3]) |
void | field (const double *__restrict__ point, double *__restrict__ bField) |
void | field (const float *__restrict__ point, float *__restrict__ bField) |
void | GetBxyz (const Double_t p[3], Double_t *b) override |
3d field query alias for Alias Method to calculate the field at point xyz | |
void | FillParContainer () override |
Fill Paramater. | |
void | getTPCIntegral (const Double_t *xyz, Double_t *b) const |
Method to calculate the integral_0^z of br,bt,bz. | |
void | getTPCRatIntegral (const Double_t *xyz, Double_t *b) const |
Method to calculate the integral_0^z of br,bt,bz. | |
void | getTPCIntegralCylindrical (const Double_t *rphiz, Double_t *b) const |
Method to calculate the integral_0^z of br,bt,bz in cylindrical coordinates ( -pi<phi<pi convention ) | |
void | getTPCRatIntegralCylindrical (const Double_t *rphiz, Double_t *b) const |
Double_t | getBz (const Double_t *xyz) const |
Method to calculate the field at point xyz. | |
MagneticWrapperChebyshev * | getMeasuredMap () const |
const MagFieldFast * | getFastField () const |
get fast field direct pointer | |
void | setFactorSolenoid (float fc=1.) |
Sets the sign/scale of the current in the L3 according to sPolarityConvention. | |
void | setFactorDipole (float fc=1.) |
Sets the sign*scale of the current in the Dipole according to sPolarityConvention. | |
Double_t | getFactorSolenoid () const |
Returns the sign*scale of the current in the Dipole according to sPolarityConventionthe. | |
Double_t | getFactorDipole () const |
Return the sign*scale of the current in the Dipole according to sPolarityConventionthe. | |
Double_t | Factor () const |
Double_t | getCurrentSolenoid () const |
Double_t | getCurrentDipole () const |
Bool_t | IsUniform () const |
void | MachineField (const Double_t *__restrict__ x, Double_t *__restrict__ b) const |
MagFieldParam::BMap_t | getMapType () const |
MagFieldParam::BeamType_t | getBeamType () const |
const char * | getBeamTypeText () const |
Returns beam type in text form. | |
Double_t | getBeamEnergy () const |
Double_t | Max () const |
Int_t | Integral () const |
Int_t | precIntegral () const |
Double_t | solenoidField () const |
Char_t * | getDataFileName () const |
Char_t * | getParameterName () const |
void | setDataFileName (const Char_t *nm) |
void | setParameterName (const Char_t *nm) |
void | Print (Option_t *opt) const override |
Prints short or long info. | |
Bool_t | loadParameterization () |
Static Public Member Functions | |
static MagneticField * | createNominalField (int fld, bool uniform=false) |
create field from rounded value, i.e. +-5 or +-2 kGauss | |
static Int_t | getPolarityConvention () |
static MagFieldParam::BMap_t | getFieldMapScale (float &l3, float &dip, bool uniform, int convention=0) |
static MagneticField * | createFieldMap (float l3Current=-30000., float diCurrent=-6000., Int_t convention=0, Bool_t uniform=kFALSE, float beamenergy=7000, const Char_t *btype="pp", const std::string path=std::string(gSystem->Getenv("VMCWORKDIR"))+std::string("/Common/maps/mfchebKGI_sym.root")) |
Protected Member Functions | |
void | initializeMachineField (MagFieldParam::BeamType_t btype, Double_t benergy) |
void | setBeamType (MagFieldParam::BeamType_t type) |
void | setBeamEnergy (float energy) |
Interface between the TVirtualMagField and MagneticWrapperChebyshev: wrapper to the set of magnetic field data + Tosca parametrization by Chebyshev polynomials
Definition at line 45 of file MagneticField.h.
anonymous enum |
Enumerator | |
---|---|
kOverrideGRP |
Definition at line 52 of file MagneticField.h.
Enumerator | |
---|---|
kConvLHC | |
kConvDCS2008 | |
kConvMap2005 |
Definition at line 49 of file MagneticField.h.
MagneticField::MagneticField | ( | ) |
Default constructor.
Definition at line 65 of file MagneticField.cxx.
MagneticField::MagneticField | ( | const char * | name, |
const char * | title, | ||
Double_t | factorSol = 1. , |
||
Double_t | factorDip = 1. , |
||
MagFieldParam::BMap_t | maptype = MagFieldParam::k5kG , |
||
MagFieldParam::BeamType_t | btype = MagFieldParam::kBeamTypepp , |
||
Double_t | benergy = -1 , |
||
Int_t | integ = 2 , |
||
Double_t | fmax = 15 , |
||
const std::string | path = "$(O2_ROOT)/share/Common/maps/mfchebKGI_sym.root" |
||
) |
Initialize the field with Geant integration option "integ" and max field "fmax", Impose scaling of parameterized L3 field by factorSol and of dipole by factorDip. The "be" is the energy of the beam in GeV/nucleon
Definition at line 92 of file MagneticField.cxx.
MagneticField::MagneticField | ( | const MagFieldParam & | param | ) |
Definition at line 123 of file MagneticField.cxx.
|
overridedefault |
Default destructor.
void MagneticField::AllowFastField | ( | bool | v = true | ) |
allow fast field param
Definition at line 719 of file MagneticField.cxx.
void MagneticField::CreateField | ( | ) |
real field creation is here
Definition at line 181 of file MagneticField.cxx.
|
static |
The magnetic field map, defined externally... L3 current 30000 A -> 0.5 T L3 current 12000 A -> 0.2 T dipole current 6000 A The polarities must match the convention (LHC or DCS2008) unless the special uniform map was used for MC
Definition at line 635 of file MagneticField.cxx.
|
static |
create field from rounded value, i.e. +-5 or +-2 kGauss
Definition at line 152 of file MagneticField.cxx.
|
inline |
Definition at line 187 of file MagneticField.h.
|
inline |
Definition at line 81 of file MagneticField.h.
|
inline |
Definition at line 132 of file MagneticField.h.
|
override |
Method to calculate the field at point xyz Main interface from TVirtualMagField used in simulation
Definition at line 262 of file MagneticField.cxx.
|
inline |
Definition at line 137 of file MagneticField.h.
|
inline |
Definition at line 126 of file MagneticField.h.
|
inline |
Definition at line 117 of file MagneticField.h.
|
override |
Fill Paramater.
Definition at line 708 of file MagneticField.cxx.
|
inline |
Definition at line 207 of file MagneticField.h.
|
inline |
Definition at line 202 of file MagneticField.h.
const char * MagneticField::getBeamTypeText | ( | ) | const |
Returns beam type in text form.
Definition at line 670 of file MagneticField.cxx.
|
inlineoverride |
Virtual methods from FairField.
X component, avoid using since slow
Definition at line 91 of file MagneticField.h.
|
inlineoverride |
3d field query alias for Alias Method to calculate the field at point xyz
Definition at line 147 of file MagneticField.h.
|
inlineoverride |
Y component, avoid using since slow.
Definition at line 99 of file MagneticField.h.
Double_t MagneticField::getBz | ( | const Double_t * | xyz | ) | const |
Method to calculate the field at point xyz.
Definition at line 289 of file MagneticField.cxx.
|
inlineoverride |
Z component.
Definition at line 107 of file MagneticField.h.
|
inline |
Definition at line 194 of file MagneticField.h.
|
inline |
Definition at line 189 of file MagneticField.h.
|
inline |
Definition at line 217 of file MagneticField.h.
Double_t MagneticField::getFactorDipole | ( | ) | const |
Return the sign*scale of the current in the Dipole according to sPolarityConventionthe.
Definition at line 524 of file MagneticField.cxx.
Double_t MagneticField::getFactorSolenoid | ( | ) | const |
Returns the sign*scale of the current in the Dipole according to sPolarityConventionthe.
Definition at line 512 of file MagneticField.cxx.
|
inline |
get fast field direct pointer
Definition at line 171 of file MagneticField.h.
|
static |
Definition at line 549 of file MagneticField.cxx.
|
inline |
Definition at line 200 of file MagneticField.h.
|
inline |
Definition at line 168 of file MagneticField.h.
|
inline |
Definition at line 219 of file MagneticField.h.
|
inlinestatic |
Definition at line 230 of file MagneticField.h.
void MagneticField::getTPCIntegral | ( | const Double_t * | xyz, |
Double_t * | b | ||
) | const |
Method to calculate the integral_0^z of br,bt,bz.
Definition at line 439 of file MagneticField.cxx.
void MagneticField::getTPCIntegralCylindrical | ( | const Double_t * | rphiz, |
Double_t * | b | ||
) | const |
Method to calculate the integral_0^z of br,bt,bz in cylindrical coordinates ( -pi<phi<pi convention )
Definition at line 459 of file MagneticField.cxx.
void MagneticField::getTPCRatIntegral | ( | const Double_t * | xyz, |
Double_t * | b | ||
) | const |
Method to calculate the integral_0^z of br,bt,bz.
Definition at line 450 of file MagneticField.cxx.
void MagneticField::getTPCRatIntegralCylindrical | ( | const Double_t * | rphiz, |
Double_t * | b | ||
) | const |
Method to calculate the integral_0^z of bx/bz,by/bz and (bx/bz)^2+(by/bz)^2 in cylindrical coordinates ( -pi<phi<pi convention )
Definition at line 470 of file MagneticField.cxx.
|
protected |
Definition at line 336 of file MagneticField.cxx.
|
inline |
Definition at line 211 of file MagneticField.h.
|
inline |
Definition at line 196 of file MagneticField.h.
Bool_t MagneticField::loadParameterization | ( | ) |
Definition at line 235 of file MagneticField.cxx.
void MagneticField::MachineField | ( | const Double_t *__restrict__ | x, |
Double_t *__restrict__ | b | ||
) | const |
Definition at line 361 of file MagneticField.cxx.
|
inline |
Definition at line 209 of file MagneticField.h.
MagneticField & MagneticField::operator= | ( | const MagneticField & | src | ) |
Definition at line 310 of file MagneticField.cxx.
|
inline |
Definition at line 213 of file MagneticField.h.
|
override |
Prints short or long info.
Definition at line 692 of file MagneticField.cxx.
Definition at line 536 of file MagneticField.cxx.
|
inlineprotected |
Definition at line 251 of file MagneticField.h.
|
inlineprotected |
Definition at line 249 of file MagneticField.h.
|
inline |
Definition at line 221 of file MagneticField.h.
void MagneticField::setFactorDipole | ( | float | fc = 1. | ) |
Sets the sign*scale of the current in the Dipole according to sPolarityConvention.
Definition at line 497 of file MagneticField.cxx.
void MagneticField::setFactorSolenoid | ( | float | fc = 1. | ) |
Sets the sign/scale of the current in the L3 according to sPolarityConvention.
Definition at line 479 of file MagneticField.cxx.
|
inline |
Definition at line 223 of file MagneticField.h.
|
inline |
Definition at line 215 of file MagneticField.h.