Belle II Software  release-05-01-25
hitXP.cc
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2017 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Valerio Bertacchi *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 #include <tracking/dataobjects/hitXP.h>
11 
12 using namespace Belle2;
13 
14 double hitXP::omega(TVector3 xx, TVector3 p, double charge) const
15 {
16  TVector3 x(0.01 * xx.X(), 0.01 * xx.Y(), 0.01 * xx.Z());
17  double Bz = 1.5;
18  double Bze = Bz * charge * 0.299792458;
19  double aux = Bze / sqrt(p.X() * p.X() + p.Y() * p.Y());
20  aux = aux / 100;
21  return aux;
22 }
23 
24 
25 double hitXP::tanLambda(TVector3 xx, TVector3 p) const
26 {
27  TVector3 x(0.01 * xx.X(), 0.01 * xx.Y(), 0.01 * xx.Z());
28  double aux = p.Z() / sqrt(p.X() * p.X() + p.Y() * p.Y());
29  return aux;
30 }
31 
32 
33 double hitXP::d0(TVector3 xx, TVector3 p, double charge) const
34 {
35  TVector3 x(0.01 * xx.X(), 0.01 * xx.Y(), 0.01 * xx.Z());
36  double Bz = 1.5;
37  double Bze = Bz * charge * 0.299792458;
38  double aux = sqrt((p.Y() / (Bze) + x.X()) * (p.Y() / (Bze) + x.X()) + (x.Y() - p.X() / (Bze)) * (x.Y() - p.X() / (Bze))) - sqrt((
39  p.X() * p.X() + p.Y() * p.Y()) / (Bze * Bze));
40  if (Bze < 0) {
41  aux = -aux;
42  }
43  aux = 100 * aux;
44  return aux;
45 }
46 
47 double hitXP::phi0(const TVector3& xx, TVector3 p, double charge) const
48 {
49  TVector3 x(0.01 * xx.X(), 0.01 * xx.Y(), 0.01 * xx.Z());
50  double Bz = 1.5;
51  double Bze = Bz * charge * 0.299792458;
52  double aux;
53  double chi;
54  if (Bze > 0) {
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  } else {
57  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()));
58  }
59  aux = atan2(p.Y(), p.X()) - chi;
60  return aux;
61 }
62 
63 double hitXP::z0(TVector3 xx, TVector3 p, double charge) const
64 {
65  TVector3 x(0.01 * xx.X(), 0.01 * xx.Y(), 0.01 * xx.Z());
66  double Bz = 1.5;
67  double Bze = Bz * charge * 0.299792458;
68  double aux;
69  double chi;
70  if (Bze > 0) {
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  } else {
73  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()));
74  }
75  aux = p.Z() * chi / (Bze) + x.Z();
76  aux = 100 * aux;
77  return aux;
78 }
Belle2::hitXP::d0
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:33
Belle2::hitXP::z0
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:63
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::hitXP::tanLambda
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:25
Belle2::hitXP::phi0
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:47
Belle2::hitXP::omega
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:14