1 ////////////////////////////////////////////////////////////////////////////////
3 // Author: Artur Szostak
4 // Email: artur@alice.phy.uct.ac.za | artursz@iafrica.com
6 ////////////////////////////////////////////////////////////////////////////////
8 #include "Calculations.hpp"
12 Float AliHLTMUONCoreCalculateSignedPt(
14 register Float y1, register Float y2,
15 register Float z1, register Float z2,
19 register Float qBL = 3.0;
20 register Float zf = 975.0;
21 Float thetaTimesZf = - (y1*z2 - y2*z1) / (z2-z1);
22 Float xf = x1 * zf / z1;
23 Float yf = y2 - ((y2-y1) * (z2-zf)) / (z2-z1);
25 Float pDivZf = (qBL * 0.3 / thetaTimesZf);
26 p = (Float) fabs( pDivZf * zf );
28 // Note: the 0.3 is a conversion factor to GeV. it is 1e9 / c where c is
29 // the speed of light.
30 Float pt = pDivZf * sqrt(xf*xf+yf*yf);
35 Float AliHLTMUONCoreCalculateSignedPt(
37 register Float y1, register Float y2,
38 register Float z1, register Float z2,
39 register Float zf, register Float qBL,
43 Float thetaTimesZf = - (y1*z2 - y2*z1) / (z2-z1);
44 Float xf = x1 * zf / z1;
45 Float yf = y2 - ((y2-y1) * (z2-zf)) / (z2-z1);
47 Float pDivZf = (qBL * 0.3 / thetaTimesZf);
48 p = (Float) fabs( pDivZf * zf );
50 // Note: the 0.3 is a conversion factor to GeV. it is 1e9 / c where c is
51 // the speed of light.
52 Float pt = pDivZf * sqrt(xf*xf+yf*yf);
57 Float AliHLTMUONCoreCalculateSignedPt(
59 register Float y1, register Float y2,
60 register Float z1, register Float z2
63 register Float qBL = 3.0;
64 register Float zf = 975.0;
65 Float thetaTimesZf = - (y1*z2 - y2*z1) / (z2-z1);
66 Float xf = x1 * zf / z1;
67 Float yf = y2 - ((y2-y1) * (z2-zf)) / (z2-z1);
69 // Note: the 0.3 is a conversion factor to GeV. it is 1e9 / c where c is
70 // the speed of light.
71 Float pt = (qBL * 0.3 / thetaTimesZf) * sqrt(xf*xf+yf*yf);
76 Float AliHLTMUONCoreCalculateSignedPt(
78 register Float y1, register Float y2,
79 register Float z1, register Float z2,
80 register Float zf, register Float qBL
83 Float thetaTimesZf = - (y1*z2 - y2*z1) / (z2-z1);
84 Float xf = x1 * zf / z1;
85 Float yf = y2 - ((y2-y1) * (z2-zf)) / (z2-z1);
87 // Note: the 0.3 is a conversion factor to GeV. it is 1e9 / c where c is
88 // the speed of light.
89 Float pt = (qBL * 0.3 / thetaTimesZf) * sqrt(xf*xf+yf*yf);
94 Float AliHLTMUONCoreCalculatePt(
96 register Float y1, register Float y2,
97 register Float z1, register Float z2
100 return (Float) fabs(AliHLTMUONCoreCalculateSignedPt(x1, y1, y2, z1, z2));
104 Float AliHLTMUONCoreCalculatePt(
106 register Float y1, register Float y2,
107 register Float z1, register Float z2,
108 register Float zf, register Float qBL
111 return (Float) fabs(AliHLTMUONCoreCalculateSignedPt(x1, y1, y2, z1, z2, zf, qBL));