CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_8_patch3/src/MagneticField/VolumeBasedEngine/interface/VolumeBasedMagneticField.h

Go to the documentation of this file.
00001 #ifndef MagneticField_VolumeBasedMagneticField_h
00002 #define MagneticField_VolumeBasedMagneticField_h
00003 
00013 #include "MagneticField/Engine/interface/MagneticField.h"
00014 #include "MagneticField/VolumeBasedEngine/interface/MagGeometry.h"
00015 
00016 class VolumeBasedMagneticField : public MagneticField {
00017  public:
00018   //  VolumeBasedMagneticField(const DDCompactView & cpv);
00019   VolumeBasedMagneticField( const edm::ParameterSet& config,
00020                             std::vector<MagBLayer *> theBLayers,
00021                             std::vector<MagESector *> theESectors,
00022                             std::vector<MagVolume6Faces*> theBVolumes,
00023                             std::vector<MagVolume6Faces*> theEVolumes,
00024                             float rMax, float zMax,
00025                             const MagneticField* param=0,
00026                             bool isParamFieldOwned=false);
00027   virtual ~VolumeBasedMagneticField();
00028 
00030   VolumeBasedMagneticField(const VolumeBasedMagneticField& vbf);
00031 
00033   virtual MagneticField* clone() const;
00034 
00035   GlobalVector inTesla ( const GlobalPoint& g) const;
00036 
00037   GlobalVector inTeslaUnchecked ( const GlobalPoint& g) const;
00038 
00039   const MagVolume * findVolume(const GlobalPoint & gp) const;
00040 
00041   bool isDefined(const GlobalPoint& gp) const;
00042 
00043   bool isZSymmetric() const;
00044 
00045 
00046  private:
00047   const MagGeometry* field;
00048   float maxR;
00049   float maxZ;
00050   const MagneticField* paramField;
00051   bool magGeomOwned;
00052   bool paramFieldOwned;
00053 };
00054 
00055 #endif