CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/MagneticField/VolumeGeometry/src/MagVolume.cc

Go to the documentation of this file.
00001 // #include "Utilities/Configuration/interface/Architecture.h"
00002 
00003 #include "MagneticField/VolumeGeometry/interface/MagVolume.h"
00004 #include "MagneticField/VolumeGeometry/interface/MagneticFieldProvider.h"
00005 
00006 MagVolume::~MagVolume() {
00007   if (theProviderOwned) delete theProvider;
00008 }
00009 
00010 
00011 MagVolume::LocalVector MagVolume::fieldInTesla( const LocalPoint& lp) const 
00012 {
00013   return theProvider->valueInTesla(lp)*theScalingFactor;
00014 }
00015 
00016 MagVolume::GlobalVector MagVolume::fieldInTesla( const GlobalPoint& gp) const
00017 {
00018   return toGlobal( theProvider->valueInTesla( toLocal(gp)))*theScalingFactor;
00019 }
00020