Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-06 08:17:58

0001 /*
0002    Authors: Haiwang Yu
0003 */
0004 /** @addtogroup genfit
0005  * @{
0006  */
0007 
0008 #ifndef GENFITEXP_FIELD_H
0009 #define GENFITEXP_FIELD_H
0010 
0011 #include <GenFit/AbsBField.h>
0012 
0013 #include <TVector3.h>
0014 
0015 class PHField;
0016 
0017 namespace genfit
0018 {
0019 /** @brief Field Wrapper
0020  *
0021  *  @author Haiwang Yu (New Mexico State University)
0022  * 
0023  */
0024 class Field : public AbsBField
0025 {
0026  public:
0027   Field(const PHField* field);
0028 
0029   ~Field() override {}
0030 
0031   //  void plot(std::string option = "");
0032 
0033   //! return value at position
0034   TVector3 get(const TVector3& pos) const override;
0035   void get(const double& posX, const double& posY, const double& posZ, double& Bx, double& By, double& Bz) const override;
0036 
0037   const PHField* get_field() const
0038   {
0039     return field_;
0040   }
0041 
0042   void set_field(const PHField* field)
0043   {
0044     field_ = field;
0045   }
0046 
0047  private:
0048   const PHField* field_;
0049 };
0050 
0051 } /* End of namespace genfit */
0052 /** @} */
0053 
0054 #endif  // genfit_Field_h