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
fb17a500
Commit
fb17a500
authored
May 20, 2020
by
Lennart Huth
Browse files
simplified kink calculation
parent
93414aff
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/objects/Multiplet.cpp
View file @
fb17a500
...
...
@@ -50,7 +50,6 @@ void Multiplet::calculateResiduals() {
void
Multiplet
::
fit
()
{
// FIXME: Currently asking for direction of "". Should be the last detector plane -> Would enable using more generic
// tracks
m_positionAtScatterer
=
((
m_downstream
->
getIntercept
(
m_scattererPosition
)
-
(
ROOT
::
Math
::
XYZPoint
(
0
,
0
,
0
)
-
m_upstream
->
getIntercept
(
m_scattererPosition
)))
/
...
...
@@ -58,11 +57,11 @@ void Multiplet::fit() {
m_offsetAtScatterer
=
m_downstream
->
getIntercept
(
m_scattererPosition
)
-
m_upstream
->
getIntercept
(
m_scattererPosition
);
// Calculate the angle
double
slope
Xu
p
=
m_upstream
->
getDirection
(
""
).
X
()
/
m_upstream
->
getDirection
(
""
).
Z
(
);
double
slope
Yup
=
m_upstream
->
getDirection
(
""
).
Y
()
/
m_upstream
->
getDirection
(
""
).
Z
(
);
double
slopeXdown
=
m_downstream
->
getDirection
(
""
).
X
()
/
m_downstream
->
getDirection
(
""
).
Z
();
double
slopeYdown
=
m_downstream
->
getDirection
(
""
).
Y
()
/
m_downstream
->
getDirection
(
""
).
Z
(
);
m_kinkAtScatterer
=
ROOT
::
Math
::
XYVector
(
slopeXdown
-
slopeXup
,
slopeYdown
-
slopeYup
);
ROOT
::
Math
::
XYZVector
slope
U
p
=
m_upstream
->
getDirection
(
m_scattererPosition
);
ROOT
::
Math
::
XYZVector
slope
Down
=
m_upstream
->
getDirection
(
m_scattererPosition
);
//
ROOT
::
Math
::
XYZVector
kinks
=
(
slopeUp
/=
slopeUp
.
z
())
-
(
slopeDown
/=
slopeDown
.
z
()
);
m_kinkAtScatterer
=
ROOT
::
Math
::
XYVector
(
kinks
.
x
(),
kinks
.
y
()
);
this
->
calculateChi2
();
this
->
calculateResiduals
();
...
...
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