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
b2a76d67
Commit
b2a76d67
authored
May 13, 2020
by
Paul Schuetze
Browse files
Multiplet/Track: Move member for position/kinkAtScatterer to `Track` base class and rename
parent
878017ec
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/objects/Multiplet.cpp
View file @
b2a76d67
...
...
@@ -49,9 +49,9 @@ 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
)))
/
2.
);
positionAtScatterer
_
=
((
m_downstream
->
getIntercept
(
m_scattererPosition
)
-
(
ROOT
::
Math
::
XYZPoint
(
0
,
0
,
0
)
-
m_upstream
->
getIntercept
(
m_scattererPosition
)))
/
2.
);
m_offsetAtScatterer
=
m_downstream
->
getIntercept
(
m_scattererPosition
)
-
m_upstream
->
getIntercept
(
m_scattererPosition
);
// Calculate the angle
...
...
@@ -59,7 +59,7 @@ void Multiplet::fit() {
double
slopeYup
=
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
);
kinkAtScatterer
_
=
ROOT
::
Math
::
XYVector
(
slopeXdown
-
slopeXup
,
slopeYdown
-
slopeYup
);
this
->
calculateChi2
();
this
->
calculateResiduals
();
...
...
@@ -68,7 +68,7 @@ void Multiplet::fit() {
ROOT
::
Math
::
XYZPoint
Multiplet
::
getIntercept
(
double
z
)
const
{
return
z
==
m_scattererPosition
?
m_
positionAtScatterer
?
positionAtScatterer
_
:
(
z
<
m_scattererPosition
?
m_upstream
->
getIntercept
(
z
)
:
m_downstream
->
getIntercept
(
z
));
}
...
...
@@ -83,7 +83,7 @@ ROOT::Math::XYZVector Multiplet::getDirection(std::string detectorID) const {
}
void
Multiplet
::
print
(
std
::
ostream
&
out
)
const
{
out
<<
"Multiplet "
<<
this
->
m_scattererPosition
<<
", "
<<
this
->
m_
positionAtScatterer
<<
", "
<<
this
->
m_offsetAtScatterer
<<
", "
<<
this
->
m_
kinkAtScatterer
<<
", "
<<
this
->
chi2_
<<
", "
<<
this
->
ndof_
<<
", "
out
<<
"Multiplet "
<<
this
->
m_scattererPosition
<<
", "
<<
this
->
positionAtScatterer
_
<<
", "
<<
this
->
m_offsetAtScatterer
<<
", "
<<
this
->
kinkAtScatterer
_
<<
", "
<<
this
->
chi2_
<<
", "
<<
this
->
ndof_
<<
", "
<<
this
->
chi2ndof_
<<
", "
<<
this
->
timestamp
();
}
src/objects/Track.hpp
View file @
b2a76d67
...
...
@@ -241,13 +241,13 @@ namespace corryvreckan {
* @brief Get the track intercept at the position of the scatterer
* @return ROOT::Math::XYPoint Track position at scatterer
*/
ROOT
::
Math
::
XYZPoint
getPositionAtScatterer
()
{
return
m_
positionAtScatterer
;
};
ROOT
::
Math
::
XYZPoint
getPositionAtScatterer
()
{
return
positionAtScatterer
_
;
};
/**
* @brief Get the kink angle between up- & downstream tracklet at the position of the scatterer
* @return ROOT::Math::XYVector kink at scatterer
*/
ROOT
::
Math
::
XYVector
getKinkAtScatterer
()
{
return
m_
kinkAtScatterer
;
};
ROOT
::
Math
::
XYVector
getKinkAtScatterer
()
{
return
kinkAtScatterer
_
;
};
/**
* @brief Get the materialBudget of a detector layer
...
...
@@ -264,8 +264,8 @@ namespace corryvreckan {
virtual
void
setVolumeScatter
(
double
length
)
=
0
;
void
setPositionAtScatterer
(
ROOT
::
Math
::
XYZPoint
position
)
{
m_
positionAtScatterer
=
position
;
}
void
setKinkAtScatterer
(
ROOT
::
Math
::
XYVector
kink
)
{
m_
kinkAtScatterer
=
kink
;
}
void
setPositionAtScatterer
(
ROOT
::
Math
::
XYZPoint
position
)
{
positionAtScatterer
_
=
position
;
}
void
setKinkAtScatterer
(
ROOT
::
Math
::
XYVector
kink
)
{
kinkAtScatterer
_
=
kink
;
}
protected:
std
::
vector
<
TRef
>
track_clusters_
;
...
...
@@ -281,6 +281,8 @@ namespace corryvreckan {
double
chi2ndof_
;
bool
isFitted_
{};
double
momentum_
{
-
1
};
ROOT
::
Math
::
XYZPoint
positionAtScatterer_
;
ROOT
::
Math
::
XYVector
kinkAtScatterer_
;
// ROOT I/O class definition - update version number when you change this class!
ClassDefOverride
(
Track
,
8
)
...
...
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