Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
athena
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review 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
Annika Stein
athena
Commits
beb7766f
Commit
beb7766f
authored
7 years ago
by
Dave Casper
Browse files
Options
Downloads
Patches
Plain Diff
Handle edge cases more correctly and efficiently.
parent
6254a78f
No related branches found
No related tags found
Loading
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Tracking/TrkVertexFitter/TrkVertexSeedFinderUtils/src/GaussianTrackDensity.cxx
+8
-6
8 additions, 6 deletions
...ter/TrkVertexSeedFinderUtils/src/GaussianTrackDensity.cxx
with
8 additions
and
6 deletions
Tracking/TrkVertexFitter/TrkVertexSeedFinderUtils/src/GaussianTrackDensity.cxx
+
8
−
6
View file @
beb7766f
...
...
@@ -30,14 +30,15 @@ namespace Trk
void
GaussianTrackDensity
::
trackDensity
(
double
z
,
double
&
density
,
double
&
firstDerivative
,
double
&
secondDerivative
)
const
{
TrackEntry
target
(
z
);
lowerMapIterator
first
=
m_lowerMap
.
lower_bound
(
target
);
upperMapIterator
final
=
m_upperMap
.
upper_bound
(
target
);
trackMapIterator
firstLoop
=
m_trackMap
.
find
(
first
->
second
);
trackMapIterator
finalLoop
=
m_trackMap
.
find
(
final
->
second
);
density
=
0.0
;
firstDerivative
=
0.0
;
secondDerivative
=
0.0
;
TrackEntry
target
(
z
);
lowerMapIterator
first
=
m_lowerMap
.
lower_bound
(
target
);
// first track whose UPPER bound is not less than z
upperMapIterator
final
=
m_upperMap
.
upper_bound
(
target
);
// first track whose LOWER bound is greater than z
trackMapIterator
firstLoop
=
m_trackMap
.
find
(
first
->
second
);
// this will be the first track we include
trackMapIterator
finalLoop
=
m_trackMap
.
find
(
final
->
second
);
// this will be the track after the last we include
if
(
firstLoop
->
second
.
lowerBound
>
z
||
finalLoop
->
second
.
upperBound
<
z
)
return
;
for
(
auto
itrk
=
firstLoop
;
itrk
!=
finalLoop
&&
itrk
!=
m_trackMap
.
end
();
itrk
++
)
{
double
delta
=
exp
(
itrk
->
second
.
c_0
+
z
*
(
itrk
->
second
.
c_1
+
z
*
itrk
->
second
.
c_2
));
...
...
@@ -51,12 +52,13 @@ namespace Trk
double
GaussianTrackDensity
::
trackDensity
(
double
z
)
const
{
double
sum
=
0.0
;
TrackEntry
target
(
z
);
lowerMapIterator
first
=
m_lowerMap
.
lower_bound
(
target
);
upperMapIterator
final
=
m_upperMap
.
upper_bound
(
target
);
trackMapIterator
firstLoop
=
m_trackMap
.
find
(
first
->
second
);
trackMapIterator
finalLoop
=
m_trackMap
.
find
(
final
->
second
);
double
sum
=
0.0
;
if
(
firstLoop
->
second
.
lowerBound
>
z
||
finalLoop
->
second
.
upperBound
<
z
)
return
sum
;
for
(
auto
itrk
=
firstLoop
;
itrk
!=
finalLoop
&&
itrk
!=
m_trackMap
.
end
();
itrk
++
)
{
//ATH_MSG_DEBUG("@z=" << z << " adding contrib from z0=" << itrk->first.parameters()[Trk::z0] <<
...
...
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