Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-05 08:18:23

0001 /* Copyright 2008-2010, Technische Universitaet Muenchen,
0002    Authors: Christian Hoeppner & Sebastian Neubert & Johannes Rauch
0003 
0004    This file is part of GENFIT.
0005 
0006    GENFIT is free software: you can redistribute it and/or modify
0007    it under the terms of the GNU Lesser General Public License as published
0008    by the Free Software Foundation, either version 3 of the License, or
0009    (at your option) any later version.
0010 
0011    GENFIT is distributed in the hope that it will be useful,
0012    but WITHOUT ANY WARRANTY; without even the implied warranty of
0013    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0014    GNU Lesser General Public License for more details.
0015 
0016    You should have received a copy of the GNU Lesser General Public License
0017    along with GENFIT.  If not, see <http://www.gnu.org/licenses/>.
0018 */
0019 /** @addtogroup genfit
0020  * @{
0021  */
0022 
0023 #ifndef genfit_ConstField_h
0024 #define genfit_ConstField_h
0025 
0026 #include "AbsBField.h"
0027 
0028 
0029 namespace genfit {
0030 
0031 /** @brief Constant Magnetic field
0032  *
0033  *  @author Christian H&ouml;ppner (Technische Universit&auml;t M&uuml;nchen, original author)
0034  *  @author Sebastian Neubert  (Technische Universit&auml;t M&uuml;nchen, original author)
0035  * 
0036  */
0037 class ConstField : public AbsBField {
0038  public:
0039   //! define the constant field in this ctor
0040   ConstField(double b1, double b2, double b3)
0041     : field_(b1, b2, b3)
0042   { ; }
0043 
0044   ConstField(const TVector3& field)
0045     : field_(field)
0046   { ; }
0047 
0048   //! return value at position
0049   TVector3 get(const TVector3& pos) const;
0050   void get(const double& posX, const double& posY, const double& posZ, double& Bx, double& By, double& Bz) const;
0051 
0052  private:
0053   TVector3 field_;
0054 };
0055 
0056 } /* End of namespace genfit */
0057 /** @} */
0058 
0059 #endif // genfit_ConstField_h