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
14fa6bfb
Commit
14fa6bfb
authored
Apr 11, 2018
by
Simon Spannagel
Browse files
CP2EvL: allow discarding zero-ToT pixels
parent
c12b2052
Pipeline
#354159
passed with stages
in 2 minutes and 19 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/algorithms/Clicpix2EventLoader/Clicpix2EventLoader.cpp
View file @
14fa6bfb
...
...
@@ -10,7 +10,10 @@ using namespace caribou;
using
namespace
clicpix2_utils
;
Clicpix2EventLoader
::
Clicpix2EventLoader
(
Configuration
config
,
std
::
vector
<
Detector
*>
detectors
)
:
Algorithm
(
std
::
move
(
config
),
std
::
move
(
detectors
))
{}
:
Algorithm
(
std
::
move
(
config
),
std
::
move
(
detectors
))
{
discardZeroToT
=
m_config
.
get
<
bool
>
(
"discardZeroToT"
,
false
);
}
void
Clicpix2EventLoader
::
initialise
()
{
...
...
@@ -111,6 +114,9 @@ void Clicpix2EventLoader::initialise() {
// Make histograms for debugging
hHitMap
=
new
TH2F
(
"hitMap"
,
"hitMap"
,
det
->
nPixelsX
(),
0
,
det
->
nPixelsX
(),
det
->
nPixelsY
(),
0
,
det
->
nPixelsY
());
hHitMapDiscarded
=
new
TH2F
(
"hitMapDiscarded"
,
"hitMapDiscarded"
,
det
->
nPixelsX
(),
0
,
det
->
nPixelsX
(),
det
->
nPixelsY
(),
0
,
det
->
nPixelsY
());
hPixelToT
=
new
TH1F
(
"pixelToT"
,
"pixelToT"
,
32
,
0
,
31
);
hPixelToA
=
new
TH1F
(
"pixelToA"
,
"pixelToA"
,
8192
,
0
,
8191
);
hPixelCnt
=
new
TH1F
(
"pixelCnt"
,
"pixelCnt"
,
8192
,
0
,
8191
);
...
...
@@ -195,7 +201,7 @@ StatusCode Clicpix2EventLoader::run(Clipboard* clipboard) {
}
// Disentangle data types from pixel:
int
tot
,
toa
,
cnt
;
int
tot
=
-
1
,
toa
=
-
1
,
cnt
=
-
1
;
// ToT will throw if longcounter is enabled:
try
{
...
...
@@ -214,9 +220,14 @@ StatusCode Clicpix2EventLoader::run(Clipboard* clipboard) {
}
Pixel
*
pixel
=
new
Pixel
(
detectorID
,
row
,
col
,
tot
,
shutterStartTime
);
pixels
->
push_back
(
pixel
);
npixels
++
;
hHitMap
->
Fill
(
col
,
row
);
if
(
tot
==
0
&&
discardZeroToT
)
{
hHitMapDiscarded
->
Fill
(
col
,
row
);
}
else
{
pixels
->
push_back
(
pixel
);
npixels
++
;
hHitMap
->
Fill
(
col
,
row
);
}
}
}
catch
(
caribou
::
DataException
&
e
)
{
LOG
(
ERROR
)
<<
"Caugth DataException: "
<<
e
.
what
()
<<
", clearing event data."
;
...
...
src/algorithms/Clicpix2EventLoader/Clicpix2EventLoader.h
View file @
14fa6bfb
...
...
@@ -52,10 +52,13 @@ namespace corryvreckan {
std
::
ifstream
m_file
;
TH2F
*
hHitMap
;
TH2F
*
hHitMapDiscarded
;
TH1F
*
hPixelToT
;
TH1F
*
hPixelToA
;
TH1F
*
hPixelCnt
;
TH1F
*
hPixelsPerFrame
;
bool
discardZeroToT
;
};
}
// namespace corryvreckan
#endif // Clicpix2EventLoader_H
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