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
83549e4a
Commit
83549e4a
authored
May 20, 2020
by
Lennart Huth
Browse files
introduced direction at any z position for all tracks
parent
dd593c65
Changes
6
Hide whitespace changes
Inline
Side-by-side
src/objects/GblTrack.cpp
View file @
83549e4a
...
...
@@ -409,6 +409,15 @@ ROOT::Math::XYZVector GblTrack::getDirection(const std::string& detectorID) cons
return
((
pointAfter
-
point
)
/
(
pointAfter
.
z
()
-
point
.
z
()));
}
XYZVector
GblTrack
::
getDirection
(
const
double
&
z
)
const
{
auto
planeUpstream
=
std
::
find_if
(
planes_
.
begin
(),
planes_
.
end
(),
[
&
z
](
const
Plane
&
p
)
{
return
p
.
getPosition
()
>
z
;
});
if
(
planeUpstream
!=
planes_
.
end
())
{
return
getDirection
(
planeUpstream
->
getName
());
}
else
{
return
getDirection
(
planes_
.
end
()
->
getName
());
}
}
void
GblTrack
::
print
(
std
::
ostream
&
out
)
const
{
out
<<
"GblTrack with nhits = "
<<
track_clusters_
.
size
()
<<
" and nscatterers = "
<<
planes_
.
size
()
<<
", chi2 = "
<<
chi2_
<<
", ndf = "
<<
ndof_
;
...
...
src/objects/GblTrack.hpp
View file @
83549e4a
...
...
@@ -52,6 +52,13 @@ namespace corryvreckan {
*/
ROOT
::
Math
::
XYZVector
getDirection
(
const
std
::
string
&
detectorID
)
const
override
;
/**
* @brief Get the track direction at any given z position
* @param global z position
* @return ROOT::Math::XYZPoint direction at z
*/
ROOT
::
Math
::
XYZVector
getDirection
(
const
double
&
z
)
const
override
;
/**
* @brief Return kink of track at given detector
* @param detectorID Detector ID at which the kink should be evaluated
...
...
src/objects/Multiplet.cpp
View file @
83549e4a
...
...
@@ -85,6 +85,10 @@ ROOT::Math::XYZVector Multiplet::getDirection(const std::string& detectorID) con
:
m_downstream
->
getDirection
(
detectorID
);
}
XYZVector
Multiplet
::
getDirection
(
const
double
&
z
)
const
{
return
(
z
<=
m_scattererPosition
?
m_upstream
->
getDirection
(
z
)
:
m_downstream
->
getDirection
(
z
));
}
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_
<<
", "
...
...
src/objects/Multiplet.hpp
View file @
83549e4a
...
...
@@ -56,6 +56,13 @@ namespace corryvreckan {
*/
ROOT
::
Math
::
XYZVector
getDirection
(
const
std
::
string
&
detectorID
)
const
override
;
/**
* @brief Get the track direction at any given z position
* @param global z position
* @return ROOT::Math::XYZPoint direction at z
*/
ROOT
::
Math
::
XYZVector
getDirection
(
const
double
&
z
)
const
override
;
/**
* @brief Get the offset between up- & downstream tracklet at the position of the scatterer
* @return ROOT::Math::XYVector offset at scatterer
...
...
src/objects/StraightLineTrack.hpp
View file @
83549e4a
...
...
@@ -56,6 +56,13 @@ namespace corryvreckan {
*/
ROOT
::
Math
::
XYZVector
getDirection
(
const
std
::
string
&
)
const
override
{
return
m_direction
;
}
/**
* @brief Get the track direction at any given z position
* @param global z position
* @return ROOT::Math::XYZPoint direction at z
*/
ROOT
::
Math
::
XYZVector
getDirection
(
const
double
&
)
const
override
{
return
m_direction
;
}
ROOT
::
Math
::
XYPoint
distance
(
const
Cluster
*
cluster
)
const
;
/**
...
...
src/objects/Track.hpp
View file @
83549e4a
...
...
@@ -190,6 +190,13 @@ namespace corryvreckan {
*/
virtual
ROOT
::
Math
::
XYZVector
getDirection
(
const
std
::
string
&
)
const
;
/**
* @brief Get the track direction at any given z position
* @param global z position
* @return ROOT::Math::XYZPoint direction at z
*/
virtual
ROOT
::
Math
::
XYZVector
getDirection
(
const
double
&
)
const
;
/**
* @brief check if the fitting routine already has been called. Chi2 etc are not set before
* @return true if fit has already been performed, false otherwise
...
...
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