#include <MagneticField/VolumeBasedEngine/interface/VolumeBasedMagneticField.h>
Public Member Functions | |
virtual MagneticField * | clone () const |
Returns a shallow copy. | |
const MagVolume * | findVolume (const GlobalPoint &gp) const |
GlobalVector | inTesla (const GlobalPoint &g) const |
Field value ad specified global point, in Tesla. | |
GlobalVector | inTeslaUnchecked (const GlobalPoint &g) const |
Optional implementation that derived classes can implement to provide faster query by skipping the check to isDefined. | |
bool | isDefined (const GlobalPoint &gp) const |
True if the point is within the region where the concrete field. | |
bool | isZSymmetric () const |
virtual int | nominalValue () const |
The nominal field value for this map in kGauss. | |
VolumeBasedMagneticField (const VolumeBasedMagneticField &vbf) | |
Copy constructor implement a shallow copy (ie no ownership of actual engines). | |
VolumeBasedMagneticField (const edm::ParameterSet &config, std::vector< MagBLayer * > theBLayers, std::vector< MagESector * > theESectors, std::vector< MagVolume6Faces * > theBVolumes, std::vector< MagVolume6Faces * > theEVolumes, float rMax, float zMax, const MagneticField *param=0, bool isParamFieldOwned=false) | |
virtual | ~VolumeBasedMagneticField () |
Private Attributes | |
const MagGeometry * | field |
bool | magGeomOwned |
float | maxR |
float | maxZ |
const MagneticField * | paramField |
bool | paramFieldOwned |
int | theNominalValue |
Definition at line 16 of file VolumeBasedMagneticField.h.
VolumeBasedMagneticField::VolumeBasedMagneticField | ( | const edm::ParameterSet & | config, | |
std::vector< MagBLayer * > | theBLayers, | |||
std::vector< MagESector * > | theESectors, | |||
std::vector< MagVolume6Faces * > | theBVolumes, | |||
std::vector< MagVolume6Faces * > | theEVolumes, | |||
float | rMax, | |||
float | zMax, | |||
const MagneticField * | param = 0 , |
|||
bool | isParamFieldOwned = false | |||
) |
Definition at line 5 of file VolumeBasedMagneticField.cc.
References MagneticField::nominalValue(), and theNominalValue.
Referenced by clone().
00012 : 00013 field(new MagGeometry(config,theBLayers,theESectors,theBVolumes,theEVolumes)), 00014 maxR(rMax), 00015 maxZ(zMax), 00016 paramField(param), 00017 magGeomOwned(true), 00018 paramFieldOwned(isParamFieldOwned) 00019 { 00020 theNominalValue = MagneticField::nominalValue(); 00021 }
VolumeBasedMagneticField::~VolumeBasedMagneticField | ( | ) | [virtual] |
Definition at line 41 of file VolumeBasedMagneticField.cc.
References field, magGeomOwned, paramField, and paramFieldOwned.
00041 { 00042 if(magGeomOwned) delete field; 00043 if(paramFieldOwned) delete paramField; 00044 }
VolumeBasedMagneticField::VolumeBasedMagneticField | ( | const VolumeBasedMagneticField & | vbf | ) |
Copy constructor implement a shallow copy (ie no ownership of actual engines).
Definition at line 24 of file VolumeBasedMagneticField.cc.
00024 : 00025 field(vbf.field), 00026 maxR(vbf.maxR), 00027 maxZ(vbf.maxZ), 00028 paramField(vbf.paramField), 00029 magGeomOwned(false), 00030 paramFieldOwned(false), 00031 theNominalValue(vbf.theNominalValue) { 00032 // std::cout << "VolumeBasedMagneticField::clone() (shallow copy)" << std::endl; 00033 }
MagneticField * VolumeBasedMagneticField::clone | ( | void | ) | const [virtual] |
Returns a shallow copy.
Reimplemented from MagneticField.
Definition at line 36 of file VolumeBasedMagneticField.cc.
References VolumeBasedMagneticField().
00036 { 00037 return new VolumeBasedMagneticField(*this); 00038 }
const MagVolume * VolumeBasedMagneticField::findVolume | ( | const GlobalPoint & | gp | ) | const |
Definition at line 64 of file VolumeBasedMagneticField.cc.
References field, and MagGeometry::findVolume().
Referenced by NavPropagator::findVolume(), SteppingHelixPropagator::getNextState(), and SteppingHelixPropagator::loadState().
00065 { 00066 return field->findVolume(gp); 00067 }
GlobalVector VolumeBasedMagneticField::inTesla | ( | const GlobalPoint & | gp | ) | const [virtual] |
Field value ad specified global point, in Tesla.
Implements MagneticField.
Definition at line 46 of file VolumeBasedMagneticField.cc.
References field, MagGeometry::fieldInTesla(), MagneticField::inTeslaUnchecked(), isDefined(), MagneticField::isDefined(), and paramField.
00046 { 00047 00048 // If parametrization of the inner region is available, use it. 00049 if (paramField && paramField->isDefined(gp)) return paramField->inTeslaUnchecked(gp); 00050 00051 // If point is outside magfield map, return 0 field (not an error) 00052 if (!isDefined(gp)) return GlobalVector(); 00053 00054 return field->fieldInTesla(gp); 00055 }
GlobalVector VolumeBasedMagneticField::inTeslaUnchecked | ( | const GlobalPoint & | gp | ) | const [virtual] |
Optional implementation that derived classes can implement to provide faster query by skipping the check to isDefined.
Reimplemented from MagneticField.
Definition at line 57 of file VolumeBasedMagneticField.cc.
References field, MagGeometry::fieldInTesla(), MagneticField::inTeslaUnchecked(), MagneticField::isDefined(), and paramField.
00057 { 00058 //same as above, but do not check range 00059 if (paramField && paramField->isDefined(gp)) return paramField->inTeslaUnchecked(gp); 00060 return field->fieldInTesla(gp); 00061 }
bool VolumeBasedMagneticField::isDefined | ( | const GlobalPoint & | gp | ) | const [virtual] |
True if the point is within the region where the concrete field.
Reimplemented from MagneticField.
Definition at line 70 of file VolumeBasedMagneticField.cc.
References maxR, maxZ, PV3DBase< T, PVType, FrameType >::perp(), and PV3DBase< T, PVType, FrameType >::z().
Referenced by inTesla().
bool VolumeBasedMagneticField::isZSymmetric | ( | ) | const |
Definition at line 75 of file VolumeBasedMagneticField.cc.
References field, and MagGeometry::isZSymmetric().
Referenced by SteppingHelixPropagator::getNextState(), SteppingHelixPropagator::loadState(), SteppingHelixPropagator::makeAtomStep(), and SteppingHelixPropagator::refToMagVolume().
00075 { 00076 return field->isZSymmetric(); 00077 }
virtual int VolumeBasedMagneticField::nominalValue | ( | ) | const [inline, virtual] |
The nominal field value for this map in kGauss.
Reimplemented from MagneticField.
Definition at line 45 of file VolumeBasedMagneticField.h.
References theNominalValue.
00045 { 00046 return theNominalValue; 00047 }
const MagGeometry* VolumeBasedMagneticField::field [private] |
Definition at line 51 of file VolumeBasedMagneticField.h.
Referenced by findVolume(), inTesla(), inTeslaUnchecked(), isZSymmetric(), and ~VolumeBasedMagneticField().
bool VolumeBasedMagneticField::magGeomOwned [private] |
Definition at line 55 of file VolumeBasedMagneticField.h.
Referenced by ~VolumeBasedMagneticField().
float VolumeBasedMagneticField::maxR [private] |
float VolumeBasedMagneticField::maxZ [private] |
const MagneticField* VolumeBasedMagneticField::paramField [private] |
Definition at line 54 of file VolumeBasedMagneticField.h.
Referenced by inTesla(), inTeslaUnchecked(), and ~VolumeBasedMagneticField().
Definition at line 56 of file VolumeBasedMagneticField.h.
Referenced by ~VolumeBasedMagneticField().
int VolumeBasedMagneticField::theNominalValue [private] |
Definition at line 57 of file VolumeBasedMagneticField.h.
Referenced by nominalValue(), and VolumeBasedMagneticField().