CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Member Functions | Private Attributes
MagneticField Class Referenceabstract

#include <MagneticField.h>

Inheritance diagram for MagneticField:
LocalMagneticField MagVolume OAEParametrizedMagneticField ParabolicParametrizedMagneticField PolyFit2DParametrizedMagneticField UniformMagneticField VolumeBasedMagneticField defaultRKPropagator::RKMagVolume MagCylinder MagVolume6Faces

Public Member Functions

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...
 
virtual GlobalVector inTesla (const GlobalPoint &gp) const =0
 Field value ad specified global point, in Tesla. More...
 
virtual GlobalVector inTeslaUnchecked (const GlobalPoint &gp) const
 
float inverseBzAtOriginInGeV () const
 The inverse of field z component for this map in GeV. More...
 
virtual bool isDefined (const GlobalPoint &) const
 True if the point is within the region where the concrete field. More...
 
 MagneticField ()
 
 MagneticField (const MagneticField &orig)
 
int nominalValue () const
 The nominal field value for this map in kGauss. More...
 
virtual ~MagneticField ()
 

Protected Member Functions

void setNominalValue ()
 

Private Attributes

float theInverseBzAtOriginInGeV = 0
 
int theNominalValue = 0
 

Detailed Description

Base class for the different implementation of magnetic field engines.

Author
N. Amapane - CERN

Definition at line 19 of file MagneticField.h.

Constructor & Destructor Documentation

◆ MagneticField() [1/2]

MagneticField::MagneticField ( )
default

◆ MagneticField() [2/2]

MagneticField::MagneticField ( const MagneticField orig)
default

◆ ~MagneticField()

MagneticField::~MagneticField ( )
virtualdefault

Member Function Documentation

◆ clone()

virtual MagneticField* MagneticField::clone ( void  ) const
inlinevirtual

Derived classes can implement cloning without ownership of the underlying engines.

Reimplemented in VolumeBasedMagneticField.

Definition at line 27 of file MagneticField.h.

27 { return nullptr; }

◆ inInverseGeV()

GlobalVector MagneticField::inInverseGeV ( const GlobalPoint gp) const
inline

◆ inKGauss()

GlobalVector MagneticField::inKGauss ( const GlobalPoint gp) const
inline

Field value ad specified global point, in KGauss.

Definition at line 33 of file MagneticField.h.

References runTauDisplay::gp, and inTesla().

Referenced by CSCDriftSim::getWireHit().

33 { return inTesla(gp) * 10.F; }
virtual GlobalVector inTesla(const GlobalPoint &gp) const =0
Field value ad specified global point, in Tesla.

◆ inTesla()

virtual GlobalVector MagneticField::inTesla ( const GlobalPoint gp) const
pure virtual

Field value ad specified global point, in Tesla.

Implemented in VolumeBasedMagneticField, OAEParametrizedMagneticField, PolyFit2DParametrizedMagneticField, ParabolicParametrizedMagneticField, UniformMagneticField, and LocalMagneticField.

Referenced by cms::SiPixelDigitizer::accumulatePixelHits(), cms::Phase2TrackerDigitizer::accumulatePixelHits(), SiStripDigitizer::accumulateStripHits(), Phase2OTMonitorVectorHits::analyze(), DisplayGeom::analyze(), IsoTrig::analyze(), DMRChecker::analyze(), tmtt::TMTrackProducer::beginRun(), ConvBremSeedProducer::beginRun(), L1FPGATrackProducer::beginRun(), GeneralPurposeTrackAnalyzer::beginRun(), DMRChecker::beginRun(), SeedingOTEDProducer::buildInitialTSOS(), TwoTrackMinimumDistanceLineLine::calculate(), ClosestApproachInRPhi::calculate(), TwoTrackMinimumDistance::calculate(), ConvertedPhotonProducer::calculateMinApproachDistance(), tt::Setup::checkMagneticField(), RPCSeedPattern::checkSimplePattern(), TangentApproachInRPhi::circleParameters(), OutInConversionSeedFinder::createSeedFTS(), StripCPE::driftDirection(), Phase2StripCPE::driftDirection(), egammaTools::ecalPhi(), MFProducer::evaluate(), RPCSeedPattern::extropolateStep(), PixelCPEBase::fillDetParams(), ApeEstimator::fillHitVariables(), PhotonConversionTrajectorySeedProducerFromSingleLegAlgo::find(), trackingTools::ftsFromVertexToPoint(), ClusterShapeHitFilter::getDrift(), sim::Field::GetFieldValue(), SteppingHelixPropagator::getNextState(), GlobalTrajectoryParameters::GlobalTrajectoryParameters(), ConversionFastHelix::helixStateAtVertex(), inInverseGeV(), inKGauss(), MagneticFieldMap::inTesla(), inTeslaUnchecked(), MagneticFieldMap::inTeslaZ(), SteppingHelixPropagator::loadState(), GlobalTrajectoryParameters::magneticFieldInInverseGeV(), SteppingHelixPropagator::makeAtomStep(), OutInConversionSeedFinder::makeTrackState(), SimpleCosmicBONSeeder::pqFromHelixFit(), SimpleCosmicBONSeeder::produce(), CtfSpecialSeedGenerator::produce(), DTDigitizer::produce(), LowPtGsfElectronSeedProducer::propagateTrackToCalo(), RPCSeedPattern::SegmentAlgorithmSpecial(), GlobalTrajectoryParameters::setCache(), setNominalValue(), SiPixelGenErrorDBObjectESProducer::SiPixelGenErrorDBObjectESProducer(), SiPixelTemplateDBObjectESProducer::SiPixelTemplateDBObjectESProducer(), SimpleCosmicBONSeeder::triplets(), and defaultRKPropagator::TrivialFieldProvider::valueInTesla().

◆ inTeslaUnchecked()

virtual GlobalVector MagneticField::inTeslaUnchecked ( const GlobalPoint gp) const
inlinevirtual

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

Reimplemented in VolumeBasedMagneticField, OAEParametrizedMagneticField, PolyFit2DParametrizedMagneticField, ParabolicParametrizedMagneticField, and UniformMagneticField.

Definition at line 44 of file MagneticField.h.

References runTauDisplay::gp, and inTesla().

Referenced by VolumeBasedMagneticField::inTesla(), and VolumeBasedMagneticField::inTeslaUnchecked().

44  {
45  return inTesla(gp); // default dummy implementation
46  }
virtual GlobalVector inTesla(const GlobalPoint &gp) const =0
Field value ad specified global point, in Tesla.

◆ inverseBzAtOriginInGeV()

float MagneticField::inverseBzAtOriginInGeV ( ) const
inline

◆ isDefined()

virtual bool MagneticField::isDefined ( const GlobalPoint ) const
inlinevirtual

◆ nominalValue()

int MagneticField::nominalValue ( ) const
inline

◆ setNominalValue()

void MagneticField::setNominalValue ( )
protected

Member Data Documentation

◆ theInverseBzAtOriginInGeV

float MagneticField::theInverseBzAtOriginInGeV = 0
private

Definition at line 61 of file MagneticField.h.

Referenced by inverseBzAtOriginInGeV(), and setNominalValue().

◆ theNominalValue

int MagneticField::theNominalValue = 0
private

Definition at line 60 of file MagneticField.h.

Referenced by nominalValue(), and setNominalValue().