Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Corryvreckan
Corryvreckan
Commits
9603d2c5
Commit
9603d2c5
authored
May 18, 2020
by
Simon Spannagel
Browse files
Track: cleanup new method, return value and naming scheme
parent
833058b7
Pipeline
#1642764
passed with stages
in 32 minutes
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/objects/Multiplet.cpp
View file @
9603d2c5
...
...
@@ -42,9 +42,9 @@ void Multiplet::calculateResiduals() {
for
(
auto
c
:
track_clusters_
)
{
auto
cluster
=
dynamic_cast
<
Cluster
*>
(
c
.
GetObject
());
residual_global_
[
cluster
->
detectorID
()]
=
cluster
->
global
()
-
getIntercept
(
cluster
->
global
().
z
());
if
(
get
P
lane
(
cluster
->
detectorID
())
!=
nullptr
)
if
(
get
_p
lane
(
cluster
->
detectorID
())
!=
nullptr
)
residual_local_
[
cluster
->
detectorID
()]
=
cluster
->
local
()
-
get
P
lane
(
cluster
->
detectorID
())
->
getToLocal
()
*
getIntercept
(
cluster
->
global
().
z
());
cluster
->
local
()
-
get
_p
lane
(
cluster
->
detectorID
())
->
getToLocal
()
*
getIntercept
(
cluster
->
global
().
z
());
}
}
...
...
src/objects/StraightLineTrack.cpp
View file @
9603d2c5
...
...
@@ -64,9 +64,9 @@ void StraightLineTrack::calculateResiduals() {
auto
cluster
=
dynamic_cast
<
Cluster
*>
(
c
.
GetObject
());
// fixme: cluster->global.z() is only an approximation for the plane intersect. Can be fixed after !115
residual_global_
[
cluster
->
detectorID
()]
=
cluster
->
global
()
-
getIntercept
(
cluster
->
global
().
z
());
if
(
get
P
lane
(
cluster
->
detectorID
())
!=
nullptr
)
{
if
(
get
_p
lane
(
cluster
->
detectorID
())
!=
nullptr
)
{
residual_local_
[
cluster
->
detectorID
()]
=
cluster
->
local
()
-
get
P
lane
(
cluster
->
detectorID
())
->
getToLocal
()
*
getIntercept
(
cluster
->
global
().
z
());
cluster
->
local
()
-
get
_p
lane
(
cluster
->
detectorID
())
->
getToLocal
()
*
getIntercept
(
cluster
->
global
().
z
());
}
}
}
...
...
src/objects/Track.cpp
View file @
9603d2c5
...
...
@@ -243,7 +243,7 @@ void Track::registerPlane(const std::string& name, double z, double x0, Transfor
}
}
Plane
*
Track
::
get
P
lane
(
std
::
string
detetorID
)
{
Track
::
Plane
*
Track
::
get
_p
lane
(
std
::
string
detetorID
)
{
auto
plane
=
std
::
find_if
(
planes_
.
begin
(),
planes_
.
end
(),
[
&
detetorID
](
Plane
const
&
p
)
{
return
p
.
getName
()
==
detetorID
;
});
if
(
plane
==
planes_
.
end
())
...
...
src/objects/Track.hpp
View file @
9603d2c5
...
...
@@ -262,7 +262,7 @@ namespace corryvreckan {
};
protected:
Plane
*
get
P
lane
(
std
::
string
detetorID
);
Plane
*
get
_p
lane
(
std
::
string
detetorID
);
std
::
vector
<
TRef
>
track_clusters_
;
std
::
vector
<
TRef
>
associated_clusters_
;
std
::
map
<
std
::
string
,
ROOT
::
Math
::
XYPoint
>
residual_local_
;
...
...
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