Belle II Software  release-06-02-00
hitXP.cc
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 #include <tracking/dataobjects/hitXP.h>
9 
10 using namespace Belle2;
11 
12 double hitXP::omega(TVector3 xx, TVector3 p, double charge) const
13 {
14  TVector3 x(0.01 * xx.X(), 0.01 * xx.Y(), 0.01 * xx.Z());
15  double Bz = 1.5;
16  double Bze = Bz * charge * 0.299792458;
17  double aux = Bze / sqrt(p.X() * p.X() + p.Y() * p.Y());
18  aux = aux / 100;
19  return aux;
20 }
21 
22 
23 double hitXP::tanLambda(TVector3 xx, TVector3 p) const
24 {
25  TVector3 x(0.01 * xx.X(), 0.01 * xx.Y(), 0.01 * xx.Z());
26  double aux = p.Z() / sqrt(p.X() * p.X() + p.Y() * p.Y());
27  return aux;
28 }
29 
30 
31 double hitXP::d0(TVector3 xx, TVector3 p, double charge) const
32 {
33  TVector3 x(0.01 * xx.X(), 0.01 * xx.Y(), 0.01 * xx.Z());
34  double Bz = 1.5;
35  double Bze = Bz * charge * 0.299792458;
36  double aux = sqrt((p.Y() / (Bze) + x.X()) * (p.Y() / (Bze) + x.X()) + (x.Y() - p.X() / (Bze)) * (x.Y() - p.X() / (Bze))) - sqrt((
37  p.X() * p.X() + p.Y() * p.Y()) / (Bze * Bze));
38  if (Bze < 0) {
39  aux = -aux;
40  }
41  aux = 100 * aux;
42  return aux;
43 }
44 
45 double hitXP::phi0(const TVector3& xx, TVector3 p, double charge) const
46 {
47  TVector3 x(0.01 * xx.X(), 0.01 * xx.Y(), 0.01 * xx.Z());
48  double Bz = 1.5;
49  double Bze = Bz * charge * 0.299792458;
50  double aux;
51  double chi;
52  if (Bze > 0) {
53  chi = atan2((-p.X() * x.X() - p.Y() * x.Y()), ((p.X() * p.X() + p.Y() * p.Y()) / (Bze) + p.Y() * x.X() - p.X() * x.Y()));
54  } else {
55  chi = atan2(-(-p.X() * x.X() - p.Y() * x.Y()), -((p.X() * p.X() + p.Y() * p.Y()) / (Bze) + p.Y() * x.X() - p.X() * x.Y()));
56  }
57  aux = atan2(p.Y(), p.X()) - chi;
58  return aux;
59 }
60 
61 double hitXP::z0(TVector3 xx, TVector3 p, double charge) const
62 {
63  TVector3 x(0.01 * xx.X(), 0.01 * xx.Y(), 0.01 * xx.Z());
64  double Bz = 1.5;
65  double Bze = Bz * charge * 0.299792458;
66  double aux;
67  double chi;
68  if (Bze > 0) {
69  chi = atan2((-p.X() * x.X() - p.Y() * x.Y()), ((p.X() * p.X() + p.Y() * p.Y()) / (Bze) + p.Y() * x.X() - p.X() * x.Y()));
70  } else {
71  chi = atan2(-(-p.X() * x.X() - p.Y() * x.Y()), -((p.X() * p.X() + p.Y() * p.Y()) / (Bze) + p.Y() * x.X() - p.X() * x.Y()));
72  }
73  aux = p.Z() * chi / (Bze) + x.Z();
74  aux = 100 * aux;
75  return aux;
76 }
double tanLambda(TVector3 xx, TVector3 p) const
evaluates the parameter tanLambda (pz/pt) of a helicoidal track starting from position and momentum o...
Definition: hitXP.cc:23
double phi0(const TVector3 &xx, TVector3 p, double charge) const
evaluates the parameter phi0 (angle between pT and x) of a helicoidal track starting from position an...
Definition: hitXP.cc:45
double d0(TVector3 xx, TVector3 p, double charge) const
evaluates the parameter d0 (impact parameter) of a helicoidal track starting from position and moment...
Definition: hitXP.cc:31
double z0(TVector3 xx, TVector3 p, double charge) const
evaluates the parameter z0 (distance transverse plane-POCA) of a helicoidal track starting from posit...
Definition: hitXP.cc:61
double omega(TVector3 xx, TVector3 p, double charge) const
evaluates the parameter omega (1/curvature radius) of a helicoidal track starting from position and m...
Definition: hitXP.cc:12
Abstract base class for different kinds of events.