Belle II Software development
CDCBFieldUtil.h
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8#pragma once
9
10#include <tracking/trackFindingCDC/numerics/ERotation.h>
11#include <tracking/trackFindingCDC/numerics/ESign.h>
12
13namespace Belle2 {
18 namespace TrackFindingCDC {
19 class Vector3D;
20 class Vector2D;
21
24 public:
26 static bool isOff();
27
29 static ESign getBFieldZSign();
30
32 static double getBFieldZ();
33
35 static double getBFieldZ(const Vector2D& pos2D);
36
38 static double getBFieldZ(const Vector3D& pos3D);
39
41 static double getAlphaFromBField(double bField);
42
44 static double getAlphaZ(const Vector2D& pos2D);
45
47 static double getAlphaZ(const Vector3D& pos3D);
48
61 static ESign ccwInfoToChargeSign(ERotation ccwInfo);
62
64 static ERotation chargeSignToERotation(ESign chargeSign);
65
67 static ERotation chargeToERotation(double charge);
68
70 static double absMom2DToBendRadius(double absMom2D,
71 double bZ);
72
74 static double absMom2DToBendRadius(double absMom2D,
75 const Vector2D& pos2D);
76
78 static double absMom2DToBendRadius(double absMom2D,
79 const Vector3D& pos3D);
80
82 static double absMom2DToCurvature(double absMom2D,
83 double charge,
84 double bZ);
85
87 static double absMom2DToCurvature(double absMom2D,
88 double charge,
89 const Vector2D& pos2D);
90
92 static double absMom2DToCurvature(double absMom2D,
93 double charge,
94 const Vector3D& pos3D);
95
97 static double curvatureToAbsMom2D(double curvature,
98 double bZ);
99
101 static double curvatureToAbsMom2D(double curvature,
102 const Vector2D& pos2D);
103
105 static double curvatureToAbsMom2D(double curvature,
106 const Vector3D& pos3D);
107 };
108 }
110}
Helper functions to interact with the magnetic field.
Definition: CDCBFieldUtil.h:23
static double curvatureToAbsMom2D(double curvature, double bZ)
Conversion helper for two dimensional curvature to momenta.
static bool isOff()
Indicator if the magnetic field is off in the current geometry.
static ESign getBFieldZSign()
Getter for the sign of the magnetic field in z direction.
static ESign ccwInfoToChargeSign(ERotation ccwInfo)
Conversion helper from clockwise or counterclockwise travel to the charge sign.
static double getBFieldZ()
Getter for the signed magnetic field stength in z direction at the origin ( in Tesla )
static ERotation chargeSignToERotation(ESign chargeSign)
Conversion helper from the charge sign to clockwise or counterclockwise travel.
static ERotation chargeToERotation(double charge)
Conversion help for charges to clockwise or counterclockwise travel.
static double absMom2DToCurvature(double absMom2D, double charge, double bZ)
Conversion helper for momenta to two dimensional curvature.
static double getAlphaZ(const Vector2D &pos2D)
Getter for the signed alpha of the magnetic field in z direction.
static double getAlphaFromBField(double bField)
Translater from magnetic field strength in Tesla to the alpha value.
static double absMom2DToBendRadius(double absMom2D, double bZ)
Conversion helper for momenta to two dimensional (absolute) bend radius.
A two dimensional vector which is equipped with functions for correct handeling of orientation relat...
Definition: Vector2D.h:32
A three dimensional vector.
Definition: Vector3D.h:33
HepGeom::Vector3D< double > Vector3D
3D Vector
Definition: Cell.h:34
ESign
Enumeration for the distinct sign values of floating point variables.
Definition: ESign.h:27
ERotation
Enumeration to represent the distinct possibilities of the right left passage information.
Definition: ERotation.h:25
Abstract base class for different kinds of events.