Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:22:35

0001 // #include "Utilities/Configuration/interface/Architecture.h"
0002 
0003 #include "MagneticField/VolumeGeometry/interface/MagVolume.h"
0004 #include "MagneticField/VolumeGeometry/interface/MagneticFieldProvider.h"
0005 
0006 MagVolume::~MagVolume() {
0007   if (theProviderOwned)
0008     delete theProvider;
0009 }
0010 
0011 MagVolume::LocalVector MagVolume::fieldInTesla(const LocalPoint& lp) const {
0012   return theProvider->valueInTesla(lp) * theScalingFactor;
0013 }
0014 
0015 MagVolume::GlobalVector MagVolume::fieldInTesla(const GlobalPoint& gp) const {
0016   return toGlobal(theProvider->valueInTesla(toLocal(gp))) * theScalingFactor;
0017 }