Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
LHCb
Allen
Commits
158bb13c
Commit
158bb13c
authored
Jun 21, 2019
by
Vladimir Gligorov
Browse files
fix typo
parent
4cd0f75e
Pipeline
#933135
passed with stage
in 1 minute and 16 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
cuda/UT/compassUT/src/UTFastFitter.cu
View file @
158bb13c
...
...
@@ -47,51 +47,50 @@ __host__ __device__ float fastfitter(
const
float
zKink
=
UT
::
Constants
::
magFieldParams
[
0
]
-
ty
*
ty
*
UT
::
Constants
::
magFieldParams
[
1
]
-
ty
*
ty
*
ty
*
ty
*
UT
::
Constants
::
magFieldParams
[
2
];
const
float
xMidField
=
velo_state
.
x
+
velo_state
.
tx
*
(
zKink
-
velo_state
.
z
);
const
float
zDiff
=
0.001
f
*
(
zKink
-
UT
::
Constants
::
zMidUT
);
// -- This is to avoid division by zero...
const
float
pHelper
=
std
::
max
(
float
(
std
::
abs
(
best_params
.
qp
*
qpxz2p
)),
float
(
1e-9
));
const
float
invP
=
pHelper
*
sqrtf
(
1.0
f
+
ty
*
ty
);
// these resolution are semi-empirical, could be tuned and might not be correct for low momentum.
// this is the resolution due to multiple scattering between Velo and UT
const
float
error1
=
0.14
f
+
10000.0
f
*
invP
;
// this is the resolution due to the finite Velo resolution
const
float
error2
=
0.12
f
+
3000.0
f
*
invP
;
const
float
error
=
error1
*
error1
+
error2
*
error2
;
const
float
weight
=
1.0
f
/
error
;
float
mat
[
6
]
=
{
weight
,
weight
*
zDiff
,
weight
*
zDiff
*
zDiff
,
0.0
f
,
0.0
f
,
0.0
f
};
float
rhs
[
3
]
=
{
weight
*
xMidField
,
weight
*
xMidField
*
zDiff
,
0.0
f
};
const
float
yyProto
=
velo_state
.
y
-
velo_state
.
ty
*
velo_state
.
z
;
for
(
int
i
=
0
;
i
<
UT
::
Constants
::
n_layers
;
++
i
)
{
if
(
best_hits
[
i
]
!=
-
1
)
{
const
auto
hit
=
best_hits
[
i
];
const
int
plane_code
=
i
;
const
float
dxDy
=
ut_dxDy
[
plane_code
];
const
float
yy
=
yyProto
+
(
velo_state
.
ty
*
ut_hits
.
zAtYEq0
[
hit
]);
const
float
ui
=
ut_hits
.
xAt
(
hit
,
yy
,
dxDy
);
const
float
dz
=
0.001
f
*
(
ut_hits
.
zAtYEq0
[
hit
]
-
UT
::
Constants
::
zMidUT
);
const
float
w
=
ut_hits
.
weight
[
hit
];
const
float
t
=
ut_hits
.
sinT
(
hit
,
dxDy
);
mat
[
0
]
+=
w
;
mat
[
1
]
+=
w
*
dz
;
mat
[
2
]
+=
w
*
dz
*
dz
;
mat
[
3
]
+=
w
*
t
;
mat
[
4
]
+=
w
*
dz
*
t
;
mat
[
5
]
+=
w
*
t
*
t
;
rhs
[
0
]
+=
w
*
ui
;
rhs
[
1
]
+=
w
*
ui
*
dz
;
rhs
[
2
]
+=
w
*
ui
*
t
;
}
const
float
zDiff
=
0.001
f
*
(
zKink
-
UT
::
Constants
::
zMidUT
);
// -- This is to avoid division by zero...
const
float
pHelper
=
std
::
max
(
float
(
std
::
abs
(
best_params
.
qp
*
qpxz2p
)),
float
(
1e-9
));
const
float
invP
=
pHelper
*
sqrtf
(
1.0
f
+
ty
*
ty
);
// these resolution are semi-empirical, could be tuned and might not be correct for low momentum.
// this is the resolution due to multiple scattering between Velo and UT
const
float
error1
=
0.14
f
+
10000.0
f
*
invP
;
// this is the resolution due to the finite Velo resolution
const
float
error2
=
0.12
f
+
3000.0
f
*
invP
;
const
float
error
=
error1
*
error1
+
error2
*
error2
;
const
float
weight
=
1.0
f
/
error
;
float
mat
[
6
]
=
{
weight
,
weight
*
zDiff
,
weight
*
zDiff
*
zDiff
,
0.0
f
,
0.0
f
,
0.0
f
};
float
rhs
[
3
]
=
{
weight
*
xMidField
,
weight
*
xMidField
*
zDiff
,
0.0
f
};
const
float
yyProto
=
velo_state
.
y
-
velo_state
.
ty
*
velo_state
.
z
;
for
(
int
i
=
0
;
i
<
UT
::
Constants
::
n_layers
;
++
i
)
{
if
(
best_hits
[
i
]
!=
-
1
)
{
const
auto
hit
=
best_hits
[
i
];
const
int
plane_code
=
i
;
const
float
dxDy
=
ut_dxDy
[
plane_code
];
const
float
yy
=
yyProto
+
(
velo_state
.
ty
*
ut_hits
.
zAtYEq0
[
hit
]);
const
float
ui
=
ut_hits
.
xAt
(
hit
,
yy
,
dxDy
);
const
float
dz
=
0.001
f
*
(
ut_hits
.
zAtYEq0
[
hit
]
-
UT
::
Constants
::
zMidUT
);
const
float
w
=
ut_hits
.
weight
[
hit
];
const
float
t
=
ut_hits
.
sinT
(
hit
,
dxDy
);
mat
[
0
]
+=
w
;
mat
[
1
]
+=
w
*
dz
;
mat
[
2
]
+=
w
*
dz
*
dz
;
mat
[
3
]
+=
w
*
t
;
mat
[
4
]
+=
w
*
dz
*
t
;
mat
[
5
]
+=
w
*
t
*
t
;
rhs
[
0
]
+=
w
*
ui
;
rhs
[
1
]
+=
w
*
ui
*
dz
;
rhs
[
2
]
+=
w
*
ui
*
t
;
}
}
const
float
a11
=
mat
[
2
]
*
mat
[
5
]
-
mat
[
4
]
*
mat
[
4
];
const
float
a12
=
mat
[
4
]
*
mat
[
3
]
-
mat
[
1
]
*
mat
[
5
];
const
float
a13
=
mat
[
1
]
*
mat
[
4
]
-
mat
[
2
]
*
mat
[
3
];
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment