#include <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 |
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 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) | |
VolumeBasedMagneticField (const VolumeBasedMagneticField &vbf) | |
Copy constructor implement a shallow copy (ie no ownership of actual engines) | |
virtual | ~VolumeBasedMagneticField () |
Private Attributes | |
const MagGeometry * | field |
bool | magGeomOwned |
float | maxR |
float | maxZ |
const MagneticField * | paramField |
bool | paramFieldOwned |
int | theNominalValue |
Field engine providing interpolation within the full CMS region.
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 nominalValue(), and theNominalValue.
Referenced by clone().
: field(new MagGeometry(config,theBLayers,theESectors,theBVolumes,theEVolumes)), maxR(rMax), maxZ(zMax), paramField(param), magGeomOwned(true), paramFieldOwned(isParamFieldOwned) { theNominalValue = MagneticField::nominalValue(); }
VolumeBasedMagneticField::~VolumeBasedMagneticField | ( | ) | [virtual] |
Definition at line 41 of file VolumeBasedMagneticField.cc.
References field, magGeomOwned, paramField, and paramFieldOwned.
{ if(magGeomOwned) delete field; if(paramFieldOwned) delete paramField; }
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.
: field(vbf.field), maxR(vbf.maxR), maxZ(vbf.maxZ), paramField(vbf.paramField), magGeomOwned(false), paramFieldOwned(false), theNominalValue(vbf.theNominalValue) { // std::cout << "VolumeBasedMagneticField::clone() (shallow copy)" << std::endl; }
MagneticField * VolumeBasedMagneticField::clone | ( | void | ) | const [virtual] |
Returns a shallow copy.
Reimplemented from MagneticField.
Definition at line 36 of file VolumeBasedMagneticField.cc.
References VolumeBasedMagneticField().
{ return new VolumeBasedMagneticField(*this); }
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().
{ return field->findVolume(gp); }
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.
Referenced by IsolatedPixelTrackCandidateProducer::GetEtaPhiAtEcal().
{ // If parametrization of the inner region is available, use it. if (paramField && paramField->isDefined(gp)) return paramField->inTeslaUnchecked(gp); // If point is outside magfield map, return 0 field (not an error) if (!isDefined(gp)) return GlobalVector(); return field->fieldInTesla(gp); }
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.
{ //same as above, but do not check range if (paramField && paramField->isDefined(gp)) return paramField->inTeslaUnchecked(gp); return field->fieldInTesla(gp); }
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().
{ return field->isZSymmetric(); }
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.
Referenced by VolumeBasedMagneticField().
{ return theNominalValue; }
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] |
Definition at line 52 of file VolumeBasedMagneticField.h.
Referenced by isDefined().
float VolumeBasedMagneticField::maxZ [private] |
Definition at line 53 of file VolumeBasedMagneticField.h.
Referenced by isDefined().
const MagneticField* VolumeBasedMagneticField::paramField [private] |
Definition at line 54 of file VolumeBasedMagneticField.h.
Referenced by inTesla(), inTeslaUnchecked(), and ~VolumeBasedMagneticField().
bool VolumeBasedMagneticField::paramFieldOwned [private] |
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().