Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef ParametrizedEngine_ParabolicParametrizedMagneticField_h
0002 #define ParametrizedEngine_ParabolicParametrizedMagneticField_h
0003 
0004 /** \class ParabolicParametrizedMagneticField
0005  *
0006  *  A simple parametrization of the Bz component in the tracker region
0007  * using the product of two parabolas
0008  *
0009  *  \author G. Ortona - Torino
0010  */
0011 
0012 #include "MagneticField/Engine/interface/MagneticField.h"
0013 #include <vector>
0014 
0015 namespace edm {
0016   class ParameterSet;
0017 }
0018 
0019 class ParabolicParametrizedMagneticField final : public MagneticField {
0020 public:
0021   /// Default constructor, use default values for 3.8T map
0022   explicit ParabolicParametrizedMagneticField();
0023 
0024   /// Constructor with explicit parameter list (b0, b1, c1, a)
0025   explicit ParabolicParametrizedMagneticField(const std::vector<double>& parameters);
0026 
0027   /// Destructor
0028   ~ParabolicParametrizedMagneticField() override;
0029 
0030   GlobalVector inTesla(const GlobalPoint& gp) const override;
0031 
0032   GlobalVector inTeslaUnchecked(const GlobalPoint& gp) const override;
0033 
0034   inline float B0Z(const float a) const;
0035 
0036   inline float Kr(const float R2) const;
0037 
0038   inline bool isDefined(const GlobalPoint& gp) const override;
0039 
0040 private:
0041   float c1;
0042   float b0;
0043   float b1;
0044   float a;
0045 };
0046 #endif