CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_4_5_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   virtual int nominalValue() const {
00046     return theNominalValue;
00047   }
00048   
00049 
00050  private:
00051   const MagGeometry* field;
00052   float maxR;
00053   float maxZ;
00054   const MagneticField* paramField;
00055   bool magGeomOwned;
00056   bool paramFieldOwned;
00057   int theNominalValue;
00058 };
00059 
00060 #endif