ATLAS Offline Software
VKalVrtBMag.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 /* General magnetic field in any point access */
5 /* If external magnetic field handler is provided as */
6 /* either an object inherited from the baseMagFld class */
7 /* or a function addrMagHandler - the vkalMagFld class */
8 /* will use it, otherwise the vkalMagFld returns */
9 /* the constant magnetic field. */
10 /* */
11 /* Thread-safe implementation */
12 /*---------------------------------------------------------*/
13 #ifndef TRKVKALVRTCORE_VKALVRTBMAG_H
14 #define TRKVKALVRTCORE_VKALVRTBMAG_H
15 
17 
18 namespace Trk {
19 
20 class VKalVrtControlBase;
21 
22 typedef void (*addrMagHandler)(double, double, double, double&, double&,
23  double&);
24 
25 //
26 // Base class for concrete magnetic field implementations (e.g. Athena tool) to
27 // be called by vkalMagFld
28 //
29 class baseMagFld {
30  public:
31  baseMagFld() = default;
32  virtual ~baseMagFld() = default;
33  virtual void getMagFld(const double, const double, const double, double&,
34  double&, double&) = 0;
35 };
36 
37 //
38 // Main magnetic field implememtation in VKalVrtCore package.
39 // Depending on VKalVrtControlBase it either calls external magnetic field
40 // or uses default fixed magnetic field.
41 //
42 class vkalMagFld {
43  public:
44  static void getMagFld(const double, const double, const double, double&,
45  double&, double&, VKalVrtControlBase*);
46  static double getMagFld(const double xyz[3],
47  const VKalVrtControlBase* FitControl);
48  /* Converstion for MeV and mm and Tesla*/
49  inline static double getCnvCst() { return vkalMagCnvCst; }
50 };
51 
52 } // namespace Trk
53 #endif
CommonPars.h
Trk::vkalMagFld::getMagFld
static void getMagFld(const double, const double, const double, double &, double &, double &, VKalVrtControlBase *)
Definition: VKalVrtBMag.cxx:24
Trk::addrMagHandler
void(* addrMagHandler)(double, double, double, double &, double &, double &)
Definition: VKalVrtBMag.h:22
xyz
#define xyz
Trk::baseMagFld::getMagFld
virtual void getMagFld(const double, const double, const double, double &, double &, double &)=0
Trk::vkalMagFld::getCnvCst
static double getCnvCst()
Definition: VKalVrtBMag.h:49
vkalMagCnvCst
#define vkalMagCnvCst
Definition: CommonPars.h:23
xAOD::double
double
Definition: CompositeParticle_v1.cxx:159
Trk::baseMagFld::baseMagFld
baseMagFld()=default
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
Trk::baseMagFld::~baseMagFld
virtual ~baseMagFld()=default
Trk::vkalMagFld
Definition: VKalVrtBMag.h:42
Trk::baseMagFld
Definition: VKalVrtBMag.h:29
Trk::VKalVrtControlBase
Definition: TrkVKalVrtCore.h:26