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
449adc1f
Commit
449adc1f
authored
Jun 10, 2016
by
Daniel Hynds
Browse files
added search for missing hits during efficiency calculation
Former-commit-id: 9773055d140f9adb74ff6911f1e1dcec32489a38
parent
3e2a920a
Changes
2
Show whitespace changes
Inline
Side-by-side
branches/trunk/algorithms/ClicpixAnalysis.C
View file @
449adc1f
...
...
@@ -6,7 +6,7 @@
ClicpixAnalysis
::
ClicpixAnalysis
(
bool
debugging
)
:
Algorithm
(
"ClicpixAnalysis"
){
debug
=
debugging
;
m_associationCut
=
0
.
3
;
//
3
00 um
m_associationCut
=
0
.
1
;
//
1
00 um
m_proximityCut
=
0
.
125
;
// 125 um
}
...
...
@@ -114,7 +114,7 @@ void ClicpixAnalysis::initialise(Parameters* par){
hInterceptClusterSize4
=
new
TH2F
(
"hInterceptClusterSize4"
,
"hInterceptClusterSize4"
,
50
,
0
,
50
,
25
,
0
,
25
);
// Initialise member variables
m_eventNumber
=
0
;
m_triggerNumber
=
0
;
dutID
=
parameters
->
DUT
;
m_eventNumber
=
0
;
m_triggerNumber
=
0
;
dutID
=
parameters
->
DUT
;
m_lostHits
=
0
.;
}
...
...
@@ -275,23 +275,26 @@ StatusCode ClicpixAnalysis::run(Clipboard* clipboard){
hInterceptClusterSize4
->
Fill
(
pixelInterceptX
,
pixelInterceptY
);
}
}
else
{
/*
// Search for lost hits. Basically loop through all pixels in all clusters and see if any are close
// Search for lost hits. Basically loop through all pixels in all clusters and see if any are close.
// Large clusters (such as from deltas) can pull the cluster centre sufficiently far from the track
bool
pixelMatch
=
false
;
int
size
=
0
;
for (itc = clusters->begin(); itc != clusters->end(); ++itc) {
if (!(*itc)) continue; //if(matched) continue;
string chip = (*itc)->detectorId();
// Only look at the clicpix
if(chip != "CLi-CPix") continue;
for
(
itCorrelate
=
clusters
->
begin
();
itCorrelate
!=
clusters
->
end
();
++
itCorrelate
)
{
if
(
pixelMatch
)
break
;
// Loop over pixels
vector<RowColumnEntry*>
::const_iterator it
h
;
for (it
h
= (*it
c)->hit
s()
->
begin(); it
h
!= (*it
c)->hit
s()
->
end();
++ith
) {
Pixels
::
const_iterator
it
Pixel
;
for
(
it
Pixel
=
(
*
it
Correlate
)
->
pixel
s
()
.
begin
();
it
Pixel
!=
(
*
it
Correlate
)
->
pixel
s
()
.
end
();
itPixel
++
)
{
// Check if this pixel is within the search window
if( fabs((*ith)->column()-chipInterceptCol) > (residualmaxx/parameters->pixelPitchX["CLi-CPix"]) ||
fabs((*ith)->row()-chipInterceptRow) > (residualmaxy/parameters->pixelPitchY["CLi-CPix"]) ) continue;
// Get the pixel global position
PositionVector3D
<
Cartesian3D
<
double
>
>
pixelPositionLocal
=
parameters
->
detector
[
dutID
]
->
getLocalPosition
((
*
itPixel
)
->
m_row
,(
*
itPixel
)
->
m_column
);
PositionVector3D
<
Cartesian3D
<
double
>
>
pixelPositionGlobal
=
*
(
parameters
->
detector
[
dutID
]
->
m_localToGlobal
)
*
pixelPositionLocal
;
// Check if it is close to the track
if
(
fabs
(
pixelPositionGlobal
.
X
()
-
trackIntercept
.
X
()
)
>
m_associationCut
||
fabs
(
pixelPositionGlobal
.
Y
()
-
trackIntercept
.
Y
()
)
>
m_associationCut
)
continue
;
pixelMatch
=
true
;
break
;
}
}
// Increment counter for number of hits found this way
...
...
@@ -299,7 +302,6 @@ StatusCode ClicpixAnalysis::run(Clipboard* clipboard){
m_lostHits
++
;
hTrackInterceptsChipLost
->
Fill
(
chipInterceptCol
,
chipInterceptRow
);
}
*/
}
}
...
...
@@ -331,9 +333,8 @@ void ClicpixAnalysis::finalise(){
tcout
<<
"***** Clicpix efficiency calculation *****"
<<
endl
;
tcout
<<
"***** ntracks: "
<<
(
int
)
nTracks
<<
", nclusters "
<<
(
int
)
nClusters
<<
endl
;
tcout
<<
"***** Efficiency: "
<<
100
.
*
efficiency
<<
" +/- "
<<
100
.
*
errorEfficiency
<<
" %"
<<
endl
;
tcout
<<
"***** If including the "
<<
(
int
)
m_lostHits
<<
" lost pixel hits, this becomes "
<<
100
.
*
(
m_lostHits
+
nClusters
)
/
nTracks
<<
" %"
<<
endl
;
tcout
<<
endl
;
// tcout<<"***** If including the "<<(int)m_lostHits<<" lost pixel hits, this becomes "<<100.*(m_lostHits+nClusters)/nTracks<<" %"<<endl;
}
...
...
branches/trunk/algorithms/ClicpixAnalysis.h
View file @
449adc1f
...
...
@@ -114,6 +114,7 @@ public:
map
<
int
,
double
>
m_hitPixels
;
double
m_associationCut
;
double
m_proximityCut
;
double
m_lostHits
;
};
...
...
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