Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
Rec
Manage
Activity
Members
Labels
Plan
Issues
291
Issue boards
Milestones
Iterations
Requirements
Jira
Code
Merge requests
113
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
Rec
Commits
29e7b482
Commit
29e7b482
authored
7 years ago
by
Wouter Hulsbergen
Browse files
Options
Downloads
Patches
Plain Diff
copy covariance matrix rather than keep pointer in CubicStateInterpolationTraj
parent
7eac461c
No related branches found
No related tags found
1 merge request
!873
Update of TrackVertexUtils
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Tr/TrackKernel/TrackKernel/CubicStateInterpolationTraj.h
+9
-9
9 additions, 9 deletions
Tr/TrackKernel/TrackKernel/CubicStateInterpolationTraj.h
Tr/TrackKernel/src/CubicStateInterpolationTraj.cpp
+4
-4
4 additions, 4 deletions
Tr/TrackKernel/src/CubicStateInterpolationTraj.cpp
with
13 additions
and
13 deletions
Tr/TrackKernel/TrackKernel/CubicStateInterpolationTraj.h
+
9
−
9
View file @
29e7b482
...
...
@@ -18,7 +18,7 @@
namespace
LHCb
{
class
CubicStateInterpolationTraj
:
public
CubicStateVectorInterpolationTraj
class
CubicStateInterpolationTraj
:
public
CubicStateVectorInterpolationTraj
{
public:
/// Constructor from two states
...
...
@@ -40,14 +40,14 @@ namespace LHCb
Gaudi
::
TrackSymMatrix
covariance
(
double
z
)
const
;
/// Calculate state at location z
State
state
(
double
z
)
const
override
;
State
state
(
double
z
)
const
override
final
;
/// Clone this trajectory
std
::
unique_ptr
<
Trajectory
>
clone
()
const
override
{
return
std
::
unique_ptr
<
Trajectory
>
(
new
CubicStateInterpolationTraj
(
*
this
))
;
}
private
:
const
Gaudi
::
TrackSymMatrix
*
m_covbegin
=
nullptr
;
///< Covariance at first state
const
Gaudi
::
TrackSymMatrix
*
m_covend
=
nullptr
;
///< Covariance at second state
Gaudi
::
TrackSymMatrix
m_covbegin
;
///< Covariance at first state
Gaudi
::
TrackSymMatrix
m_covend
;
///< Covariance at second state
};
/*************************************************************************************************/
...
...
@@ -58,7 +58,7 @@ namespace LHCb
CubicStateInterpolationTraj
::
CubicStateInterpolationTraj
(
const
LHCb
::
State
&
begin
,
const
LHCb
::
State
&
end
)
:
CubicStateVectorInterpolationTraj
(
begin
,
end
),
m_covbegin
(
&
(
begin
.
covariance
())
)
,
m_covend
(
&
(
end
.
covariance
())
)
m_covbegin
(
begin
.
covariance
()),
m_covend
(
end
.
covariance
())
{
}
...
...
@@ -66,7 +66,7 @@ namespace LHCb
CubicStateInterpolationTraj
::
CubicStateInterpolationTraj
(
const
LHCb
::
State
&
state
,
const
Gaudi
::
XYZVector
&
bfield
)
:
CubicStateVectorInterpolationTraj
(
state
,
bfield
),
m_covbegin
(
&
(
state
.
covariance
())
)
,
m_covend
(
m_covbegin
)
m_covbegin
(
state
.
covariance
()),
m_covend
(
m_covbegin
)
{
}
...
...
@@ -74,15 +74,15 @@ namespace LHCb
void
CubicStateInterpolationTraj
::
init
(
const
LHCb
::
State
&
begin
,
const
LHCb
::
State
&
end
)
{
CubicStateVectorInterpolationTraj
::
init
(
begin
,
end
)
;
m_covbegin
=
&
(
begin
.
covariance
()
)
;
m_covend
=
&
(
end
.
covariance
()
)
;
m_covbegin
=
begin
.
covariance
()
;
m_covend
=
end
.
covariance
()
;
}
inline
void
CubicStateInterpolationTraj
::
init
(
const
LHCb
::
State
&
state
,
const
Gaudi
::
XYZVector
&
bfield
)
{
CubicStateVectorInterpolationTraj
::
init
(
state
,
bfield
)
;
m_covbegin
=
m_covend
=
&
(
state
.
covariance
()
)
;
m_covbegin
=
m_covend
=
state
.
covariance
()
;
}
}
...
...
This diff is collapsed.
Click to expand it.
Tr/TrackKernel/src/CubicStateInterpolationTraj.cpp
+
4
−
4
View file @
29e7b482
...
...
@@ -32,19 +32,19 @@ namespace LHCb
{
Gaudi
::
TrackSymMatrix
cov
;
if
(
z
<=
zbegin
()
)
{
cov
=
*
m_covbegin
;
cov
=
m_covbegin
;
transport
(
cov
,
z
-
zbegin
()
)
;
}
else
if
(
z
>=
zend
())
{
cov
=
*
m_covend
;
cov
=
m_covend
;
transport
(
cov
,
z
-
zend
()
)
;
}
else
{
// what is the right weight? FIXME!
const
double
zfrac
=
(
z
-
zbegin
())
/
(
zend
()
-
zbegin
())
;
const
double
weight
=
(
1
-
zfrac
)
;
//linear
//double weight = 0.5 - 4*std::pow(zfrac-0.5,3) ; // cubic
Gaudi
::
TrackSymMatrix
covA
=
*
m_covbegin
;
Gaudi
::
TrackSymMatrix
covA
=
m_covbegin
;
transport
(
covA
,
z
-
zbegin
()
)
;
Gaudi
::
TrackSymMatrix
covB
=
*
m_covend
;
Gaudi
::
TrackSymMatrix
covB
=
m_covend
;
transport
(
covB
,
z
-
zend
()
)
;
cov
=
weight
*
covA
+
(
1
-
weight
)
*
covB
;
}
...
...
This diff is collapsed.
Click to expand it.
Carlos Vazquez Sierra
👁️🗨️
@cvazquez
mentioned in commit
d521b6a2
·
6 years ago
mentioned in commit
d521b6a2
mentioned in commit d521b6a2db5afba78396a640c9e40e2bf1ef4378
Toggle commit list
Carlos Vazquez Sierra
👁️🗨️
@cvazquez
mentioned in merge request
!880 (merged)
·
6 years ago
mentioned in merge request
!880 (merged)
mentioned in merge request !880
Toggle commit list
Carlos Vazquez Sierra
👁️🗨️
@cvazquez
mentioned in commit
4f38c600
·
6 years ago
mentioned in commit
4f38c600
mentioned in commit 4f38c600efcec803e81a764dac26130540d577d6
Toggle commit list
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