Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Corryvreckan
Corryvreckan
Commits
8ae74e9d
Commit
8ae74e9d
authored
Mar 14, 2019
by
Morag Jean Williams
Browse files
Fixing pixel tolerance cut in hasIntercept function of detector class. Cut was asymetrical
parent
e7e0e02a
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/core/detector/Detector.cpp
View file @
8ae74e9d
...
...
@@ -277,8 +277,8 @@ bool Detector::hasIntercept(const Track* track, double pixelTolerance) const {
// Check if the row and column are outside of the chip
bool
intercept
=
true
;
if
(
row
<
(
pixelTolerance
-
0.5
)
||
row
>
(
this
->
m_nPixels
.
Y
()
-
0.5
-
pixelTolerance
)
||
column
<
(
pixelTolerance
-
0.5
)
||
column
>
(
this
->
m_nPixels
.
X
()
-
0.5
-
pixelTolerance
))
if
(
row
<
(
pixelTolerance
)
||
row
>
(
this
->
m_nPixels
.
Y
()
-
pixelTolerance
)
||
column
<
(
pixelTolerance
)
||
column
>
(
this
->
m_nPixels
.
X
()
-
pixelTolerance
))
intercept
=
false
;
return
intercept
;
...
...
src/modules/AnalysisDUT/AnalysisDUT.cpp
View file @
8ae74e9d
...
...
@@ -180,8 +180,14 @@ void AnalysisDUT::initialise() {
hAssociatedTracksGlobalPosition
=
new
TH2F
(
"hAssociatedTracksGlobalPosition"
,
"hAssociatedTracksGlobalPosition"
,
200
,
-
10
,
10
,
200
,
-
10
,
10
);
hUnassociatedTracksGlobalPosition
=
new
TH2F
(
"hUnassociatedTracksGlobalPosition"
,
"hUnassociatedTracksGlobalPosition"
,
200
,
-
10
,
10
,
200
,
-
10
,
10
);
hAssociatedTracksLocalPosition
=
new
TH2F
(
"hAssociatedTracksLocalPosition"
,
"hAssociatedTracksLocalPosition"
,
m_detector
->
nPixels
().
X
(),
0
,
m_detector
->
nPixels
().
X
(),
m_detector
->
nPixels
().
Y
(),
0
,
m_detector
->
nPixels
().
Y
());
}
StatusCode
AnalysisDUT
::
run
(
std
::
shared_ptr
<
Clipboard
>
clipboard
)
{
...
...
@@ -211,7 +217,7 @@ StatusCode AnalysisDUT::run(std::shared_ptr<Clipboard> clipboard) {
auto
globalIntercept
=
m_detector
->
getIntercept
(
track
);
auto
localIntercept
=
m_detector
->
globalToLocal
(
globalIntercept
);
if
(
!
m_detector
->
hasIntercept
(
track
,
1.
))
{
if
(
!
m_detector
->
hasIntercept
(
track
,
0.5
))
{
LOG
(
DEBUG
)
<<
" - track outside DUT area"
;
continue
;
}
...
...
@@ -358,6 +364,8 @@ StatusCode AnalysisDUT::run(std::shared_ptr<Clipboard> clipboard) {
track
->
addAssociatedCluster
(
cluster
);
hAssociatedTracksGlobalPosition
->
Fill
(
globalIntercept
.
X
(),
globalIntercept
.
Y
());
hAssociatedTracksLocalPosition
->
Fill
(
m_detector
->
getColumn
(
localIntercept
),
m_detector
->
getRow
(
localIntercept
));
// Only allow one associated cluster per track
break
;
...
...
src/modules/AnalysisDUT/AnalysisDUT.h
View file @
8ae74e9d
...
...
@@ -58,7 +58,7 @@ namespace corryvreckan {
TH2F
*
residualsTimeVsSignal
;
TH2F
*
hAssociatedTracksGlobalPosition
;
TH2F
*
h
Una
ssociatedTracks
Glob
alPosition
;
TH2F
*
h
A
ssociatedTracks
Loc
alPosition
;
// Member variables
double
spatialCut
,
m_timeCutFrameEdge
;
...
...
src/modules/AnalysisEfficiency/AnalysisEfficiency.cpp
View file @
8ae74e9d
...
...
@@ -89,7 +89,7 @@ StatusCode AnalysisEfficiency::run(std::shared_ptr<Clipboard> clipboard) {
auto
globalIntercept
=
m_detector
->
getIntercept
(
track
);
auto
localIntercept
=
m_detector
->
globalToLocal
(
globalIntercept
);
if
(
!
m_detector
->
hasIntercept
(
track
,
1.
))
{
if
(
!
m_detector
->
hasIntercept
(
track
,
0.5
))
{
LOG
(
DEBUG
)
<<
" - track outside DUT area"
;
continue
;
}
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment