Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
LHCb
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LHCb
LHCb
Commits
77f13f12
Commit
77f13f12
authored
5 years ago
by
Wouter Hulsbergen
Committed by
Gerhard Raven
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Add TrackCompactVertex and TrackNProngVertex (see
Rec!1477
).
parent
fed70df1
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Tr/TrackKernel/src/TrackVertexUtils.cpp
+0
-62
0 additions, 62 deletions
Tr/TrackKernel/src/TrackVertexUtils.cpp
with
0 additions
and
62 deletions
Tr/TrackKernel/src/TrackVertexUtils.cpp
+
0
−
62
View file @
77f13f12
...
...
@@ -56,68 +56,6 @@ namespace LHCb {
return
dx
*
dx
*
invcov00
+
2
*
dx
*
dy
*
invcov10
+
dy
*
dy
*
invcov11
;
}
///////////////////////////////////////////////////////////////////////////
/// Return the chi2 of the vertex of two track states
///////////////////////////////////////////////////////////////////////////
double
vertexChi2
(
const
LHCb
::
State
&
stateA
,
const
LHCb
::
State
&
stateB
)
{
// first compute the cross product of the directions. we'll need this in any case
const
double
txA
=
stateA
.
tx
();
const
double
tyA
=
stateA
.
ty
();
const
double
txB
=
stateB
.
tx
();
const
double
tyB
=
stateB
.
ty
();
double
nx
=
tyA
-
tyB
;
// y1 * z2 - y2 * z1
double
ny
=
txB
-
txA
;
// - x1 * z2 + x2 * z1
double
nz
=
txA
*
tyB
-
tyA
*
txB
;
// x1 * y2 - x2 * y1
// double n2 = nx*nx + ny*ny + nz*nz ;
// compute doca. we don't divide by the normalization to save time. we call it 'ndoca'
double
dx
=
stateA
.
x
()
-
stateB
.
x
();
double
dy
=
stateA
.
y
()
-
stateB
.
y
();
double
dz
=
stateA
.
z
()
-
stateB
.
z
();
double
ndoca
=
dx
*
nx
+
dy
*
ny
+
dz
*
nz
;
// the hard part: compute the jacobians :-)
Gaudi
::
Vector4
jacA
,
jacB
;
jacA
(
0
)
=
nx
;
jacA
(
1
)
=
ny
;
jacA
(
2
)
=
-
dy
+
dz
*
tyB
;
jacA
(
3
)
=
+
dx
-
dz
*
txB
;
jacB
(
0
)
=
-
nx
;
jacB
(
1
)
=
-
ny
;
jacB
(
2
)
=
+
dy
-
dz
*
tyA
;
jacB
(
3
)
=
-
dx
+
dz
*
txA
;
// compute the variance on ndoca
const
Gaudi
::
TrackSymMatrix
&
covA
=
stateA
.
covariance
();
const
Gaudi
::
TrackSymMatrix
&
covB
=
stateB
.
covariance
();
double
varndoca
=
ROOT
::
Math
::
Similarity
(
jacA
,
covA
.
Sub
<
Gaudi
::
SymMatrix4x4
>
(
0
,
0
)
)
+
ROOT
::
Math
::
Similarity
(
jacB
,
covB
.
Sub
<
Gaudi
::
SymMatrix4x4
>
(
0
,
0
)
);
// return the chi2
return
ndoca
*
ndoca
/
varndoca
;
}
///////////////////////////////////////////////////////////////////////////
/// Return the doca between two track states
///////////////////////////////////////////////////////////////////////////
double
doca
(
const
LHCb
::
State
&
stateA
,
const
LHCb
::
State
&
stateB
)
{
// first compute the cross product of the directions.
const
double
txA
=
stateA
.
tx
();
const
double
tyA
=
stateA
.
ty
();
const
double
txB
=
stateB
.
tx
();
const
double
tyB
=
stateB
.
ty
();
double
nx
=
tyA
-
tyB
;
// y1 * z2 - y2 * z1
double
ny
=
txB
-
txA
;
// - x1 * z2 + x2 * z1
double
nz
=
txA
*
tyB
-
tyA
*
txB
;
// x1 * y2 - x2 * y1
double
n
=
std
::
sqrt
(
nx
*
nx
+
ny
*
ny
+
nz
*
nz
);
// compute the doca
double
dx
=
stateA
.
x
()
-
stateB
.
x
();
double
dy
=
stateA
.
y
()
-
stateB
.
y
();
double
dz
=
stateA
.
z
()
-
stateB
.
z
();
double
ndoca
=
dx
*
nx
+
dy
*
ny
+
dz
*
nz
;
return
ndoca
/
n
;
}
///////////////////////////////////////////////////////////////////////////
/// Return the distance between a track state and a point
///////////////////////////////////////////////////////////////////////////
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment