Belle II Software  release-05-01-25
CDCBFieldUtil.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2014 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Oliver Frost *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 #pragma once
11 
12 #include <tracking/trackFindingCDC/numerics/ERotation.h>
13 #include <tracking/trackFindingCDC/numerics/ESign.h>
14 
15 namespace Belle2 {
20  namespace TrackFindingCDC {
21  class Vector3D;
22  class Vector2D;
23 
25  class CDCBFieldUtil {
26  public:
28  static bool isOff();
29 
31  static ESign getBFieldZSign();
32 
34  static double getBFieldZ();
35 
37  static double getBFieldZ(const Vector2D& pos2D);
38 
40  static double getBFieldZ(const Vector3D& pos3D);
41 
43  static double getAlphaFromBField(double bField);
44 
46  static double getAlphaZ(const Vector2D& pos2D);
47 
49  static double getAlphaZ(const Vector3D& pos3D);
50 
63  static ESign ccwInfoToChargeSign(ERotation ccwInfo);
64 
66  static ERotation chargeSignToERotation(ESign chargeSign);
67 
69  static ERotation chargeToERotation(double charge);
70 
72  static double absMom2DToBendRadius(double absMom2D,
73  double bZ);
74 
76  static double absMom2DToBendRadius(double absMom2D,
77  const Vector2D& pos2D);
78 
80  static double absMom2DToBendRadius(double absMom2D,
81  const Vector3D& pos3D);
82 
84  static double absMom2DToCurvature(double absMom2D,
85  double charge,
86  double bZ);
87 
89  static double absMom2DToCurvature(double absMom2D,
90  double charge,
91  const Vector2D& pos2D);
92 
94  static double absMom2DToCurvature(double absMom2D,
95  double charge,
96  const Vector3D& pos3D);
97 
99  static double curvatureToAbsMom2D(double curvature,
100  double bZ);
101 
103  static double curvatureToAbsMom2D(double curvature,
104  const Vector2D& pos2D);
105 
107  static double curvatureToAbsMom2D(double curvature,
108  const Vector3D& pos3D);
109  };
110  }
112 }
Belle2::TrackFindingCDC::CDCBFieldUtil::getAlphaFromBField
static double getAlphaFromBField(double bField)
Translater from magnetic field strength in Tesla to the alpha value.
Definition: CDCBFieldUtil.cc:62
Belle2::TrackFindingCDC::CDCBFieldUtil::chargeToERotation
static ERotation chargeToERotation(double charge)
Conversion help for charges to clockwise or counterclockwise travel.
Definition: CDCBFieldUtil.cc:87
Belle2::Vector3D
HepGeom::Vector3D< double > Vector3D
3D Vector
Definition: Cell.h:35
Belle2::TrackFindingCDC::ESignUtil::ESign
ESign
Enumeration for the distinct sign values of floating point variables.
Definition: ESign.h:37
Belle2::TrackFindingCDC::CDCBFieldUtil::absMom2DToCurvature
static double absMom2DToCurvature(double absMom2D, double charge, double bZ)
Conversion helper for momenta to two dimensional curvature.
Definition: CDCBFieldUtil.cc:111
Belle2::TrackFindingCDC::CDCBFieldUtil::ccwInfoToChargeSign
static ESign ccwInfoToChargeSign(ERotation ccwInfo)
Conversion helper from clockwise or counterclockwise travel to the charge sign.
Definition: CDCBFieldUtil.cc:77
Belle2::TrackFindingCDC::CDCBFieldUtil::isOff
static bool isOff()
Indicator if the magnetic field is off in the current geometry.
Definition: CDCBFieldUtil.cc:27
Belle2::TrackFindingCDC::CDCBFieldUtil::getBFieldZSign
static ESign getBFieldZSign()
Getter for the sign of the magnetic field in z direction.
Definition: CDCBFieldUtil.cc:35
Belle2::TrackFindingCDC::CDCBFieldUtil::curvatureToAbsMom2D
static double curvatureToAbsMom2D(double curvature, double bZ)
Conversion helper for two dimensional curvature to momenta.
Definition: CDCBFieldUtil.cc:132
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::TrackFindingCDC::NRotation::ERotation
ERotation
Enumeration to represent the distinct possibilities of the right left passage information.
Definition: ERotation.h:35
Belle2::TrackFindingCDC::CDCBFieldUtil::getBFieldZ
static double getBFieldZ()
Getter for the signed magnetic field stength in z direction at the origin ( in Tesla )
Definition: CDCBFieldUtil.cc:40
Belle2::TrackFindingCDC::CDCBFieldUtil::getAlphaZ
static double getAlphaZ(const Vector2D &pos2D)
Getter for the signed alpha of the magnetic field in z direction.
Definition: CDCBFieldUtil.cc:67
Belle2::TrackFindingCDC::CDCBFieldUtil::absMom2DToBendRadius
static double absMom2DToBendRadius(double absMom2D, double bZ)
Conversion helper for momenta to two dimensional (absolute) bend radius.
Definition: CDCBFieldUtil.cc:92
Belle2::TrackFindingCDC::CDCBFieldUtil::chargeSignToERotation
static ERotation chargeSignToERotation(ESign chargeSign)
Conversion helper from the charge sign to clockwise or counterclockwise travel.
Definition: CDCBFieldUtil.cc:82